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!
Notices
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.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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...
Distribution: Mandrake 9.1 at present but I keep formatting the disk and load different distros.
Posts: 13
Rep:
1 gb ram seems plenty. so from what i have heard, you dont really need a swap partition unless of course the install procedure is bent on asking for some swap space.
Originally posted by car313 1 gb ram seems plenty. so from what i have heard, you dont really need a swap partition unless of course the install procedure is bent on asking for some swap space.
car313
Its still in the best interest to create a swap partition, even if you have 4 GB of RAM... I would only recommend a 100 meg size swap at a minimum and maximum in all cases.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.