Swap partition size (future proofing)
Thomas Cameron
thomas.cameron at camerontech.com
Tue Feb 1 15:39:04 UTC 2005
----- Original Message -----
From: "David Fletcher" <fm_maillists at ntlworld.com>
To: <fedora-list at redhat.com>
Sent: Tuesday, February 01, 2005 2:22 AM
Subject: Swap partition size (future proofing)
>
> I've just ordered the parts to build a new PC :)
>
> The motherboard (Intel D865PERL) has four memory module sockets which can
> take
> a total of 4G RAM.
>
> I have ordered a single 1G memory module, leaving me plenty of scope to
> expand
> the memory later if I want to.
>
> Searching the Fedora List archive, I found various suggestions for
> increasing swap space by either adding a partion if there is unused space
> on
> the HDD or using mkswap to create a swap file in an existing partition.
> Hard
> drive space is fairly cheap these days so I want to set it up "right first
> time" so that I don't have to mess about if (when) I add more memory
> later.
>
> Suggested swap partition sizes from the archives range from the same size
> as
> the RAM to twice the size of the RAM.
>
> Given that I'm going to start with 1G of RAM, but could (but maybe won't)
> end
> up with 4G of RAM, I'm thinking that maybe 6G would be a sensible size for
> the swap partition.
>
> What do the members think?
>
> Thanks,
>
> Dave Fletcher
Dave -
The amount of swap you need can be determined by one thing: How much memory
are you going to use on a regular basis, and how much physical memory do you
have? How much more memory do you need than the amount of physical memory
installed?
In other words, if you are going to be running a desktop PC, I can't imagine
that you will regularly have more than 1GB of processes running which need
physical memory. For a desktop PC you will likely be running your window
manager, some apps like a web browser, an office productivity suite, maybe a
graphics program such as the GIMP, maybe you'll be running a compiler now
and then, and you'll have the network stack loaded. I don't see that you
will come near the 1GB memory capacity you have. You'll likely never touch
swap, so you don't really need a big, wasteful swap file.
Now if you were running a compute server, where numerous people were logged
in concurrently and all of them were running big compiles or
memory-intensive programs, then I could see that it might be realistic to
expect that more than 1GB of memory is going to need to be used at the same
time. You might have more stuff going on than you have physical memory, and
you'd want a healthy swap file.
In my case (and I have exactly the same motherboard, BTW), I am ruuning the
motherboard in a lightly loaded web/mail/dns/ftp server. I have 2GB memory
and a 1GB swap file. I *never* touch swap - the machine simply doesn't have
enough going on to ever need to page information out of physical memory to
the swap file:
[thomas.cameron at mail ~]$ free
total used free shared buffers cached
Mem: 2075228 1843364 231864 0 281348 981732
-/+ buffers/cache: 580284 1494944
Swap: 917968 0 917968
So the real answer is: what are you doing with the machine?
Thomas
More information about the fedora-list
mailing list