Main Menu

KB#00545-Running BBx / PRO5 on multi-processor systems.

Title:

Running BBx / PRO5 on multi-processor systems.

Description:

BASIS is neutral on Multi-processor systems. By that I mean that we rely completely on the operating system and on the libraries that are supplied with the operating system to handle allocation of jobs to the various CPU's. Currently in multi-processor systems, BBx jobs are parceled out to the CPU's according to the CPU's balancing algorithm. There should be a fairly even distribution of BBx jobs among the multiple processors. In the future, BASIS products will be multi threaded which will allow multi-processor operating systems a finer level of control over the allocation of tasks. 

Users of multi-processor systems should take into account 2 SETOPTS bits that can affect performance in general, and specifically, can also help reduce bottlenecks on multi-processor systems. First is the advisory locking bit (byte 3, bit $40$ in the options vector) which most people know about. Most multi-user systems will see a benefit in using Advisory Locking where it is available. multi-processor systems should see a bigger overall benefit because Advisory Locking can reduce logjams that force the multiple CPU's into a serial mode. 

The second is the "multiple read access" bit (byte 3 bit $20$) which allows multiple read processes to access the header of a file while write processes are blocked. When BASIS files are accessed, locks are used on the header of the file to ensure that the file header and key chain don't change while a record is being read, and to ensure that the file header and key chain are updated and data (actually key and header data) integrity is preserved in a multi-user environment. Normally, these header locks block any other process from reading or writing the file until they are released. (Note: This is completely independent of the EXTRACT verb. All READ/WRITE operations on files use header locks. In addition, EXTRACTs use locks on information related to specific records.) 

Setting the "multiple read access" bit, allows multiple read processes, which are normally blocked, to read through the header locks that other read (not write!) processes have set. If several CPU's in an multi-processor system are running BBx jobs that are all reading the same file simultaneously, then, without this bit set, each CPU is waiting on the others to complete their 
file operations before it can do it's operation. So instead of several CPU's churning away in parallel on the different jobs, this situation could force them to operate serially, with an overall slowdown in the system. Allowing multiple reads to proceed can break that logjam and improve system performance. This can also work on Single processor systems, but the most dramatic effect is on multi-processor systems. 

Having said that, there are some caveats that you should be aware of: 

Caveat 1: As far as I know this is only supported in Unix systems. It's an operating system level feature. 

Caveat 2: Many, if not most, systems involved in Business Data Processing do more reads than writes. Setting the "multiple access bit" gives reads an edge, so writes can take longer. In most cases, I suspect that the improvement in reads will more than offset the slower writes. If your system does more writes than reads, you won't see much improvement, if you see any at all. You may even see a slowdown. At the other extreme, if the system does a LOT more reads than writes, while the reads are going faster, the writes are going to be waiting a LOT longer. 

Caveat 3: If the system is completely IO bound, adding more CPU's won't help much and may hurt. In this case concentrate on the IO with lots of RAM available for disk caching, RAID subsystems, etc. 

So try it on a Unix system. You may see a dramatic improvement. 



Last Modified: 01/15/2004 Product: PRO/5 Operating System: Unix

BASIS structures five components of their technology into the BBx Generations.

  Google+ View BASIS LinkedIN ProfileVisit our Twitter Feed Check out our Facebook Public Profile Click to View the BASIS youTube channel