Hi there, On Mon, 4 Jun 2001, Al Hooton wrote: > Corin Hartland-Swann wrote: > > On Mon, 4 Jun 2001, Luca Berra wrote: > > > On Mon, Jun 04, 2001 at 05:13:11AM +0100, Corin Hartland-Swann wrote: > > > > I have a different take on all this. If you're running a server which > > > > lots of RAM is there any point in swapping? Memory is so cheap nowadays > > > > that you can put the most obscene amount of RAM in anyway... > > > > > > uhm, you always need swap, so the kernel can swap out unused pages and free > > > memory for more useful things (e.g. buffer cache) > > > > > > i have 512Mb ram on my home system and i swap even without X > > > > Agreed - the kernel will always swap out a small amount of stuff. This is > > a sensible course of action, but in my experience it only adds up to a few > > megs (5 or so). > > > > My point is that the cost of 5M RAM is about $1.50, so you might as well > > do without swap if it's going to cause you any problems (like the above). > > > > What I really hate is the recommendations that you should always have > > twice as much swap as main memory. I recently tried out FreeBSD on a box > > with 4096M RAM. When I hit auto-allocate (or some such) it gave me 8192M > > swap! As soon as main programs head into swap thrashing ensues and your > > server goes to hell :( > > Here's an approach to satisfy both camps: set up a ramdisk in that > cheap memory, and swap to that. It's fast, and it keeps the kernel > happy. Disclaimer: I haven't tried this yet, although it's on my list > of things to do sometime just to see how it works... The reason that the kernel swaps things out is because they are not being used. This is entirely sensible, and frees the memory up for use in the buffer cache or other processes. My point was that for most servers, the amount of memory which isn't being used is tiny, and since memory is so cheap you might as well just put more in. I have nothing against swap in principle, it's just that on the average server I deal with you only need a few MBs of it. There isn't any point in swapping to a ramdisk - you'd be better off without any swap at all... you'd just be creating extra overhead in the VM subsystem. Regards, Corin /------------------------+-------------------------------------\ | Corin Hartland-Swann | Tel: +44 (0) 20 7491 2000 | | Commerce Internet Ltd | Fax: +44 (0) 20 7491 2010 | | 22 Cavendish Buildings | Mobile: +44 (0) 79 5854 0027 | | Gilbert Street | | | Mayfair | Web: http://www.commerce.uk.net/ | | London W1K 5HJ | E-Mail: [EMAIL PROTECTED] | \------------------------+-------------------------------------/ - To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to [EMAIL PROTECTED]
