Consultor Eletrônico



Kbase P12659: How does the Quick Request startup parameter (-q) improve performance?
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   29/10/2008
Status: Verified

GOAL:

Will using -q change OS cache for r-code?

GOAL:

What exactly happens when "-q" is specified?

GOAL:

What does "-q" do?

GOAL:

How does the Quick Request startup parameter (-q) improve performance?

FACT(s) (Environment):

Progress 9.x
OpenEdge 10.x
All Supported Operating Systems

FIX:

Normally, when an r-code file is loaded, the AVM will always search the PROPATH looking for a a matching r-code file (a file with the same name as the procedure, but with a .r extension). If a matching r-code file is found it checks if the version in memory is still the same as the version on disk, and re-loads the r-code if it did change. This check ensures the client always uses the most recent r-code file.

The Quick Request startup parameter (-q) changes this behavior, and effectively disables this check. If the r-code still resides in memory, the AVM will re-use the copy in memory without checking the copy on disk. This reduces the overhead involved in running the same procedures multiple times, therefore the -q parameter can be used to improve performance in environments that run on a stable set of code, such as production and stress-testing environments.
The -q parameter should not be used in environments where the r-code can change frequently, such as development environments and functionality testing where different sets of code are compared to each other. The nature of these environments typically requires the client to re-load an r-code file if it has changed, so using the -q would introduce issues.

The performance gained by specifying the -q parameter can vary considerably depending on the application architecture and deployment strategy used.
It is important to realize that it only makes a difference when an r-code file is loaded, by running an external procedure ("RUN <procedure filename>","RUN <procedure filename> PERSISTENT" ) or by instantiating an ABL class ("NEW <classname>()"). calling internal procedures, functions or methods will not get any benefit.

Typically, applications that are designed to load as much code persistently as possible and then re-use the code in memory will gain less performance from the -q parameter as they re-load r-code files less often. This is seen for example when using SmartObjects - the ADM2 framework code is designed to load the various super procedures used to manage class architecture only once, where it will be re-used by the various object instances.
In contrast, non-persistent code that is run repeatedly will gain more. Examples for this are AppServer activate/deactivate procedures, or generic procedures that serve as entry point to an AppServer; these will be run non-persistently for each AppServer request.

Another point to keep in mind is that using the -q parameter avoids file I/O. As a result, the slower the file system (due to slower disks, network overhead on remote file systems, on-access monitoring software etcetera) the more performance will be gained.