Salesforce

PASOE using ABL calls to operation system commands are slower on a multi-core CPU environment

« Go Back

Information

 
TitlePASOE using ABL calls to operation system commands are slower on a multi-core CPU environment
URL NameCalls-to-OS-commands-from-ABL-code-are-much-slower-on-a-multi-core-CPU-environment
Article Number000154321
EnvironmentProduct: OpenEdge
Version: 11.7.5
OS: UNIX
Question/Problem Description

PASOE using ABL calls to operation system commands are much slower on a multi-core CPU environment.
PASOE agent is up to 10 times slower on a multi-core environment vs single-core
PASOE agent sessions are slower than Classic Appserver agents running the same ABL operation system calls

2 source-codes are compared via 2 machines. They communicate via AppServer and use the following code:

INPUT STREAM str2 THROUGH
VALUE(“wc -c “ + filepath) NO-ECHO.
IMPORT STREAM str2 hkb.
INPUT STREAM str2 CLOSE.

On the classic AppServer it takes 2 minutes. On PASOE it takes 4 hours.
Classic AppServer and PASOE are running on the same machine.
The performance issue can be observed on both AIX and Linux systems.

Steps to ReproduceOn a multi-core CPU environment:

1. Create a textfile (somefile.txt) with a string of characters.

2. Copy the file to PAS temp dir: /wrk/oepas1/temp/somefile.txt

3. Run the following code from the procedure editor and on PAS server:

DEFINE VARIABLE filepath AS CHARACTER NO-UNDO INIT ”/wrk/oepas1/temp/somefile.txt”.

DEFINE VARIABLE cc AS CHAR.
DEFINE STREAM ss.

ETIME(TRUE).
INPUT STREAM ss THROUGH VALUE(“wc -c “ + filepath).
IMPORT STREAM ss cc.
INPUT STREAM ss CLOSE.

MESSAGE ETIME SKIP cc VIEW-AS ALERT-BOX.

4. repeat steps 1-3 on a single-core CPU environment

5. Notice the difference on execution time between the multi-core and the single-core environment.
Clarifying Information
This behavior can't be observed on Windows systems.
Error Message
Defect NumberDefect ADAS-22626
Enhancement Number
Cause
There is unnecessary sleep time when forking a process and waiting for it to exit. The issue is due to how the amount of time for the PASOE agent to sleep() while waiting for a sub-process to finish was implemented, which keeps gets longer and longer in increments of 100 milliseconds.
Resolution
Upgrade to OpenEdge 11.7.6, 12.2.1, 12.3. 

The amount of time for the MSAgent to sleep uses nanosleep () to sleep at a constant 100 nanosecond duration (0.0001 millisecond) 
 
Workaround
Use the ABL-equivalent to the OS command being called when it is possible. 

For instance in the above ABL code sample, use the FILE-INFO:FILE-SIZE ABL statement instead. 
Notes
Keyword Phrase
Last Modified Date6/7/2022 8:53 PM

Powered by