HP-UX 11i June 2004 Release Notes
Process, Threads, Memory, and Kernel Parameters
HP-UX Gang Scheduling
Chapter 10
216
HP-UX Gang Scheduling
new at 11i
original release
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.
The HP-UX gang scheduler is enabled or disabled by following environment variable:
MP_GANG [ON] | [OFF]
Setting MP_GANG to ON enables gang scheduling; setting MP_GANG to 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 executing
and finding this variable will enable gang scheduling for that process.
You also can launch a program with gang scheduling enabled for it by using the
/usr/bin/mpsched -g... command. (See “HP-UX SCA Process and Memory
Management” on page 222 for details.)
Thread and process priorities for gangs are managed identically to timeshare policy.
That is, 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 mpsched (1) or gang_sched (7) manpages for details about HP-UX gang
scheduling.