[ale] how do I increase Linux swap file size?

Michael Trausch mike at trausch.us
Mon Jan 17 19:09:50 EST 2011


First off: the 2x rule has long since been outdated.  It made sense back
when swap was something you'd regularly need, and can still make sense when
you are forced to work without enough RAM in the computer.  And if that is
the case then you probably need more than 2x.

As an example, if one were to attempt to install Ubuntu on a computer, I
would say that the system should have at least 4 GB of virtual memory
capacity available. That means that if you have 512 MB of primary storage,
you should allocate 3.5 GB of secondary storage to step in as RAM if needed.

If you have more than 4 GB of real RAM, then consider making your swap space
between 1 and 4 GB, unless you know for a fact that you require more. I
usually set aside one or two gigs, not even four.  Why? Because if you hit
swap with that much memory, there is almost universally a massive
problem---whether it is that more RAM is truly required or a runaway
process, the whole system will be brought to its knees thrashing, which will
always cost more than having enough RAM.

So, no, 2x on modern systems is just wasting disk.  (For that matter, most
end-user systems shouldn't even have a dedicated swap partition anymore; a
normal file works well for swap for many situations and can be easily
resized on demand.)

--
Sent from my HTC Vision (G2), running Gingerbread.
That is, a phone-like mobile device. :)
On Jan 17, 2011 5:22 PM, "Ron Frazier" <atllinuxenthinfo at c3energy.com>
wrote:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.ale.org/pipermail/ale/attachments/20110117/0eed8936/attachment-0001.html 


More information about the Ale mailing list