numa_policy.5 (2010 09)

n
numa_policy(5) numa_policy(5)
(Tunable Kernel Parameters)
NAME
numa_policy - physical memory allocation policy on cellular HP-UX servers
VALUES
Default
0
Allowed values
Integer values 0, 1, 2,
3,or4.
DESCRIPTION
HP-UX treats large servers as if they are built from componment blocks. Each component block is
referred to as a locality and can contain memory, CPUs and peripherals. HP-UX constructs these com-
ponent blocks in such a way as to optimize resource alignment.
If a machine has only one locality, it is considered to be an UMA (Unform Memory Architecture) machine.
UMA is also a synonym for Symmetric Multiprocessor (SMP).
Large servers use Non-Uniform Memory Access (NUMA) protocols. An application thread can experience
variable memory latency depending on whether it is accessing memory from the same locality upon which
it is executing or from a different locality.
HP-UX implements a number of memory allocation features to optimize performance. Users can divide
the memory on the system into two classes of memory: Interleaved and Cell-local.
Interleaved memory delivers uniform latency. It makes multiple localities look like a single bank of uni-
form memory, delivering the same average latency for all applications across all CPUs. This is very use-
ful in spreading the memory load across all the localities.
Cell-local memory delivers low latency (high performance) to a process running in the same cell as the
memory it accesses. Conversely, references from a remote cell will have a much higher latency.
Users can configure cell-local memory using the HP-UX command
parconfig or parmodify
The numa_policy dynamic kernel tunable allows users to define how interleaved and cell-local memory
are utilized. There are five possible values for this tunable:
numa_policy = 0
This is the default value. HP-UX will autosense the right policy based on the mode in which
HP-UX is operating. See numa_mode(5) for more details on mode.
numa_policy = 1
This is the default policy in LORA mode. See numa_mode(5). For user memory allocation
this policy directs HP-UX to use memory from the locality domain where the thread is most
likely to be scheduled. It will select the locality by first honoring any locality policies specified
in fadvise() or shmget(). If no locality policies are specified, then all user memory is
allocated from the locality domain where the thread is most likely to be scheduled.
numa_policy = 2
This policy directs HP-UX to override any locality policies supplied via fadvise() or
shmget() and allocate all memory from the interleaved. Cell-local memory is allocated when
there is insufficient interleaved memory.
numa_policy = 3
This policy is like setting numa_policy to 1 except that all text and library data segments
are allocated from the interleaved memory. This setting is useful for servers running highly
threaded applications. This setting has a similar effect to the chatr command’s +id option
(this option is only available on Integrity systems), but on a system wide basis.
numa_policy = 4
This is the default policy in SMP mode. See numa_mode(5). In a machine configured with a
mix of cell-local memory and interleaved memory, HP-UX makes intelligent decisions on how
to use the memory by distinguishing between private memory and shared memory. For exam-
ple, Memory allocated to private objects (stack, heap, private files, and so on) is likely to come
from cell-local memory. Memory allocated to shared objects (shared files, System V shared
memory) is allocated from interleaved memory unless the user specifies otherwise using fad-
vise() for files or uses one of the memory options in shmget().
HP-UX 11i Version 3: September 2010 1 Hewlett-Packard Company 1

Summary of content (2 pages)