General
This article was written with B1UP in mind but all principles in the text apply to other B1 Client based add-ons like iPayment and so on. When something is B1UP specific it is pointed out in the text.
Q: I think my Boyum add-on is slow! Have you guys written poorly code that causes this?
A: Certainly not. One of our highest goals is the performance of the product and a huge amount of hours goes into performance tuning every single month.
[B1UP Specific] That being said, the highly dynamic nature of B1UP will have an impact on performance and it will never be able as performance effective as a highly specific add-on. Also, we can never be faster than the underlying SAP SDK.
Q: So does that mean my Boyum add-on will never be faster?
A: No, We always find ways to do something fast, cache data, and we of cause also from time to time make mistakes that need to be fixed in regards to performance. similarly, as SAP releases new versions of the SDK, new features that increase performance comes along that we begin to use. For that reason, being on the latest Add-on and SAP Version normally tend to give you the best performance we can offer.
Q: So how can I test if my Boyum add-on is the issue?
A: This is not an easy task but please try the following things:
- Try to stop the add-on and test the performance. In such a case you will in 99% of the time experience that things are faster (More features will always decrease performance) but if you do not get any better performance we now know that add-on is not the issue
- [B1UP Specific] Try to turn B1UP modules off one at a time in order to test which of the modules are taking the performance
- Try on a copy of the database to remove all Formatted Search on the screen to test and see the difference (see the section on formatted searches below).
- Try to do the test on the server (That way you eliminate any possible issue in the network).
- Try to monitor the SQL-server if it is the bottleneck (Long SQL Waits)
- Try to monitor the client CPU/Memory and see if that is the bottleneck (Spikes in CPU usages / All memory is used causing paging of the memory)
Hardware
Q: What about hardware. Any recommendations?
A: As our add-ons are inside the SAP Client, the most important hardware is the client machines and less so for the server. During the startup of the product, the server is asked for all configuration data so during startup the server and the network are the most important, but in the day-to-day work most work lies in the client machines memory and CPU. Server traffic of cause exists but is kept to a minimum. Also, the nature of how SAP Add-ons work in general you will experience that you will get the most performance out of multi-core machines as SAP and the Boyum Add-on are two separate processes running that do a lot of context switching. If you only have a single core the CPU needs to constantly load/unload the two.
Q: What is the most important aspect of Hardware with your add-ons (Disk, CPU, or Memory)
A: It of cause varies between product and workloads scenarios, but overall you can say the following:
- CPU is the most important: This is because of SAP Business One Add-ons and event work by doing inter-process operations between the SBO exe and the Add-on exe, so the best setup is multi-core CPU (so one exe can work on one core and the other on another core). The Clock frequency also has a high impact on the performance
- The disk is the second most important factor as the SAP Business One client can be very chatty with the Disk. SSD Disks are recommended or disk with a high level of mem-cache.
- Memory has the least impact. All add-ons need at least 200MB of memory in order to deal with the DI-API connection but beyond that, there are no huge memory requirements in more operations.
Q: Will switching to SAP HANA solve the issues?
A: While there can be certain benefits to running HANA over MSSQL it will most likely not solve any of our add-on scenarios. As mentioned above then almost all of the work happens in the B1 Client without the need to talk to the server (What we call UI work). This UI Work like adding a button or moving a field around is done in the UI-API and UI-API is shared by both MSSQL setups and HANA setups (aka they are the same), and that is the reason HANA is not the solution for at least B1UP's performance issues.
Slowness in operating SAP Business One
Q: [B1UP Specific] I've applied a lot of changes to an SAP screen using Item Placement Tool and/or Content Creator and now the window is slow to open. What is wrong?
A: This is one of the known performance bottlenecks in the SAP SDK. Changing the existing layout of an SAP screen is not something that is done as a one-time deal. Every time you open the screen, the changes are applied just before the screen is opened and the more customizations you have, the more time it will take to apply them. This was a major issue for many customers back in the day, so we introduced in B1UP 4.x something called XML-mode, which adds the data to the screen as a batch job instead of one item at the time, and this has reduced the time significantly.
Updated 15-05-2017: In B1UP 2017.06 (June) we have improved the performance of the Item Placement Tool when working with system items (Move/hide). They are now also updated using XML and this increases the performance when modifying many system items.
Q: What else impacts the performance of the screens?
A: One thing we often see slow-down add-ons is heavy usage of formatted searches. Opening a window with many formatted searches and an add-on running is, unfortunately, a bad combination and internally we try to keep formatted searches to a minimum (in a test database you could try to remove all formatted searches on a given window and see the difference). Problem is that Formatted Searches cause a lot of Validate events (events going out of fields) and often people create B1 Validation configurations that use Validate events. Please see this video for more information on the matter + an example of how much Formatted Searches slow things down.
Another thing that can affect normal operation performance is what SAP version you run. If you run lower than SAP 9.2 we recommend moving to at least 9.2 as it has some new capabilities that make the impact of add-ons smaller (if they are optimized for what is called "Item Level Event Filter").
Q: Is there additional troubleshooting that can be done for general performance issues?
Yes, you should always check if the performance is hindered either by antivirus, or firewall software. Try to turn off the SAP Client, disable Antivirus and Firewall for troubleshooting purposes, and see if you can still reproduce the slowness.
Slow Startup
Q: When I start my Boyum Add-on it takes a long time before it is ready to use?
A: Before we talk about performance let us quickly have a look at the things that happen during a startup so we can talk from there. A startup includes:
- 1. Connection to the UI-API. [Add-on Step 1]
- 2. Creation of menu items. [Add-on Step 1]
- 3. Connection to the DI-API. [Add-on Step 2]
- 4. Check that all user-defined tables and fields are there. [Add-on Step 2]
- 5. Retrieve all data for the various configs. [Add-on Step 3]
- 6. [B1UP Specific] Apply the configs that need to be run during startup (Exchange Rates, B1 Search, Add and Edit Menus, etc.).
- 7. License check.
Let's look at each step:
- This step only take a few milliseconds
- About a second go to do this. We are currently looking into alternative ways to make this faster
- This is about 33% of the connection time and is a direct call to the DI-API so only SAP can optimize this part. The issue is especially bad if you use VPN Connections.
- This step is highly optimized for Boyum Add-ons and will only take time the very first time you activate the add-on on a machine
- This takes 33% of the connection time. We are constantly optimizing our strategies on how to retrieve the data in the fastest way. The more configs and modules you have, the longer it will take to get the data to make sure you do not have any unnecessary modules and/or configs in the system.
- [B1UP Specific] Exchange Rates and Add and Edit Menus take the most time here. The exchange was in 4.x optimized to only check if it is actually needed and we are working on ways to improve setups that have many new menu items from Add and Edit Menus.
- This step happens after startup and does not impact startup time
Common reasons for abnormal startup times
1) Many DI-API log files
To decrease the time it takes to start Boyum Add-ons in some cases, please see this article on SAP Support launchpad: https://launchpad.support.sap.com/#/notes/2113913
The log files in question can be found from %USERPROFILE%\AppData\Local\SAP\SAP Business One\Log\DIAPI
You can also stop the DI-API from creating the log files by editing the file: C:\Program Files (x86)\SAP\SAP Business One DI API\Conf\b1LogConfig.xml
If performance problems are related to Server Component, the log files are found here: %PROGRAMDATA%\SAP\SAP Business One\Log\SAP Business One\<machinename>$\DIAPI
where <machinename> is the name of the computer.
2) Menu items issue
1. SAP note 1727485: Duplicate data entered in CDPM table causes slow loading of the addon.
Solution: While creating the menu by addon having UniqueID value more than 32 char, the truncated value of UniqueID will store in the GUID field. So every time addon creates a menu, there will be a mismatch between the GUID field of OCMN and UniqueID value set in CDPM again for each menu load.
2. SAP note 2125449: Login performance issue when reports are mapped to a user-defined menu.
Workaround: Remove unnecessary reports via "Administration -> Setup -> General -> Report and Layout Manager", especially for those reports which are mapped to a user-defined menu.
3. The Father field of some user-defined menus in the OCMN table is null.
Normally if adding user-defined menus via UI API, the Father will be an empty string instead of null.
Solution:
We have prepared a corrective query for you.
By using the update query you agree with liability conditions described in the following disclaimer: http://wiki.sdn.sap.com/wiki/display/PEQ/Home
If you do not agree with the disclaimer, please contact the support organization for further processing of the reported issue.
You can run the fix on the productive database provided that:
A. You have tested the solution in a copy of the production database and verified that the solution resolves the reported issue.
B. You make a backup of the production database before and after the fix. Keep the backups for a reasonable time - we recommend 3-6 months after the fix.
C. No user or add-on or any other customization updating the data is connected to the database during the fix.
The select query: Get all user-defined menus which's Father is null.
Select GUID from OCMN where Father is null
The update query: Update Father field to empty string.
Update OCMN set Father = '' where GUID = [%CustomMenuGUID%]
**** USE THE ABOVE QUERIES FOR THIS INCIDENT ONLY ****
3) Slow ODBC Driver [HANA Only]
In a few rare HANA cases, we have seen that our "Lazy DI-API Startup system" does exactly the opposite of its intent and makes the system slower. We do not yet know the root cause of this (We suspect it is due to bad ODBC Drivers or network).
In such a situation you can try turning off our "Lazy DI-API system" via our support tool:
- Go to folder C:\Program Files\SAP\SAP Business One\AddOns\BOY\B1 Usability Package\ResourceFolder and start Boyum Support Tool
4) No/Limited Internet environment
Please see this separate article about this
Current Known issues with performance
How can you help me find the reason more specifically?
Turn on the extended logging system (remember to turn it off afterward.)
Comments
0 comments
Please sign in to leave a comment.