Swap partition size (future proofing)

James Wilkinson james at westexe.demon.co.uk
Tue Feb 1 17:32:18 UTC 2005


David Fletcher wrote:
> 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.

Congratulations!

You've been given lots of advice. One other thing to bear in mind...

Most of the programs you use will only be able to use up to 3 GB of
memory + swap each. So you'll need 3 maxxed-out processes to use 10 GB
of memory and swap.

You will (presumably) be getting a 32 bit Pentium 4: as I understand it,
the only Intel x86-64 processors currently available are Xeons. Intel
are planning 64 bit Pentium 4s, but I doubt that they'll use the mPGA478
socket on your motherboard.

With 32 bits, and without PAE, a process can address up to 4 GB of
virtual memory. That includes the real memory it's using, swap space,
memory mapped files, shared memory, and as-yet unused memory that will
only be backed by something physical if it is ever used.

With the 4G+4G patch to the Linux kernel, this was nearly all available
to the process. This has been turned off in recent Fedora kernels:
instead 1 GB of that address space has been reserved for the kernel,
leaving 3 GB for processes.

Um: to clarify: that 3 GB is a size, not an indication of where it's
located. On a suitably configured box, it might all be located beyond 10
GB in physical RAM and on the swap file. But there can't be more than 3
GB of it.

A program can *sort-of* get round this by using PAE. But for this to
work, the program *source* itself has to be written with PAE in mind.
That's rarely done.  It's useful for big databases, where accessing
memory through PAE merely has to be faster than disk accesses, but it's
not really for general programming.

You're just at the edge of where not having 64 bit support still makes
sense.

James.

-- 
James Wilkinson       | Five miles as the hippopotamus bounces...
Exeter    Devon    UK | 
E-mail address: james | 
@westexe.demon.co.uk  | 




More information about the fedora-list mailing list