Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
I've got 1GB 2700 ddram and a crap load of unpartitioned space. I reading alot of things that claim with that much ram, I don't need a swap drive, but could it really hurt? With programs growing in size, I'd feel safer with a "back-up" swap drive, and I'm just wondering how big I should make the partition... half, equal or twice the ram size seems to be the obvious options...
I've got 1GB of RAM on my rig with a 256Mg swap file. The swap file hardly ever gets touched, and when it does, it's a very minimal impact. The way I look at it is with the large drives these days, a couple hundred meg won't make much difference one way or the other, but at the same time, why waste space unnecessarily. From what I've seen, and what other posters have noted, is that the "double the RAM" guideline is obsolete, and generally either 256Mg or 512Mg of swap ought to be sufficient no matter how much RAM you've got.
All I can say is that for me, 256Mg has been way more than enough. -- J.W.
Since you have 1GB of RAM I doubt that the swap would even be used that much, no matter what you use that system for. You should be able to set it to around 50MB and not feel any loss of performance. Mind you, that's a safe figure, you could probably go lower. If you find out that you do need a larger swap there are ways to work out how large it has to be.
The amount of swap you need depends on what you're using it for and how much Memory you have. You can usually work out how much you need by estimating how much memory is required in total (physical & virtual) and subtracting the amount of physical Memory you currently have. The remainder is what your Swap size should be. It's good for system performance if you can hit that 'sweet spot', since a swap that's too large will be slower to read & write to at times, and that's a bad thing.
Estimating how much you need in total is the hard bit, since you never really do the exact same thing ALL the time on systems such as workstations or multimedia machines. You have to work out what the worst case scenario is regarding ram requirements and set the swap so it can deal with it if need be. If you have no idea what the amount you require is, your best bet is to over-estimate and set the swap, test it out by running your system under load, and then resizing it to a smaller size if you feel that your system wouldn't lose any performance.
Last edited by robotoverflow; 10-11-2003 at 11:45 AM.
Well it depends on what you're doing I guess. If you're playing games (like Quake 3, etc) or multitasking like crazy, then yeah, going overboard with the size can effect your performance. There's an article at www.adriansrojakpot.com that goes into detail about swap file optimisation. I can't remember if it covers swap files in linux but it should still be very relevent.