[nylug-talk] if I have 64GB of RAM, how much swap do I really need?
H. G.
tekronis at gmail.com
Fri Aug 31 11:30:57 EDT 2007
On 8/31/07, Peter C. Norton <spacey-nylug at lenin.net> wrote:
>
> On Fri, Aug 31, 2007 at 10:37:25AM -0400, Heow Eide-Goodman wrote:
> >
> > It's a nice box SunFire x2200, SATA HDs and 64GB of RAM.
> >
> > It'll be used as a in-memory DB server (hence the large amount of RAM),
> > but how much swap would you suggest? Seriously, simply accessing 96 to
> > 128GB of disk-space will take _time_
>
> At work, we've been investigating the behavior of swap on solaris and
> linux, and there are some painful realities. The rule, especially for
> a database server, would be this:
>
> 1) Don't size the database to more than 85% of the memory in the
> box. The kernel will need a lot of the remaining space to do
> accounting for shared memory and similar things.
>
> 2) Make sure you don't swap. Swapping is OK for small processes, but
> for any processes or memory region > than about 100mb, you're going
> to incurr performance penalties on swapin. The behavior you should
> expect is to be able to swap back in one page (4k) per revolution
> of the disk as a worst case, with a realistic rate of about 10/rev.
>
> 3) Allocate as little swap as possible so something large that you
> care about doesn't actually swap out.
>
> Swap design hasn't kept up with the groth into multi-gb processes, and
> is still generally based on page sizes that are too small to make its
> use effecient.
>
> Some guidelines a couple of years back was to have 1x swap on larger
> systems, and no more, just so that the VM could reserve that swap when
> memory was allocated, but you never actually want any of that to be
> used when you're running in production.
>
> -Peter
>
> --
> The 5 year plan:
> In five years we'll make up another plan.
> Or just re-use this one.
>
>
> _____________________________________________________________________________
> Hire expert Linux talent by posting jobs here :: http://jobs.nylug.org
> The nylug-talk mailing list is at nylug-talk at nylug.org
> The list archive is at http://nylug.org/pipermail/nylug-talk
> To subscribe or unsubscribe: http://nylug.org/mailman/listinfo/nylug-talk
>
:D He'll be needing one of these(1) for swapping. :D
1: http://techreport.com/articles.x/9312/1
More information about the nylug-talk
mailing list