Best Practices When Deploying Linux on the HP ProLiant DL980 (updated December 2012)

11
[root@tux ~]# echo 1 > mems
[root@tud ~]# echo $$ > tasks
For more information about the cpuset command, see the cpuset(7) manpage.
Red Hat Enterprise Linux 6 and SUSE Linux Enterprise Server 11 introduced Linux Control Groups or cgroups, which use
the cpuset subsystem. For more information, see the Red Hat Enterprise Linux 6 Resource Management Guide:
access.redhat.com/knowledge/docs/en-
US/Red_Hat_Enterprise_Linux/6/html/Resource_Management_Guide/index.html
Moving tasks to other NUMA nodes
To move a task from one NUMA node to another by changing the CPU affinity, use the standard taskset command. The
taskset command changes the CPU affinity only. It does not move the physical memory pages allocated by the task.
To move the physical pages to the new NUMA node, use the migratepages(8) command. For more information
about these commands, see the taskset(1) and migratepages(8)manpages.
In the following example, the first taskset command returns the CPU affinity mask for PID 6371, representing logical
processors 0 to 79. The second taskset command sets a new affinity to logical processors 10 to 19 for this PID. To
minimize memory latency, the third command (migratepages), migrates the associated memory pages from node 0
to node 1.
[root@tux ~]# taskset -p 6371
pid 6371's current affinity mask: ffffffffffffffffffff
[root@tux ~]# taskset -pc 10-19 6371
pid 6371's current affinity list: 0-79
pid 6371's new affinity list: 8-15
[root@tux ~]# migratepages 6371 0 1
Determining task memory allocation location
To determine a task’s memory allocation location, examine the /proc/<pid>/numa_maps file. This file displays
each memory object for a particular task. The following example shows the entries for the current shell’s heap and
stack:
[root@tux ~]# grep e heap e stack /proc/$$/numa_maps
0245f000 default heap anon=65 dirty=65 active=60 N1=65
7fff23318000 default stack anon=7 dirty=7 N1=7
The first field of each row is the start of the Virtual Memory Address (VMA) range (for example, 0245f000 or
7fff23318000). The second field is the memory allocation policy (for example, default, which is the System
Default Policy). The third field is the path to the mapped file or the use of the shared memory segment (in this example,
heap or stack). The anon= and dirty= show the number of pages. The N<node>= shows the number of pages
allocated from each <node>. For a complete description of these fields, see the numa(7) manpage.
OS support matrix for the HP ProLiant DL980 server
To run Linux and Linux applications optimally, you must understand how to leverage the capabilities and resources of
the DL980 server. A good starting point is to review the selected OS support matrix in Table 2.