[PC-BSD Testing] Swap and root partition sizes... wtf?

Kris Moore kris at pcbsd.org
Thu Aug 25 06:09:42 PDT 2011

On 08/24/2011 21:41, Arthur wrote:
> On 08/24/2011 2:41 PM, Kris Moore wrote:
>> On 08/24/2011 15:37, Bruce Cran wrote:
>>> On 24/08/2011 20:36, Jamie Ivanov wrote:
>>>> 2*mem was the rule of thumb 10 years ago. I've run bsd from 486's to
>>>> multi-core xeon servers, I have *never* used more than 1G swap. Back
>>>> in those 486 days the rule of thumb applied. But still, 9G of swap?
>>>> Its simple to incorporate your "rule of thumb" with a logical limiter
>>>> so nobody waste 9G on swap. With 4G of ram, I doubt swap will ever be
>>>> used, it hasn't yet.
>>> I have a machine with 16GB RAM and would be rather disappointed if I
>>> saw that 32GB of disk space was used for swap :)
>> What do you think the upper-limit should be on SWAP then? 2/4 or higher?
> Kris,
> <2 Cents>
> The fixed swap size for Unix *is* a vestige of the olden days and it 
> doesn't afford the luxury of dynamic adjustment like Windows does 
> (i.e., System Managed size). The old Microsoft rule used to be swap 
> should be fixed at 1.5*(Physical) RAM but that was back in the days 
> when systems had 256MB to a gig. Here in the 21st century, Microsoft 
> is using System Managed swap sizes by default but the average RAM in 
> today's machine is 4-8GB. However, I do still see swaps following the 
> 1.5*RAM rule more or less.
> The reality is: 1) RAM is cheap and plentiful, 2) HD space is cheap 
> and plentiful (SSDs aside). While it's nice to drop an install onto an 
> aging old dinosaur with 256MB RAM and get the warm fuzzy feeling in 
> one's stomach, that, I feel, is a niche market, proverbially speaking. 
> I don't know about you but I see a lot of dropping of i486 support in 
> favor of i686. So, target what is 2-3 years old and I think it will 
> stand.
> I don't know what or if there is a magic formula, but if it could be 
> scripted to detect, say, 0-512MB RAM = 128MB swap, 512-1GB RAM = 256MB 
> swap, 1GB-2GB RAM = 512MB swap, 2-4GB RAM = 1GB swap, 4-8GB RAM = 2GB 
> swap, 8GB+ 4GB swap. Anything more I think is excessive. If you have 
> 8GB+ of RAM, you won't be swapping much I would think. That is more 
> than enough RAM or suffice for even the hungriest of apps. Is there 
> anything out there app-wise that would minimally require 8GB? If so, 
> that would be far and outside the scope of PC-BSD, no?
> </2 Cents>
> Arthur

Well the caps I have in place I think will work well to keep it from 
becoming overkill, but don't forget we have a daemon as well which 
monitors swap usage and can add more on the fly :)

Kris Moore
PC-BSD Software

More information about the Testing mailing list