> I did some tests on 2.0.31-pre6 without and with your patch. Very promising.
> Setup: 64 MB RAM, 130 MB swap, SCSI AIC-7880, Dual P5-200, SMP kernel
>
> I am now going to make some speed measurements (make -j zImage running
> with/without bonnie) with/without your patch.
My df:
Filesystem 1024-blocks Used Available Capacity Mounted on
/dev/sda1 991108 722040 217869 77% /
/dev/sda3 3006907 1749971 1101442 61% /home
/dev/sdb1 3988103 3592225 189543 95% /scratch
make -j zImage was running on /scratch, as well as bonnie -s 150
bonnie -s 800 was running on /home. It was in multiuser mode, after killing
squid (no other memory hogs running)
OK, here are the results: make -j zImage
without patch: 6m36s with the patch: 6m46s
--------------------------------------------------
bonnie -s 150 & bonnie -s 800
WITHOUT:
Sat Aug 16 02:56:17 MET DST 1997
-------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
150 2350 41.3 2276 17.7 1470 23.1 4066 66.6 5397 33.5 44.9 3.5
-------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
800 2400 41.5 2937 17.4 1827 19.1 5863 76.3 6997 27.6 44.3 2.4
Sat Aug 16 03:21:25 MET DST 1997
WITH:
Sat Aug 16 05:53:15 MET DST 1997
-------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
150 2458 41.0 2487 18.3 1683 24.7 4147 68.3 5455 34.0 45..4 3.2
-------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
800 2461 42.0 2900 17.0 1818 18.8 5472 71.0 7415 30.4 44.7 2.5
Sat Aug 16 06:18:20 MET DST 1997
-----------------------------------------------------------------------------
make -j zImage during single bonnie -s 800
without: 9m47s with the patch: 9m29s
-----------------------------------------------------------------------------
mbonnie -s 800, during first 9 minutes make -j zImage running
WITHOUT:
Sat Aug 16 03:23:05 MET DST 1997
-------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
800 1524 27.2 2909 17.5 1758 20.1 5878 75.8 6864 27.8 43.5 2.4
Sat Aug 16 03:51:49 MET DST 1997
WITH:
Sat Aug 16 02:18:33 MET DST 1997
-------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
800 1557 28.1 2897 17.2 1815 20.4 4802 62.3 6947 28.1 45.7 2.5
Sat Aug 16 02:47:21 MET DST 1997
-- TomaszP.S. I was getting less "CNGFP" when running bonnie together with make -j zImage without the Gadi's patch (with the patch no errors at all). It looks like it helps flushing the buffers or steals CPU so bonnie can not write so fast :-) I have used standard values in /proc/sys/vm/freepages for all the tests.
May be this patch is an overkill? I would be for some more "soft" solution. What about changing *probabilities* of certain actions depending on the amount of free RAM and number of dirty buffers using some simple formula ?