z/TPF - Group home

Simple lock performance improvements (PJ46800)

  

Simple locks are a type of lock that are used for locking and serialization in the z/TPF file system, logical record cache support, and other related areas.  On a z/TPF system with multiple I-streams and high simple lock usage, multiple I-streams might be competing for the same simple lock at the same time.  When different I-streams compete to obtain the simple lock, this contention might increase CPU usage and impact system performance.

This enhancement reduces contention on simple locks, which can significantly reduce CPU utilization and improve system performance in environments where heavily-used system services rely on the same simple locks. 

Because simple locks are used “under the covers” by file systems and logical record cache, this performance improvement is best demonstrated through users of those facilities.  One such example is the syslog logging facility, which is typically configured to write to log files in the file system.

In our tests, the syslog facility was configured to write log entries to a file in the TPF file system (TFS).  On a z/TPF system with 10 dedicated I-streams, 100 ECBs each tried to call syslog 10 times per second for a target rate of 1000 syslog calls per second to the same log file. 

Without this enhancement, the system failed to reach the target rate due to high simple lock contention and only managed around 200 syslog calls per second.  Not only is this a fraction of the target rate, but it also drove CPU utilization to well over 98%.

By just applying this APAR to z/TPF and without making any other changes, z/TPF successfully called syslog 1000 times per second – a 5x improvement in throughput!  In addition to the fivefold increase in throughput, average CPU utilization fell to 4% - more than a 20x reduction in CPU utilization! 

Simple locks are rarely used directly by applications or defined in application data structures.  As a result, simply applying this APAR to your system should be the only thing needed to take advantage of this enhancement.  If your applications use simple locks directly, an application update is required only if the application references fields in the simplelock structure. 

For more information about the simplelock structure and APAR PJ46800, see the APEDIT.