Re: swap size for 2gb 2 processors?



General Schvantzkoph <schvantzkoph@xxxxxxxxx> wrote:
On Thu, 21 Dec 2006 11:22:22 +0000, Ron Hardin wrote:

How big should I partition swap for 2gb ram 2 processors? Planning
out a partition magic run on a 120 gb disk, sharing with windows XP.


The rule of thumb is 2 * RAM size, in your case that would be 4G. This is

There is no such rule of thumb for Linux, and *never* has been.
Use Google and learn something about it before you post false
statements.

Think for a bit what you are suggesting... If he has only 512 Mb
of RAM then he needs 1 Gb of swap? with 1 Gb of RAM he needs 2 Gb
of swap?? and with 2 Gb of RAM he needs 4 Gb of swap???

That's nonsense, because with 512Mb of RAM he has 1.5 Gb of
virtual memory, but with 2 Gb of RAM he has 6 Gb of virtual
memory! But in fact the *less* RAM one has, the *more* swap one
needs (for any given required virtual memory).

What if he *needs* a minimum of 3 Gb of virtual memory? That is
determined by what they system is *doing*, and has *nothing* to
do with how much RAM is equipped.

The way to determine how much swap should be used is to simply
subtract the size of physical RAM from the needed virtual
memory. Physical RAM used to be determined mostly by what could
be afforded, but today it is more a matter of what the
motherboard can hold. Note that swap may not be needed at all!

not a hard and fast rule but given how cheap disk space is there isn't
much reason to use less. BTW If I were you I'd get a second disk rather
than repartition your tiny 120G drive. Newegg is selling 320G Seagates for
$94.

--
Floyd L. Davidson <http://www.apaflo.com/floyd_davidson>
Ukpeagvik (Barrow, Alaska) floyd@xxxxxxxxxx
.



Relevant Pages

  • Re: [rfc] no ZERO_PAGE?
    ... For purely-RAM virtual memory the latency ... disk if you add swap to the picture. ... is slower, ram is faster. ...
    (Linux-Kernel)
  • Re: excessive swap-in time
    ... Trying to do it all with RAM is just inefficient. ... I find that does not work well when the swapping is caused by excessive I/O ... Or you could have 5 TB of swap space. ...
    (comp.os.linux.development.system)
  • SLUB 0:1 SLAB (OOM during massive parallel kernel builds)
    ... 2G of RAM, 1G of swap partition. ... DMA per-cpu: ... kill process 25286 score 188662 or a child ...
    (Linux-Kernel)
  • Re: swap size for 2gb 2 processors?
    ... Given that RAM and disk prices both follow similar pricing ... price for a swap partition has remained reasonably constant. ... to have more than 50 percent of virtual memory be swap space. ... Hence a 2:1 ratio of RAM to swap, which allowed virtual memory ...
    (comp.os.linux.misc)
  • Re: swap size for 2gb 2 processors?
    ... out a partition magic run on a 120 gb disk, ... The rule of thumb is 2 * RAM size, in your case that would be 4G. ... price for a swap partition has remained reasonably constant. ...
    (comp.os.linux.misc)