Re: Opinions re: Sun OS disk caching with KAIO, On or Off?
Posted in 1998
In article <6utpef$sah$1@nnrp1.dejanews.com>, dmoeller@geocities.com () wrote: > Hello, > > For those of you using Sun boxes out there with Informix, help. Using > 'top' > recently I was looking at the memory free on our Sun E4000 (Solaris > 2.5.1) and > noticed that it was: > > Memory: 2048M real, 32M free, 52M swap in use, 972M swap free > > Notice the 32M free? After I reboot and bring all the instances back > up that > number is 900M. Then over a period of time (with no new shared memory > segments being added) it goes back down to 32M. I have found that this > is > due to Sun's disk caching. Well with KAIO turned on it seems > unnecessary and > Informix could make good use of the 868M of memory. So can you turn off > Sun's disk caching? Should you? Has anyone done it and run the system > to see > the difference? The sole function of this machine is a database > server... > > Thanks very much for any info, > > Dave. > > -----------== Posted via Deja News, The Discussion Network ==---------- > http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own > > You need to get hold of Adrian Cockcroft's books and a copy of the Magic Garden (it tells you how Unix works). The paging process will not care about the amount of free memory it has if is above certain thresholds. What you are seeing is the paging process maintaining the free memory list at 'lotsfree' ie every second it checks to see if the free list is below the lotsfree limit, if it is then it will start reclaiming pages based on a MRU algorithm, if the memory continues to fall and reaches 'desfree' then the paging process kicks in a 4 times a second and starts being aggressive. Finally of you get to the GPGSLO (?) level, typically less than 3% free, then it will start swapping processes out. With the amount of memory you have you should never ever see swapping. BTW you never swap vnode pages, you only swap anonymous pages. If the pager process decides it needs the memory that a vnode page holds the page is just overwritten. When the page is required later by the process it goes back to disk/file cache You will see a reasonable amount of paging when a process first starts, and you will see the swap areas decrease. This swap is not being used, nothing is being moved to swap - all that is happening is swap is being reserved. If the process can not reserve the swap in needs then it will fail. Remember swap is a two phase process, reservation - happens when the process starts, and allocation - very rarely happens. The swap in use you are seeing is not 'really in use' just reserved. You can tune the file system caching, but why bother. If you scan rates are low and the demand paging is not constantly high you are not short on memory. Paul Watson # I don't suffer from WF Software Ltd. # stress, I'm just Tel. (+44) 1436 674729 # a carrier Fax. (+44) 1436 678693 # www.wfsoftware.co.uk