Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Desktop
User Name
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.


  Search this Thread
Old 02-28-2010, 12:41 AM   #1
Registered: Aug 2009
Location: East Coast, USA
Distribution: Linux Mint "Mate" x64 (primary OS), Win 7/8 x64, XP Home/Pro x32.
Posts: 61

Rep: Reputation: 17
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.
Old 02-28-2010, 12:54 AM   #2
LQ Guru
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 357Reputation: 357Reputation: 357Reputation: 357
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.
Old 02-28-2010, 01:25 AM   #3
LQ Newbie
Registered: Feb 2010
Posts: 8

Rep: Reputation: 1
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.
Old 02-28-2010, 03:53 AM   #4
Gentoo support team
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,080

Rep: Reputation: 403Reputation: 403Reputation: 403Reputation: 403Reputation: 403
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.

Last edited by i92guboj; 02-28-2010 at 03:55 AM.
Old 02-28-2010, 07:59 AM   #5
LQ Guru
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191
Originally Posted by MS3FGX View Post
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).

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.

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.

Last edited by johnsfine; 02-28-2010 at 08:14 AM.
2 members found this post helpful.
Old 02-28-2010, 09:45 AM   #6
LQ Veteran
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 739Reputation: 739Reputation: 739Reputation: 739Reputation: 739Reputation: 739Reputation: 739
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.
2 members found this post helpful.
Old 02-28-2010, 12:23 PM   #7
Registered: Aug 2009
Location: East Coast, USA
Distribution: Linux Mint "Mate" x64 (primary OS), Win 7/8 x64, XP Home/Pro x32.
Posts: 61

Original Poster
Rep: Reputation: 17
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.
1 members found this post helpful.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Upgrade to 64 bit in Linux mint 8? newbie236 Linux - Newbie 6 02-05-2010 08:32 PM
bring more space to linux mint installed with wubi in same partition windows agustín arg Linux - Newbie 1 09-15-2009 02:23 PM
What is the recommended swap space for 32 bit Linux the_gripmaster Linux - Hardware 18 07-14-2009 07:46 PM
how much swap space is needed; how to increase swap space? johnpaulodonnell Linux - Newbie 5 03-23-2007 03:20 AM
How to disable swap space entry for a process (Sticky bit?) Pandamatak Linux - General 3 09-25-2006 06:17 PM > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 03:07 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration