[ Next Article | Previous Article | Book Contents | Library Home | Legal | Search ]
AIX Versions 3.2 and 4 Performance Tuning Guide

Processor Affinity and Binding

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. The bindprocessor command and subroutine bind the thread (or threads) of a specified process to a particular processor.

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.


[ Next Article | Previous Article | Book Contents | Library Home | Legal | Search ]