Swap space

Glenn Dawson glenn at antimatter.net
Tue Nov 1 07:27:37 PST 2005


At 07:13 AM 11/1/2005, Vladimir Tsvetkov wrote:
> > Hi,
> >
> > I just bought 4 servers with 4 gigs of ram, the documentation
> > proposes to use 2 to 3 times the amount of ram for swap... I don't
> > think 12 gigs of swap would be useful lol, but do I really need to
> > put 4 gigs of ram. (It might be useful for kernel dump but...)
> >
> > What do you guys do with swap space in this scenario ?
>
>
>It depends on how big is the address space for your machines.
>32-bit machines can address 4GB of memory, so it's reasonable to use 2
>or 3 times the amount of RAM space (if you hawe 256MB or 512MB - the
>swap should be 768MB or 1GB), but if you have 32bit machines with 4GB
>of memory there is no need to use more than 4GB for swap.

That's not entirely true.  Each process gets a 4GB (virtual) address 
space to operate in.  With default settings, 1GB of that space is 
used for the kernel, and the remaining 3GB is available for the 
process to use.  If you have several processes that require close to 
their 3GB limit, they could quite easily consume 4GB of swap, and more.

-Glenn

>64-bit machines can address 2^64 bytes which is a very big address
>space, so you should use the guidelines in the documentation (FreeBSD
>Handbook).
>
>Best regards,
>Vladimir
>_______________________________________________
>freebsd-questions at freebsd.org mailing list
>http://lists.freebsd.org/mailman/listinfo/freebsd-questions
>To unsubscribe, send any mail to "freebsd-questions-unsubscribe at freebsd.org"



More information about the freebsd-questions mailing list