[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Swap configuration for 16GB of RAM, 8 cores



On Tue, Jul 31, 2007 at 08:18:09PM -0000, agenkin@gmail.com wrote:
> I am installing two servers, each with 16GB of RAM, two quad-core Xeon
> processors, and a SATA hard drive.  The machines will be compute
> servers, meaning lots of concurrently logged in users, each running
> an assortment of jobs, and various long-running processes.  The jobs
> will be
> vastly dissimilar with regards to using the memory, disk, and CPU, and
> to
> their run time, so the configuration should be generic, general
> purpose.
> 
> What are the current best practices with regards to swap partitions?
> Is it
> better to create one big, or several smaller swap partitions?  Is the
> rule
> of thumb still RAM*2 for the total size?
> 
> We are running Debian 4.0/Etch with the stock -i686-bigmem kernel.
> 

Try this:

Use LVM for everything.  Actually, grub may or may not work on LVM so
put a regular partition (32 MB is more than ample) at the start (sda1)
and the remainder of the disk as sda2, as physical device for LVM.  Then
set up your usual separate 'partitions' under LVM.  To be generous, this
means a / of 512 MB, a /usr of 4 GB, a /var  of 6 GB plus whatever other
stuff you need for your /var, a separate /srv if needed of whatever
size, and /home.   Your choice of filesystem is another matter; it
should be growable and reliable, shrinking is less of an issue.  I use
JFS.

Then put swap on LVM as well.  Since you may need to increase swap size,
and I don't know how to do that with the swap online, you may want two
swap partitions so that one can be off line for a couple of minutes.  

Total swap size depends on how much VM gets assigned.  Since disk space
is cheap you may want to start with RAM*2 so you could start with two 16
GB swap partitions.

Note, however, that I run amd64.  I don't know what the swap size limits
are on a Xeon.

In combination with your swap partitions, you could use swapd to
dynamically make swap files.  You can monitor their existance and as
needed, take a swap partition off-line (swapd should then automatically
increase swap-file size), increase it with LVM, mkswap again on that
partition, then swapon that partition.

Good luck,

Doug.



Reply to: