mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Kacper Wysocki" <kacperw@online.no>
To: linux-kernel@vger.kernel.org, ck@vds.kolivas.org
Subject: Re: [ck] Swap prefetch tester
Date: Tue, 15 May 2007 22:04:10 +0200	[thread overview]
Message-ID: <367a23780705151304s49734da1u778ab1ea96b3e9ed@mail.gmail.com> (raw)
In-Reply-To: <200705141217.57142.kernel@kolivas.org>

On 5/14/07, Con Kolivas <kernel@kolivas.org> wrote:
> On Monday 14 May 2007 12:10, Con Kolivas wrote:
> > I've had a few requests for a standalone patch implementing swap prefetch
> > for mainline.
> >
> > Here is a patch that is a current rollup that should apply and work for
> > vanilla 2.6.21 (ie not a -ck kernel):
> >
> > http://ck.kolivas.org/patches/swap-prefetch/2.6.21-swap_prefetch-38.patch

> Oh and here is the swap prefetch tester:
> http://ck.kolivas.org/patches/swap-prefetch/sp_tester.c

Some results on my 5-year-old dual AMD2400+ with 1GB mem:
***This one done while in X, 2.6.21.1-reiser4-ck1, sp ON
Ram 1034228000  Swap 1959920000
Total ram to be malloced: 1551342000 bytes
Starting first malloc of 775671000 bytes
Starting 1st read of first malloc
Touching this much ram takes 6333 milliseconds
Starting second malloc of 775671000 bytes
Completed second malloc and free
Sleeping for 600 seconds
Important part - starting reread of first malloc
Completed read of first malloc
Timed portion 103277 milliseconds

***This one done while in X, 2.6.21.1-reiser4-ck-sp38, sp ON
Ram 1034228000  Swap 1959920000
Total ram to be malloced: 1551342000 bytes
Starting first malloc of 775671000 bytes
Starting 1st read of first malloc
Touching this much ram takes 11674 milliseconds
Starting second malloc of 775671000 bytes
Completed second malloc and free
Sleeping for 600 seconds
Important part - starting reread of first malloc
Completed read of first malloc
Timed portion 24660 milliseconds

...a nice order of magnitude better! Very happy you fixed this Con.
But the time to touch was so different (11674 vs 6333ms) that I
decided to get out of X, and also check the difference when SP is off.
# ./sp_tester; echo 0 > /proc/sys/vm/swap_prefetch ; ./sp_tester


***This one done in the console at runlevel 2, 2.6.21.1-reiser4-ck-sp38, sp ON
Ram 1034228000  Swap 1959920000
Total ram to be malloced: 1551342000 bytes
Starting first malloc of 775671000 bytes
Starting 1st read of first malloc
Touching this much ram takes 5709 milliseconds
Starting second malloc of 775671000 bytes
Completed second malloc and free
Sleeping for 600 seconds
Important part - starting reread of first malloc
Completed read of first malloc
Timed portion 22243 milliseconds

***This one done in the console at runlevel 2, 2.6.21.1-reiser4-ck-sp38, sp OFF
Ram 1034228000  Swap 1959920000
Total ram to be malloced: 1551342000 bytes
Starting first malloc of 775671000 bytes
Starting 1st read of first malloc
Touching this much ram takes 5816 milliseconds
Starting second malloc of 775671000 bytes
Completed second malloc and free
Sleeping for 600 seconds
Important part - starting reread of first malloc
Completed read of first malloc
Timed portion 28641 milliseconds

Have I understood correctly that there are more prefetch improvements
in ck2 than just the sp38 patch?

I'll post more results if I ever manage to tear myself from the
computer for 10 minutes when I'm home - it looks like I have a yiff
daemon running at 7% cpu all the time which might have affected the
results.

Speaking of "feel", the net effect of swap prefetch for me seems to be
that I don't notice it - that is, I don't notice my programs behaving
sluggishly when I come back to the computer. Excellent!

-K

  reply	other threads:[~2007-05-15 20:04 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-14  2:10 Standalone swap prefetch patch for mainline Con Kolivas
2007-05-14  2:17 ` Swap prefetch tester Con Kolivas
2007-05-15 20:04   ` Kacper Wysocki [this message]
2007-05-17  9:26     ` [ck] " Con Kolivas
2007-05-15 14:45 ` Standalone swap prefetch patch for mainline Brad Campbell
2007-05-15 15:18   ` Paolo Ciarrocchi
2007-05-15 15:47     ` Brad Campbell
2007-05-15 16:13       ` Paolo Ciarrocchi
2007-05-17  9:20   ` Con Kolivas

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=367a23780705151304s49734da1u778ab1ea96b3e9ed@mail.gmail.com \
    --to=kacperw@online.no \
    --cc=ck@vds.kolivas.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

all inboxes | Powered by JetHome®