HP-UX 11i Release Notes (December 2000)
Process, Threads, Memory, and Kernel Parameters
HP-UX Gang Scheduling
Chapter 8152
HP-UX Gang Scheduling
This release includes the ability to "gang schedule" MPI (Message
Passing Interface) applications and multi-threaded processes. The gang
scheduler permits a set of MPI processes, or multiple threads from a
single process, to be scheduled concurrently as a group.
Only applications using the HP-UX 11.0 or later MPI or pthread
libraries can be gang scheduled. Because HP compiler parallelism is
primarily built on the pthread library, programs compiled with HP
compilers can benefit from gang scheduling.
The gang scheduling feature can significantly improve parallel
application performance in loaded timeshare environments that are
oversubscribed. Oversubscription occurs when the total number of
runnable parallel threads, runnable MPI processes, and other runnable
processes exceeds the number of processors in the system.
Gang scheduling also permits low-latency interactions among threads in
shared-memory parallel applications.
An environment variable enables and disables the HP-UX gang
scheduler. The variable is defined as: MP_GANG [ON] | [OFF]
Setting MP_GANG ON enables gang scheduling. Setting MP_GANG OFF
disables it. No action is taken if MP_GANG is not set, or if it is set to an
undefined value. After the MP_GANG environment variable is set to ON,
any MPI or pthread application to execute and find this variable will
enable gang scheduling for that process.
Thread and process priorities for gangs are managed identically to
timeshare policy. The timeshare priority scheduler determines when to
schedule a gang and adheres to the timeshare policies.
Although it is likely that scheduling a gang will preempt one or more
higher priority timeshare threads, over the long run the gang scheduler
policy is generally fair. All threads in a gang will have been highest
priority by the time a gang is scheduled. Because all threads in a gang
must execute concurrently, some threads do not execute when they are
highest priority (the threads must wait until all other threads have also
been selected, allowing other processes to run first).
Refer to the gang_sched (7) manpage for details about HP-UX gang
scheduling.