Re: Recommended swap size for 4GB installed RAM



Ignoramus27712 wrote:
What would you say is optimal swap size for 4GB of RAM.

Also, can linux swap to flash drives? Is that a dumb idea in light of
the limited number of writes on flash drives?

thanks

i

It would depend critically on the tasks you intend to run together, and
those that run continuously, but perhaps in wait state (sleeping).

Some give formulae to figure this out, but they do not make sense to me. The
more memory a machine has, the less need for paging. I have 8 GBytes RAM and
none of it has ever been used (I allocated 8 GBytes of swap space).

When I had only 4 GBytes, a few hundred megabytes were used.

But if you are doing serious high resolution graphics or something, perhaps
more swap space would be needed.

On the other hand, if you really need much swap space, you are probably
paging too much and your system response time will be poor. In which case,
what you need is more RAM, not more swap space.

--
.~. Jean-David Beyer Registered Linux User 85642.
/V\ PGP-Key: 9A2FC99A Registered Machine 241939.
/( )\ Shrewsbury, New Jersey http://counter.li.org
^^-^^ 12:25:01 up 70 days, 23:53, 3 users, load average: 4.09, 4.13, 4.18
.



Relevant Pages

  • 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)
  • Summary swap rules.
    ... So it looks as if swap is mostly not used anymore and can be kept pretty ... Tim Bradshaw stated what I privately felt- that 1:1 swap to memory is ... so it's really only around for memory leaks and core dumps. ... think) which are written to swap space. ...
    (SunManagers)
  • Re: malloc does not return null when out of memory
    ... >> actual RAM and swap are exhausted. ... Having actually worked on the IRIX VM system, and on vswap ... Adding Virtual Swap Space ... You can create a normal file of larger than 0 length and allocate it as ...
    (freebsd-stable)
  • RE: Where do you put your swap partition?
    ... so I can mount /tmp on a tmpfs file system. ... it, hits the disk several times, even with a large buffer cache. ... don't have enough ram, you have to swap, but you're no worse off than ... disk and /var on a third, and have swap space defined on all three. ...
    (Debian-User)
  • Re: Is Greenspun enough?
    ... the swap copy can be liberated. ... This means that whatever swap space you configure nicely ... If you have a gigabyte of RAM, ... >gigabyte VM with one gigabyte of RAM, you need two gigabytes of disk ...
    (comp.lang.lisp)