From: "Bart Van Assche" <bart.vanassche@gmail.com>
To: "Sanders, Rob M." <sanders-rob@zai.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Performance changes between 2.6.13 and 2.6.23
Date: Tue, 25 Mar 2008 15:23:09 +0100 [thread overview]
Message-ID: <e2e108260803250723k345a7387y117d9bcbcabf135c@mail.gmail.com> (raw)
In-Reply-To: <D108F32273D3044F8C7B24328CB7713701A4D2@york.rivers.zai.com>
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.
next prev parent reply other threads:[~2008-03-25 14:23 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-25 12:34 Sanders, Rob M.
2008-03-25 13:25 ` Bart Van Assche
2008-03-25 13:52 ` Sanders, Rob M.
2008-03-25 14:23 ` Bart Van Assche [this message]
2008-03-25 16:41 ` Ray Lee
2008-03-25 16:44 ` Sanders, Rob M.
2008-03-27 19:37 ` Sanders, Rob M.
2008-03-28 9:28 ` Ingo Molnar
2008-03-28 10:32 ` Sanders, Rob M.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e2e108260803250723k345a7387y117d9bcbcabf135c@mail.gmail.com \
--to=bart.vanassche@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=sanders-rob@zai.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®