Threads, thread pools, engines and CPUs

In process mode, Adaptive Server typically consumes one CPU per configured engine. In threaded mode, Adaptive Server typically consumes one CPU per configured engine thread, plus additional CPU for nonengine threads, such as I/O handling threads in syb_system_pool.

However, the definition of a CPU is ambiguous in modern systems. What the operating system reports as a CPU may be a core of a multicore processor or a subcore thread, where each core supports multiple threads (often called hyperthreading, SMT, or CMT). For example, a system that has two 4-core processors with two threads per core, reports that it has 16 CPUs. This does not mean that all 16 CPUs are available for Adaptive Server.

Sybase recommends that you determine how much actual CPU is available to Adaptive Server, and how much CPU power each engine and each nonengine thread requires. A good estimate is to allow one CPU for the operating system. In threaded mode, also allow one CPU for I/O threads.

Based on this recommendation, configure no more than 15 engines on a 16-CPU system in process mode, and no more than 14 engines in threaded mode on the same system (in threaded mode, each engine can do more useful work than in process mode).

When configuring the CPU, consider that:

Sybase recommends that you use sp_sysmon to validate your configuration. If you see a high degree of nonvoluntary context switching, or an engine tick utilization that is higher than the OS thread utilization, you may have over-configured Adaptive Server relative to the underlying CPU, which can lead to a significant loss of throughput.