Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!snorkelwacker.mit.edu!bloom-beacon!eru!hagbard!sunic!mcsun!ukc!ox-prg!culhua!mike From: mike@prg.ox.ac.uk (Mike Spivey) Newsgroups: comp.os.minix Subject: Bigger buffer cache for PC MINIX Message-ID: Date: 2 Apr 91 12:11:28 GMT Sender: news@prg.ox.ac.uk Distribution: comp Organization: Oxford University Computing Laboratory, UK Lines: 50 Some time ago, I suggested enlarging the buffer cache of PC MINIX by putting part of it outside the FS address space. I've now done this, and will post some patches if there's enough interest -- send mail if you'd like them. If nothing else, a bigger cache reduces the need for more concurrency in the file system. Here are some rough timings for different MINIX configurations. Neither cache nor RAM disk affects the `user' or `system' times much, since the machine mostly runs the idle process while the disk i/o happens. So I've just shown the elapsed times. KERNEL REBUILD (root on hard disk) big cache 6:59 /tmp on ram disk 7:21 bare (no ram disk) 7:42 Total user+sys was about 6 mins for all three. FACTOR TEST (see code below) root and /bin on ram disk 27 sec big cache 33 sec /bin on ram disk 42 sec bare (no ram or big cache) 59 sec The code (with all programs in /bin): a=2 while test $a -le 100 do echo -n $a "= " factor $a a=`expr $a + 1` done The cache seems to be a big win because (a) you don't have to choose what binaries to put on it and (b) you don't run out of space till the hard disk is full -- the performance goes down more gradually. It works especially well when you run lots of little programs together, in true UNIX style. Some suggested that these mods would make the FS intolerably slow, because it would always be having to trap to the kernel to copy buffers around, but I haven't found that to be the case. With a little care, one can organise things so that directory blocks, etc., are put in buffers inside the FS address space, and ordinary data blocks are outside the address space, so the almost the only copying is to and from user space -- copying that is done anyway. -- Mike Spivey