Recommended SWAP space for large amounts of ram (8GB)

Jonathan Vomacka juvix88 at
Thu Sep 15 15:37:02 UTC 2011

Thanks Matthew / Michael for your responses on this.

On 9/14/2011 2:51 PM, Matthew Seaman wrote:
> On 14/09/2011 18:27, Michael Sierchio wrote:
>> On Wed, Sep 14, 2011 at 6:55 AM, Matthew Seaman
>> <m.seaman at>  wrote:
>>>> ... In these days of plentiful RAM, the new rule of thumb is "if you're
>>>> swapping, then you're doing it wrong."
>> I think your response follows the excellent pedagogical principle: "a
>> little inaccuracy saves a lot of explanation."  But... disk is still
>> (by far) the cheapest commodity, and the opportunistic paging
>> algorithm manages VM very well.  VM is not by any means obsolete, and
>> seeing paging behavior is not a sign of a misconfigured system.
> Well, yes.  I was certainly glossing over a lot of complexity -- but I
> would maintain that I am fundamentally correct.
> Having some pages swapped out is absolutely not a problem.  True.  In
> fact, it's a positive benefit: swapping out memory pages that are
> exceedingly rarely referenced makes more room in RAM for more actively
> used pages.
> On the other hand, having pages continually swapping in and out
> definitely is a problem in terms of performance, given that disk IO
> takes of the order of milliseconds, while reference to main RAM is of
> the order of microseconds or less.  Orders of magnitude faster.
> Now, while disk may well be the much the cheapest storage medium
> available, that's only part of the expense.  In fact, up-front capital
> expenditure on the kit (perhaps several thousand pounds/euros/dollars)
> is outweighed by the operational expense (power, cooling, hardware
> support etc.) over the life of the equipment, so spending a bit more
> (capex) on components that run at lower power (opex) makes a lot of
> sense.  Even more, if the server is being used for eg. e-Commerce, then
> the volume of the transactions and the data processed by the server
> makes all the difference to your margin: the more you can do with the
> same hardware - viz, the more efficiently and faster you can make the
> hardware run - then the more profit you make.  Buying more RAM is
> peanuts on that scale.
> 	Cheers,
> 	Matthew

More information about the freebsd-questions mailing list