lkml.org 
[lkml]   [2008]   [Mar]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Performance changes between 2.6.13 and 2.6.23
On Tue, Mar 25, 2008 at 2:52 PM, Sanders, Rob M. <sanders-rob@zai.com> wrote:
> Each process is single threaded, although each process is built with the
> -lpthread library. For this particular application I would expect the
> bottleneck to be in I/O (between processes) bound. I hadn't thought
> about trying to boot YDL4 using the new kernel, I'll try that, and I'll
> look at the lmench2 and interbench. Thanks....

In that case it might be interesting to observe the number of context
switches per second caused by the different processes. If the product
of the context switch time reported by lmbench2 and the number of
context switches per second is more than about 0.1, this means that a
lot of time is spent in just context switching and the application
probably should be optimized to cause less context switches. This
holds for any OS.

On a Linux system you can observe the number of context switches
performed by all processes e.g. via the following bash script:

interval=5; last=""; while true; do ctxt=$(while read col1 col2 rest;
do if [ $col1 = ctxt ]; then echo $col2; fi; done </proc/stat); if [
"$last" != "" ]; then echo $(((ctxt-last)/interval)); fi; last=$ctxt;
sleep $interval; done

The above script uses as much bash built-ins as possible such that it
causes as few context switches as possible.

Bart.


\
 
 \ /
  Last update: 2008-03-25 15:25    [W:0.063 / U:0.380 seconds]
©2003-2014 Jasper Spaans. Advertise on this site