Christian Bilien’s Oracle performance and tuning blog

March 4, 2007

HP-UX Processor Load Balancing on SMPs (1/2)

Filed under: HP-UX — christianbilien @ 9:33 pm

Processor cache hits (data and instruction) are performance-wise extremely important. The TLB (translation lookaside buffer) is one of the most important CPU component as far as performance is concerned: it is a cache to the virtual to physical address translation process (the HP-UX Page Directory). As often showed, CPU accounts for a large part in SQL calls response times, of which most of it is memory access time. As threads move from one processor to the other, cache lines must be invalidated (if processor N°2 has to update a line loaded in a processor N°1 data cache), or at best reloaded when read access is required by both processors. I’ll write a post in the future about the in and outs of processor affinity. For now, I am interested by the rules that govern CPU switches, and understand what triggers them.

I’ll only consider versions more recent than HP-UX 11.11 :

The routine that does the load balancing is named mundane_balance()). This routine schedules itself into the timeout mechanism to be awakened once a second. It runs as an interruption service routine rather than within the context of another process. Thus it cannot be interrupted by some other event. Nor can it be starved by other real-time threads (it was call from stat_daemon() before 11.11).

A processor is in a state of starvation if it has one or more threads on its run queue that hasn’t executed for a long time (this “long time” varies with the CPU load). Only if there are no processors suffering from starvation, or all processors have starving threads (or could be forced into that condition), does HP-UX considers looking for balancing (see next post: HP-UX Processor Load Balancing on SMPs).

4 Comments »

  1. […] reduce wait time in run queues of busy CPUs (see “HP-UX processor load balancing on SMPs”), the system scheduler can decide to move threads to other CPUs on any cell in the same nPar; data […]

    Pingback by Memory partitioning strategy: avoiding design traps on high end HP-UX systems (1/2) « Christian Bilien’s Oracle performance and tuning blog — March 25, 2007 @ 5:48 pm

  2. […] Load Balancing on SMPs (2/2) Filed under: HP-UX — christianbilien @ 3:18 pm The The first post I wrote on CPU scheduling was describing the circumstances in which thread stealing would be […]

    Pingback by HP-UX Processor Load Balancing on SMPs (2/2) « Christian Bilien’s Oracle performance and tuning blog — April 12, 2007 @ 7:51 pm

  3. […] I already blogged on HP-UX scheduling :hpux_sched_noage and hp-ux load balancing on SMPs. […]

    Pingback by A short, but (hopefully) interesting walk in the HP-UX magic garden « Christian Bilien’s Oracle performance and tuning blog — November 17, 2007 @ 4:59 pm


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: