From: Andrew Morton <akpm@digeo.com>
To: "Paolo Ciarrocchi" <ciarrocchi@linuxmail.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [BUG ? in 2.5.68] time and sleep...
Date: Wed, 30 Apr 2003 14:10:15 -0700 [thread overview]
Message-ID: <20030430141015.16dfe47a.akpm@digeo.com> (raw)
In-Reply-To: <20030430195748.18712.qmail@linuxmail.org>
"Paolo Ciarrocchi" <ciarrocchi@linuxmail.org> wrote:
>
> for i in `seq 1 1 600`;
> do
> time sleep 1
> done;
>
> Then I've run it in background and then I've run 'dbench 32'.
> ...
> 0:01.16elapsed <-
> 0:02.84elapsed <-
Yup, that's expected. Normally the time command gets everything it needs
out of pagecache. Sometimes it needs to go to disk, and gets whacked by
other disk activity.
It can be regenerative too: `time' gets throttled in the page allocator.
This creates a larger time window in which the pages which it needs get
reclaimed. So it has to read things from disk. Which takes more time, so
more of its pages are reclaimed. And for each page which was reclaimed,
`time' needs to allocate memory, so it gets throttled again...
So you see it feeds on itself. What is normally a few millisecond delay
becomes a many-second delay.
There are probably games we can play in the page allocator to fix this up:
identifying heavy page allocators and preferentially stalling those.
Tricky to get right.
prev parent reply other threads:[~2003-04-30 21:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-04-30 19:57 [BUG ? in 2.5.68] time and sleep Paolo Ciarrocchi
2003-04-30 21:10 ` Andrew Morton [this message]
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=20030430141015.16dfe47a.akpm@digeo.com \
--to=akpm@digeo.com \
--cc=ciarrocchi@linuxmail.org \
--cc=linux-kernel@vger.kernel.org \
/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