The following is a question posed by a FACTS partner to Mike King and his response. The partner thought this information would be of interest to the general partner community so he shared it with us. Special Note: The "partner" in this case is Tim Plotner of Earnest & Associates!
THANKS TIM....and a hearty "Welcome Back" into the FACTS community! :-)
PARTNER QUESTION:
Can you share with me as of PxPlus 2016, in windows and RedHat Linux, how much impact additional processors make for PxPlus? I know in the past, you didn’t make much use of additional cores, but has that changed?
PXPLUS RESPONSE:
For a single process (that is only one user on the system and that user only running one program/session) additional processors will make little difference. We do have some multi-threaded logic for network communication but its use is limited.
For multiple processes (that’s more than one user or one user with multiple sessions running) we take full advantage of multiple processors/cores.
You can see this if you run a program in an infinite loop such as 0010 GOTO 0010. On a machine with 4 cores this will use 25% of the processing power (one full core). If you then start another copy of PxPlus (or run another user) and run the same program the processor utilization will go to 50% (2 cores), etc..
About the only time when PxPlus cannot take advantage of multiple cores when running multiple processes is if the processes all go after a common resource such as a common file. When processing file IO requests by different processes to the same file, only one process can update the key trees at the same time since the internal structures need to be locked during the update cycle. NOTE: This is only the case when multiple processes go after the same file; each file has its own lock thus multiple files can have updates happening concurrently.
Now this has not changed much over the years. A single user/process PxPlus generally can only use 1 core, but multiple processes can use as many cores as are available.
People often get confused and think all PxPlus sessions go through the same core, which is not correct. Each session can run in any core and all sessions can run concurrently. The limitation is only that a single session/process basically will only use one core.
This is actually the same as virtually ALL programming languages out there unless you specifically code for multi-threading in your application logic. This can be done in PxPlus by spawning multiple sessions/processes in which case each spawned sessions/process can make use of additional cores/processors.