System information

372 Logical Partitions on System i5
12.1 Main storage and processor affinity concept
In some environments and system configurations, processes and threads can achieve
improved affinity for memory and processor resources. This improved level of affinity can
result in improved performance. You can tune the main storage affinity level setting on your
server at the process level and at the thread level.
12.1.1 Processor affinity concept
Other things being equal, it is desirable to dispatch a thread on the processor it last used.
This dispatching criterion is called processor affinity. The level of emphasis on processor
affinity can vary.
The highest possible degree of processor affinity is to bind a thread to a specific processor.
Binding means that the thread will be dispatched to that processor only, regardless of the
availability of other processors.
This technique can be useful for CPU-intensive programs that experience few interrupts.
It can sometimes be counterproductive for ordinary programs, because it may delay the
redispatch of a thread after an I/O until the processor to which the thread is bound becomes
available. If the thread has been blocked for the duration of an I/O operation, it is unlikely that
much of its processing context remains in the caches of the processor to which it is bound.
It would probably be better served if it were dispatched to the next available processor.
12.1.2 Memory affinity concept
In this section, we present a basic view of memory affinity.
Each Multi-Chip Module (MCM) contains 8 processors, making a processor node that is
connected to memory cards. As long as the processors access these local memory cards, the
performance is optimum.
Now, with multiple MCMs, a processor on one node may need to access memory cards
connected to another processor node (another MCM). So, instead of using a local memory
access, the bus interconnecting the MCMs is used to perform a remote memory access, and
the performance is not optimum. See Figure 12-1.
Important: Tuning main storage affinity levels may improve performance in some
environments or system configurations, or degrade it in others.