Re: Swap issue?



David L. Johnson wrote:
howa wrote:
Hi,

Some questions:

1. I have 4GB memory, people used to suggest I should set around 2GB
to 4GB for swap partition. But are there are drawback if I set a large
swap, e.g. 10GB (consider disk space is not a problem)

There is a limit to swap space, which I am sure someone will mention.
But, unless your machine is being used very heavily, by several people,
you are not going to need all this space. With 4G ram, almost any
single user machine will never need swap. Are you doing a lot of
rendering, or vector graphics?

In the old days, there was a 2 GByte limitation PER PARTITION on swap space.
I have run with 4 2 GByte swap partitions (each on a separate hard drive). I
no longer do that since I just do not need that much swap space. I sometimes
get the swap space use up to 50 Megabytes, but that happens less than once a
year. Usually it is under a megabyte. So now I am down to two 2 GByte swap
partitions, and I clearly could get by with one, or even none. But disk
space is so cheap I will probably keep them.

And it is true I never NEED swap. If I reboot the machine, I find it goes
without swap until overnight (when it does things like total file-system
backup that must read everything and write it to tape) when it tries to use
as much RAM as possible for the input cache.

--
.~. Jean-David Beyer Registered Linux User 85642.
/V\ PGP-Key: 9A2FC99A Registered Machine 241939.
/( )\ Shrewsbury, New Jersey http://counter.li.org
^^-^^ 06:15:01 up 2 days, 11:03, 5 users, load average: 4.18, 4.13, 4.09
.



Relevant Pages

  • Re: Swap partition size (future proofing)
    ... > the HDD or using mkswap to create a swap file in an existing partition. ... > Suggested swap partition sizes from the archives range from the same size as ... > the RAM to twice the size of the RAM. ... you start actually using the swap space. ...
    (Fedora)
  • Re: Problem with adding more swap !
    ... See the Handbook section titled "Swap Partition". ... you're best off giving it space on all of the disks. ... to the fastest ones for swap space. ...
    (freebsd-questions)
  • 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)