134
POWER7 and Optimization and Tuning Guide
Resource sets can be created with the
mkrset
command and attached to a process using the
attachrset
command. An alternative way is creating a resource set and attaching it to an
application in a single step through the
execrset
command.
The following example demonstrates how to use
execrset
to create an RSET with CPUs 4 - 7
and run an application that is attached to it:
execrset -c 4-7 -e <
application
>
In addition to running the application attached to an RSET, set the
MEMORY_AFFINITY
environment variable to
MCM
to assure that the application’s private and shared memory is
allocated from memory that is local to the logical CPUs of the RSET:
MEMORY_AFFINITY=MCM
In general, RSETs are created on core boundaries. For example, a partition with four
POWER7 cores that are running in SMT4 mode has 16 logical CPUs. Create an RSET with
four logical CPUs by selecting four SMT threads that belong to one core. Create an RSET
with eight logical CPUs by selecting eight SMT threads that belong to two cores. The
smtctl
command can be used to determine which logical CPUs belong to which core, as shown
in Example 7-1.
Example 7-1 Use the smtctl command to determine which logical CPUs belong to which core
# smtctl
This system is SMT capable.
This system supports up to 4 SMT threads per processor.
SMT is currently enabled.
SMT boot mode is not set.
SMT threads are bound to the same physical processor.
proc0 has 4 SMT threads.
Bind processor 0 is bound with proc0
Bind processor 1 is bound with proc0
Bind processor 2 is bound with proc0
Bind processor 3 is bound with proc0
proc4 has 4 SMT threads.
Bind processor 4 is bound with proc4
Bind processor 5 is bound with proc4
Bind processor 6 is bound with proc4
Bind processor 7 is bound with proc4
The
smtctl
output in Example 7-1 shows that the system is running in SMT4 mode with bind
processors (logical CPU) 0 - 3 belonging to proc0 and bind processors 4 - 7 belonging to
proc1. Create an RSET with four logical CPUs either for CPUs 0 - 3 or for CPUs 4 - 7.
Summary of Contents for Power System POWER7 Series
Page 2: ......
Page 36: ...20 POWER7 and POWER7 Optimization and Tuning Guide...
Page 70: ...54 POWER7 and POWER7 Optimization and Tuning Guide...
Page 112: ...96 POWER7 and POWER7 Optimization and Tuning Guide...
Page 140: ...124 POWER7 and POWER7 Optimization and Tuning Guide...
Page 162: ...146 POWER7 and POWER7 Optimization and Tuning Guide...
Page 170: ...154 POWER7 and POWER7 Optimization and Tuning Guide...
Page 223: ......