Client-Side Performance Tuning
From ARSWiki
Contents |
ARRPC_RESPONSE_SIZE
I received a question from a user who was running a report that was pulling back about 60,000 records from one of our reporting servers. Even though the query didn't time out and all the data was returned, the AR System User Tool was tied up for approximately seven minutes while the query completed and the results were downloaded. Suffice it to say, the user was wondering if there was any possible way to minimize the amount of time they had to look at the spinning hour glass. We examined the SQL that was being executed and determined that it was completing at the database level in approximately twelve (12) seconds; however, the AR System® User tool was not returning control to the user for about seven minutes.
After capturing some log files, we noticed that the AR System User Tool issued an initial ARGetListEntryWithFields API call (lines 1-4 in attached USER.log) followed by approximately 90 subsequent ARGetListEntryWithFields API calls that did not have any corresponding SQL calls. Based on a review of this information, I made the assumption, that the 90 subsequent calls were the User Tool pulling back the cached results from the original query. This was later confirmed by Remedy® Technical Support. At this time, I was also made aware of an undocumented client-side environment variable that would instruct the AR System User Tool tool to use larger packets of data when retrieving data from the server. As it turns out, this was also one of the topics that was to be discussed at the annual Remedy User Group (RUG) meeting at that time.
By default, the user tool retrieves data from the AR System server in 50k chunks. You can change this by setting the ARRPC_RESPONSE_SIZE environment variable. The maximum value is 1,000,000.
Configuring the Environment Variable
The following section of the document outlines the process that you will need to follow in order to configure your desktop or server to make use of the ARRPC_RESPONSE_SIZE environment variable. This setting works with both the Win32 User Tool as well as any program or utility that uses the Remedy-provided API libraries. The only requirement to use this setting is that the environment variable must be set for the user account under which the Win32 User Tool or an API program is executing.
Windows Environment
- Right click on the “My Computer” object located on your desktop.
- Select the “Properties” menu option.
- When the “System Properties” dialog is displayed, left-click on the ‘Advanced’ tab.
- Left-click on the ‘Environment Variables’ button located at the bottom of the “Advanced” tab.
- When the “Environment Variables” dialog is displayed, left click on the ‘New’ button in the “System variables” setting.
- When presented with the “New System Variable” dialog, enter “ARRPC_RESPONSE_SIZE” in the ‘Variable name:’ field and “1000000” in the ‘Variable value:’ field.
- Left-click on the ‘OK’ button. This will return you to the “Environment Variables” dialog.
- Left-click on the ‘OK’ button. This will return you to the “System Properties” dialog.
- Left-click on the ‘OK’ button.
If you have an instance of the AR System User Tool open, you will need to close it in order for this to take effect.
UNIX/LINUX Environment
To use this environment variable setting on a UNIX/LINUX platform, simply add the following line to the .profile (.bash_profile) for the user account you wish to use.
EXPORT ARRPC_RESPONSE_SIZE=1000000
Test Results
I ran a quick test on my machine to see what the results of using this environment variable were. I’ve attached the log files captured during this experiment to this e-mail message. The WithEnvironmentVariableSet.log file contains the API and SQL logs generated when using the environment variable. The WithoutEnvironmentVariableSet.log file contains the API and SQL logs generated when the environment variable was NOT used.
With the environment variable set to the maximum (1000000), the AR System User Tool took four minutes and thirty-one seconds (4:31.883) to complete the query and return. In this time, it executed about 31 separate calls to the ARGetListEntryWithFields API command.
Without the environment variable set, the AR System® User Tool took ten minutes, thirty-two seconds (10:32.8816) to complete the query and return. In this time, it executed about 619 separate calls to the ARGetListEntryWithFields API command.
Log Files
To be added.
References
This article discusses performance tuning for ARS Mid-Tier and the Servlet runtime environment and mentions setting the ARRPC_RESPONSE_SIZE environment variable in the section entitled "New Atlanta StartServletExec Startup Script".

