Ram & swap, Was: [H-GEN] Linux & NTFS

ben.carlyle at invensys.com ben.carlyle at invensys.com
Mon Dec 16 20:21:43 EST 2002


[ Humbug *General* list - semi-serious discussions about Humbug and     ]
[ Unix-related topics. Posts from non-subscribed addresses will vanish. ]

G'day,





"Michael Anthon" <michael at anthon.net>
Sent by: Majordomo <majordom at caliburn.humbug.org.au>
16/12/02 21:14
Please respond to general

 
        To:     <general at lists.humbug.org.au>
        cc: 
        Subject:        Re: [H-GEN] Linux & NTFS


[ Humbug *General* list - semi-serious discussions about Humbug and     ]
[ Unix-related topics. Posts from non-subscribed addresses will vanish. ]

> > I ask is that 512MB of Swap is an awful lot. If you use the
> > rule of thumb of double the RAM as the Swap that is/was
> > common with smaller RAM sizes, this makes what I would
> > consider HUGE swaps. Any comments and suggestions would be
> > mostly welcome.

<snip>

> To answer your question, if you have a system with 256M of RAM and all 
you
> ever do is run it as a desktop using X and a couple of apps then you 
will
> probably never use any swap anyway.

On the other hand, tempfs is pretty cool. The idea of tempfs is that you 
get to share your virtual memory space between temporary files and "real" 
memory pages while still allocating space for swap. It has advantages in 
both directions. If you are using a large amount of memory, or the 
operating system decides to free some up to improve caching capability you 
get to use the allocated disk space as swap. If you've got plenty of ram, 
and a number of temporary files the tempfs concept means that the OS knows 
that they're temporary and very often will not actually write them to disk 
at all. They can just live in the available ram until the caching system 
of the OS decides that something else is better left in ram and that it 
should be pushed out to disk. This may even mean less wear on your disks, 
and will often mean that your temporary files are faster to access than 
they otherwise would be :) Of course, the temporary files will be lost on 
a reboot - but that's the way /tmp areas often traditionally work anyway.

In regards to Rob's email, I agree. It's good to give the operating system 
some room to move when it comes to caching and disk access policy. 
Providing swap areas can give it that space. While RAM has been getting 
cheaper and cheaper, it's worth noting that so has hard-drive space. As a 
percentage of the available hard-drive space 1-2x ram is still not a whole 
lot if the ram and hard-drive are of simpilar vinage ;) Personally I've 
usually gone for something like ram=swap on systems I've had opportunity 
to make such decisions about.

Benjamin.


--
* This is list (humbug) general handled by majordomo at lists.humbug.org.au .
* Postings to this list are only accepted from subscribed addresses of
* lists 'general' or 'general-post'.  See http://www.humbug.org.au/



More information about the General mailing list