Re: [PATCH] vhand-2.1.63

Zlatko Calusic (Zlatko.Calusic@CARNet.hr)
14 Nov 1997 20:52:12 +0100


Rik van Riel <H.H.vanRiel@fys.ruu.nl> writes:

> Hi there,
>
> Immedately after the release of 2.1.63 I upgraded the
> vhand patch to this new version.
> In short, the patch does the following things:
> - better aging on swappable pages
> - introduction of page-aging for buffers, cached pages and
> (starting with this version) shared memory
> - alleviating the pressure on kswapd by making sure that there
> is always something ready to swap out. It also acts as a
> safeguard for kswapd. If kswapd bails out because of too many
> consecutive failures, vhand will get called and it will make
> sure that there will be pages ready to swap out very soon
>
> ie. this patch improves swapping/paging performance quite a bit,
> and (by fairer aging) also balances the various usages of memory
> more fairly....
>
> Because it doesn't do anything strange or critical, it can be
> regarded as 'safe' for 'common household usage'. But then again,
> if your livelyhood depends on Linux you won't be running 2.1.63 :-)
>

Hi!

I did some testing with your patch and it looks very interesting.

I tested how long it takes to compile Linux kernel with and without
your patch, using MAKE=make -j10 (to make it swap).

(2.1.63)

645.05user 57.93system 14:58.99elapsed 78%CPU
(329363major+240410minor)pagefaults 42103swaps

(2.1.63 + vhand patch)

915.98user 66.63system 18:12.94elapsed 89%CPU
(280238major+237365minor)pagefaults 39048swaps

While it's obvious that with the patch it took less I/O operations
(paging) it also took more CPU time to complete.

I noticed that after kernel was running some time, it become quite
unresponsive (moving mouse in X and so.). And vhand kernel thread is
definitely burning too much CPU cycles (sometimes it uses up to 10% of
CPU!?):

0 2 1 13:10 ? 0:14 kflushd
0 3 1 13:10 ? 0:03 kswapd
0 4 1 13:10 ? 7:51 vhand <<--
0 11 1 13:11 ? 0:01 update

Bonnie also shows dropdown in performance (with vhand patch), but I'm
not completely sure if it's really related.

(2.1.63)

-------Sequential Output-------- ---Sequential Input-- --Random--
-Per Char- --Block--- -Rewrite-- -Per Char- --Block--- --Seeks---
Machine MB K/sec %CPU K/sec %CPU K/sec %CPU K/sec %CPU K/sec %CPU /sec %CPU
100 1963 95.0 5711 30.1 2235 24.5 2013 93.3 7191 33.6 59.2 2.8

(2.1.63 + vhand patch)

-------Sequential Output-------- ---Sequential Input-- --Random--
-Per Char- --Block--- -Rewrite-- -Per Char- --Block--- --Seeks---
Machine MB K/sec %CPU K/sec %CPU K/sec %CPU K/sec %CPU K/sec %CPU /sec %CPU
100 1116 84.7 5209 35.6 1811 30.6 1344 91.6 6184 56.8 59.6 3.8
???? ????

But, your idea is interesting and maybe with some tweaking it could
prove itself as a improvement.

Info for other potential testers: patch is completely stable.

My testing platform is P133, 32MB RAM.

Regards,

-- 
Posted by Zlatko Calusic           E-mail: <Zlatko.Calusic@CARNet.hr>
---------------------------------------------------------------------
	       God I want patience, and I WANT IT NOW!