2007-05-29 19:53:44

by Antonino Ingargiola

[permalink] [raw]
Subject: Re: [ck] 2.6.22-rc3-ck1

Hi,

2007/5/27, Con Kolivas <[email protected]>:
> New test release:
>
> http://ck.kolivas.org/patches/pre-releases/2.6.22-rc3/2.6.22-rc3-ck1/
>
> This is a resync with newer -rc and contains the updated swap prefetch code.

With this patch there is a stunning difference with the no swap
prefetch case on my system. With previous SP the difference was
around 2 seconds, now is more than 7 seconds.

Swap Prefetch OFF
# ./sp_tester
Ram 776388000 Swap 514040000
Total ram to be malloced: 1033408000 bytes
Starting first malloc of 516704000 bytes
Starting 1st read of first malloc
Touching this much ram takes 1642 milliseconds
Starting second malloc of 516704000 bytes
Completed second malloc and free
Sleeping for 60 seconds
Important part - starting reread of first malloc
Completed read of first malloc
Timed portion 9089 milliseconds


Swap Prefetch OFF
# ./sp_tester
Ram 776388000 Swap 514040000
Total ram to be malloced: 1033408000 bytes
Starting first malloc of 516704000 bytes
Starting 1st read of first malloc
Touching this much ram takes 1635 milliseconds
Starting second malloc of 516704000 bytes
Completed second malloc and free
Sleeping for 60 seconds
Important part - starting reread of first malloc
Completed read of first malloc
Timed portion 1783 milliseconds


Regards,

~ Antonio


2007-05-29 19:59:56

by Antonino Ingargiola

[permalink] [raw]
Subject: Re: [ck] 2.6.22-rc3-ck1

2007/5/29, Antonino Ingargiola <[email protected]>:
[cut]
> Swap Prefetch OFF
> # ./sp_tester
> Ram 776388000 Swap 514040000
> Total ram to be malloced: 1033408000 bytes
> Starting first malloc of 516704000 bytes
> Starting 1st read of first malloc
> Touching this much ram takes 1642 milliseconds
> Starting second malloc of 516704000 bytes
> Completed second malloc and free
> Sleeping for 60 seconds
> Important part - starting reread of first malloc
> Completed read of first malloc
> Timed portion 9089 milliseconds
>
>
> Swap Prefetch OFF
> # ./sp_tester
> Ram 776388000 Swap 514040000
> Total ram to be malloced: 1033408000 bytes
> Starting first malloc of 516704000 bytes
> Starting 1st read of first malloc
> Touching this much ram takes 1635 milliseconds
> Starting second malloc of 516704000 bytes
> Completed second malloc and free
> Sleeping for 60 seconds
> Important part - starting reread of first malloc
> Completed read of first malloc
> Timed portion 1783 milliseconds

The second case is clearly with swap prefetch *ON*, sorry.


~ Antonio

2007-05-30 01:04:49

by Con Kolivas

[permalink] [raw]
Subject: Re:swap prefetch improvements

On Wednesday 30 May 2007 05:59, Antonino Ingargiola wrote:
> 2007/5/29, Antonino Ingargiola <[email protected]>:
> [cut]
>
> > Swap Prefetch OFF
> > # ./sp_tester
> > Ram 776388000 Swap 514040000
> > Total ram to be malloced: 1033408000 bytes
> > Starting first malloc of 516704000 bytes
> > Starting 1st read of first malloc
> > Touching this much ram takes 1642 milliseconds
> > Starting second malloc of 516704000 bytes
> > Completed second malloc and free
> > Sleeping for 60 seconds
> > Important part - starting reread of first malloc
> > Completed read of first malloc
> > Timed portion 9089 milliseconds
> >
> >
> > Swap Prefetch OFF
> > # ./sp_tester
> > Ram 776388000 Swap 514040000
> > Total ram to be malloced: 1033408000 bytes
> > Starting first malloc of 516704000 bytes
> > Starting 1st read of first malloc
> > Touching this much ram takes 1635 milliseconds
> > Starting second malloc of 516704000 bytes
> > Completed second malloc and free
> > Sleeping for 60 seconds
> > Important part - starting reread of first malloc
> > Completed read of first malloc
> > Timed portion 1783 milliseconds
>
> The second case is clearly with swap prefetch *ON*, sorry.

Thanks very much for testing! The patch has been taken up by Andrew for the
next -mm.

どうも
--
-ck