HP-UX 11i v3 Memory Management Subsystem
10
Cell 3 was designated as a floating cell to allow for the possibility of online deactivation. The kernel never places
certain data structures in floating memory, but the floating memory is well utilized by applications.
Interleaved memory is used for objects that are expected to be referenced globally, such as program text and
shared kernel data. The example system needs just over 16 GB of interleaved memory; configuring it with less than
that amount would lead to suboptimal performance.
Here is the memory distribution for the sqlplus process examined previously, obtained by using the -p option to
locinfo:
--- Per-process locality info for pid 8121: ---
idx total shared private weighted
0 2.14M 20K 2.12M 2.12M
1 884K 0 884K 884K
2 832K 16K 816K 816K
3 0 0 0 0
4 19.15M 18.78M 376K 3.92M
----- ----- ----- -----
22.96M 18.82M 4.15M 7.70M
This process has a total memory footprint of almost 23 MB. The biggest part of this, almost 19 MB, is shared
memory. Note how most of the shared memory is allocated from the locality at index 4, the interleaved memory
locality, which is favorable for global access. The process also has slightly more than 2 MB of private data. This is
concentrated in the locality at index 0, which is on cell 0. The scheduler in the kernel will try to schedule the
process to run on a processor that is in cell 0, so that the memory access latency time is minimized.
The column marked weighted indicates the amount of resident memory for this process, weighted by the number
of processes sharing the memory. A private page counts as one page; each shared page counts as a page divided
by the number of processes sharing that page. For the example sqlplus process, most of the local memory was
private. The shared memory was mostly drawn from the interleaved locality, and was shared with three or four
other processes.
Ipcs
The ipcs(1) command reveals information about interprocess communication facilities, such as shared memory.
In the example below, the command was invoked as
ipcs -ma, to show all information about shared memory.
IPC status from /dev/kmem as of Wed Jan 6 13:54:36 2010
T ID KEY MODE OWNER GROUP CREATOR CGROUP NAT
Shared Memory:
m 0 0x411c01a8 --rw-rw-rw- root root root root 6
m 1 0x4e0c0002 --rw-rw-rw- root root root root 6
m 2 0x4120de56 --rw-rw-rw- root root root root 6
m 3 0x411c7910 --rw------- root root root root 5
m 4 0x06347849 --rw-rw-rw- root root root root 6
m 131077 0x0c6629c9 --rw-r----- root root root root 8
m 65542 0x49189ef5 --rw-r--r-- root root root root 9
m 9371655 0x00000000 --rw-r----- oracle dba oracle dba 4
m 196616 0x00000000 --rw-r----- oracle dba oracle dba 4
m 163849 0x00000000 --rw-r----- oracle dba oracle dba 4
m 229386 0x00000000 --rw-r----- oracle dba oracle dba 4
m 229387 0x00000000 --rw-r----- oracle dba oracle dba 4
m 229388 0x9e466d34 --rw-r----- oracle dba oracle dba 4
m 917517 0x00a5c581 --rw------- sfmdb users sfmdb users 1