[SOLVED] How much swap space do I need for Linux Mint 64 bit?
Linux - DesktopThis forum is for the discussion of all Linux Software used in a desktop context.
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.
Distribution: Linux Mint "Mate" x64 (primary OS), Win 7/8 x64, XP Home/Pro x32.
Posts: 61
Rep:
How much swap space do I need for Linux Mint 64 bit?
I have a new desktop with Windows 7 64 bit installed. I'm used to older laptops with less RAM, what I did was make the swap partition as large as the installed RAM. But this desktop has 4GB RAM. Do I need that much swap space? If so, it's no problem, I have plenty of space. I'm running Linux Mint in a VM and would like to install it as a dual boot. I have the 64 bit edition ISO already downloaded and written to disc. Windows 7 is great for a lot of things, but security isn't as good as with Linux. At first, it was secure, now I'm being plagued with spyware and malware. Thanks in advance for any and all suggestions.
Click here to see the post LQ members have rated as the most helpful post in this thread.
With 4 GB of RAM you really don't need swap at all. I have been running my machines without swap for years once they go past 1 GB of RAM and have never had a problem. Older kernels needed the swap space even if it was never used, but this is no longer a problem.
Still, it can't hurt to put 512 MB or 1 GB aside for it just in case, especially if you have the disk space to burn.
Some people say you need double your existing ram for swap. While that is a good idea i think you should have a swap at least equal to your ram. Even though you will not need the virtual memory to run programs you still might need it in case of a core dump.
That entirely depends on what do you do. Those old rules of thumb makes me sick. Study your needs, see how much ram your programs use, increase the swap space as much as needed, see if performance is ok. If not, buy more ram. You can add swap in sparse files, no need for a partition any longer (and for a very very very long time now). You can just "swapon" as much swap files as you need.
ps. It's always a good idea to have a bit of swap, even if you have enough ram. The kernel can always put a bit of it to good use.
With 4 GB of RAM you really don't need swap at all.
It depends on what you're doing with your computer. I just finished running a simulation that used 21GB of memory on a computer that has 8GB. I certainly needed swap space.
Ordinary home users almost never run anything that would need swap space on a computer with 4GB. They probably run things that occasionally would be a little faster if they could use a little bit of swap space.
In the situation described, with the usual lack of details about what the computer will be used for, I would use 1GB or 2GB of swap space and check it on rare occasions to see if it gets used at all. If it does get used, I might by then get some better idea about memory use and know how much swap would be appropriate.
If you have zero swap space, you will find out whether you need swap space (such as running programs that just won't fit otherwise). But you won't find out whether you have situations in which the kernel thinks the use of swap space would make the system faster (by letting it keep recently accessed file mappings in ram instead of non recently accessed anonymous memory).
Quote:
Older kernels needed the swap space even if it was never used, but this is no longer a problem.
I never heard of that. I know (much painful experience) that Windows XP and earlier often need swap space in situations where the swap space won't actually get used. (I expect but don't know for sure that Windows 7 still has that flaw). The over commit rules in Linux can be tuned to make Linux also need swap space that it won't use. The default values of over commit settings make that behavior very rare (but still possible). I haven't read about any differences in that for new vs. older kernels.
Quote:
Still, it can't hurt to put 512 MB or 1 GB aside for it just in case, especially if you have the disk space to burn.
I would use that much even with a laptop computer or an ordinary size disk in an older desktop system.
We didn't ask how big the hard drive is. A decent 1000GB drive is only $80 at NewEgg, so I tend to assume new desktop computers will have far more disk space than they need (because it doesn't make sense to save a few dollars by estimating your disk space needs more carefully).
So there is little chance an ordinary home user with 4GB of ram needs more than 512MB of swap, but even less chance that an ordinary home user with a new excessive capacity disk drive will notice the lack of a few GB of disk space after "wasting" that on unnecessary swap space.
Storage is cheap, and time spent worrying about the right amount of swap will not be very rewarding. give it a few GB and move on with your life. (If you have issues, add more later)**.
On a laptop, you need Swap=RAM if you want it to hibernate.
**ALWAYS leave unpartitioned space to deal with changes like this.
Distribution: Linux Mint "Mate" x64 (primary OS), Win 7/8 x64, XP Home/Pro x32.
Posts: 61
Original Poster
Rep:
Thanks to all for your responses. Sorry about the lack of details as to what I use my PC for. I'm a typical home user who looks at the weather, check emails, shop online (which was my concern over security) and web browse. I don't play games or have any RAM hog apps. I installed Mint 8 64 bit with a 4GB swap, I don't want to have to change later. I'm truly impressed with the performance of Mint, since it's installed on it's own partition. The speed of the system almost swept me off my feet, it runs twice as fast as Windows 7 does, and there's no hesitation when you go to another web page. None whatsoever. I guess with all of the AV's you have to run with Windows is has a little to do with the slowness, but there's more to it than that. Mint 8 is extremely fast, plain & simple. This is my first 64 bit PC, and 4GB RAM makes it even more faster. Although I've been a long time Windows user, Linux has it's advantages (and disadvantages) over Windows. Gaming is a reported problem, but not my problem, as I'm not a gamer. Other problems are simply the OEM's lack of support for Linux, for the most part. Microsoft has a lot of cash and influence with the major OEM's, that's why the lack of support. But this is for another discussion, I do thank you all for your support towards me, it means a lot to me. Best wishes to all of you.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.