Scheduling engines to CPUs

The symmetric aspect of SMP is a lack of affinity between processes and CPUs—processes are not attached to a specific CPU. Without CPU affinity, the operating system schedules engines to CPUs in the same way as it schedules non-Adaptive Server processes to CPUs. Scheduling any process to a processor, including Adaptive Server engines, is done by the operating system, which can, at any time, preempt an Adaptive Server engine to run an arbitrary task. If an Adaptive Server engine does not find any runnable tasks, it can either relinquish the CPU to the operating system or continue to look for a task to run according to the amount of time specified by the idle timeout parameter.

In some situtations,you may improve performace by forcing an association between Adaptive Server threads and a specific CPU or set of CPUs. For example, grouping engines into the fewest number of physical sockets improves the hit rate on the L2 and L3 caches, improving performance.

In configurations where a single socket has sufficient parallelism for all engine and I/O threads (such as an 8-core socket running a 4-engine Adaptive Server), consider binding the Adaptive Server engine to a single socket with dbcc tune or with your operating system (generally recommended). Consult your operating system documentation for instructions on binding threads or processes to CPUs.