From: Christoph Lameter <clameter@sgi.com>
To: Andrew Morton <akpm@osdl.org>
Cc: torvalds@osdl.org, linux-kernel@vger.kernel.org,
linux-ia64@vger.kernel.org
Subject: Re: prezeroing V6 [2/3]: ScrubD
Date: Mon, 7 Feb 2005 16:49:37 -0800 (PST) [thread overview]
Message-ID: <Pine.LNX.4.58.0502071646170.29971@schroedinger.engr.sgi.com> (raw)
In-Reply-To: <20050207163035.7596e4dd.akpm@osdl.org>
On Mon, 7 Feb 2005, Andrew Morton wrote:
> Christoph Lameter <clameter@sgi.com> wrote:
> >
> > Adds management of ZEROED and NOT_ZEROED pages and a background daemon
> > called scrubd.
>
> What were the benchmarking results for this work? I think you had some,
> but this is pretty vital info, so it should be retained in the changelogs.
Look at the early posts. I plan to put that up on the web. I have some
stats attached to the end of this message from an earlier post.
> Having one kscrubd per node seems like the right thing to do.
Yes that is what is happening. Otherwise our NUMA stuff would not work
right ;-)
> Should we be managing the kernel threads with the kthread() API?
What would you like to manage?
------ Earlier post
The scrub daemon is invoked when a unzeroed page of a certain order has
been generated so that its worth running it. If no higher order pages are
present then the logic will favor hot zeroing rather than simply shifting
processing around. kscrubd typically runs only for a fraction of a second
and sleeps for long periods of time even under memory benchmarking.
kscrubd
performs short bursts of zeroing when needed and tries to stay out off the
processor as much as possible.
The result is a significant increase of the page fault performance even
for
single threaded applications (i386 2x PIII-450 384M RAM allocating 256M in
each run):
w/o patch:
Gb Rep Threads User System Wall flt/cpu/s fault/wsec
0 1 1 0.006s 0.389s 0.039s157455.320 157070.694
0 1 2 0.007s 0.607s 0.032s101476.689 190350.885
w/patch
Gb Rep Threads User System Wall flt/cpu/s fault/wsec
0 1 1 0.008s 0.083s 0.009s672151.422 664045.899
0 1 2 0.005s 0.129s 0.008s459629.796 741857.373
The performance can only be upheld if enough zeroed pages are available.
In a heavy memory intensive benchmark the system may run out of these very
fast but the efficient algorithm for page zeroing still makes this a
winner
(2 way system with 384MB RAM, no hardware zeroing support). In the
following
measurement the test is repeated 10 times allocating 256M each in rapid
succession which would deplete the pool of zeroed pages quickly):
w/o patch:
Gb Rep Threads User System Wall flt/cpu/s fault/wsec
0 10 1 0.058s 3.913s 3.097s157335.774 157076.932
0 10 2 0.063s 6.139s 3.027s100756.788 190572.486
w/patch
Gb Rep Threads User System Wall flt/cpu/s fault/wsec
0 10 1 0.059s 1.828s 1.089s330913.517 330225.515
0 10 2 0.082s 1.951s 1.094s307172.100 320680.232
Note that zeroing of pages makes no sense if the application
touches all cache lines of a page allocated (there is no influence of
prezeroing on benchmarks like lmbench for that reason) since the extensive
caching of modern cpus means that the zeroes written to a hot zeroed page
will then be overwritten by the application in the cpu cache and thus
the zeros will never make it to memory! The test program used above only
touches one 128 byte cache line of a 16k page (ia64). Sparsely
populated and accessed areas are typical for lots of applications.
Here is another test in order to gauge the influence of the number of
cache
lines touched on the performance of the prezero enhancements:
Gb Rep Thr CLine User System Wall flt/cpu/s fault/wsec
1 1 1 1 0.01s 0.12s 0.01s500813.853 497925.891
1 1 1 2 0.01s 0.11s 0.01s493453.103 472877.725
1 1 1 4 0.02s 0.10s 0.01s479351.658 471507.415
1 1 1 8 0.01s 0.13s 0.01s424742.054 416725.013
1 1 1 16 0.05s 0.12s 0.01s347715.359 336983.834
1 1 1 32 0.12s 0.13s 0.02s258112.286 256246.731
1 1 1 64 0.24s 0.14s 0.03s169896.381 168189.283
1 1 1 128 0.49s 0.14s 0.06s102300.257 101674.435
The benefits of prezeroing are reduced to minimal quantities if all
cachelines of a page are touched. Prezeroing can only be effective
if the whole page is not immediately used after the page fault.
next prev parent reply other threads:[~2005-02-08 0:49 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-01-21 20:29 A scrub daemon (prezeroing) Christoph Lameter
2005-01-27 12:15 ` David Woodhouse
2005-01-27 13:12 ` Robin Holt
2005-01-27 13:14 ` David Woodhouse
2005-01-27 17:02 ` Christoph Lameter
2005-02-08 11:31 ` Ralf Baechle
2005-02-02 15:32 ` Marcelo Tosatti
2005-02-02 19:05 ` Christoph Lameter
2005-02-02 16:31 ` Marcelo Tosatti
2005-02-02 21:31 ` Christoph Lameter
2005-02-02 21:39 ` David Woodhouse
2005-02-03 3:06 ` Rik van Riel
2005-02-03 23:39 ` Paul Mackerras
2005-02-04 0:59 ` Christoph Lameter
2005-02-04 5:30 ` Paul Mackerras
2005-02-04 6:26 ` Christoph Lameter
2005-02-04 6:43 ` Nick Piggin
2005-02-04 6:50 ` Christoph Lameter
2005-02-04 9:20 ` Paul Mackerras
2005-02-04 9:28 ` Andi Kleen
2005-02-04 17:02 ` Christoph Lameter
2005-02-04 22:25 ` Paul Mackerras
2005-02-02 21:00 ` Maciej W. Rozycki
2005-02-02 21:33 ` David Woodhouse
2005-02-07 19:30 ` prezeroing V6 [0/3]: Changes and overview Christoph Lameter
2005-02-07 19:31 ` prezeroing V6 [1/3]: clear_pages Christoph Lameter
2005-02-07 19:31 ` prezeroing V6 [2/3]: ScrubD Christoph Lameter
2005-02-08 0:30 ` Andrew Morton
2005-02-08 0:49 ` Christoph Lameter [this message]
2005-02-08 1:09 ` Andrew Morton
2005-02-08 1:15 ` Christoph Lameter
2005-02-08 1:35 ` Andrew Morton
2005-02-08 16:11 ` Christoph Lameter
2005-02-08 20:27 ` Andrew Morton
2005-02-08 20:51 ` Christoph Lameter
2005-02-08 23:32 ` cliff white
2005-02-07 19:32 ` prezeroing V6 [3/3]: Altix SN2 Block Transfer Engine Zeroing Driver Christoph Lameter
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=Pine.LNX.4.58.0502071646170.29971@schroedinger.engr.sgi.com \
--to=clameter@sgi.com \
--cc=akpm@osdl.org \
--cc=linux-ia64@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@osdl.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
all inboxes | Powered by JetHome®