SCIENTIFIC-LINUX-USERS Archives

June 2012

SCIENTIFIC-LINUX-USERS@LISTSERV.FNAL.GOV

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
David Sommerseth <[log in to unmask]>
Reply To:
Date:
Sat, 23 Jun 2012 15:51:18 +0200
Content-Type:
text/plain
Parts/Attachments:
text/plain (30 lines)
On 06/22/2012 06:02 PM, t m wrote:
>
> As you thought I have no swap. Even at home I donīt use any with 8gigs RAM.
> I read it is faster.

Nah, having 2-4GB of swap available isn't a bad thing.  But you probably don't 
need much more.  In the old days the rule of thumb was 2*amount of RAM, but 
when you cross 4GB swap it's probably not that efficient.

The kernel tries to avoid swapping as much as possible.  And if you have 8GB 
RAM and 'free' shows you have a lot of free buffer memory almost constantly, 
the kernel won't think about the swap space at all.  But if the kernel needs 
to allocate a bigger buffer, it might spend some time swapping out idle 
processes which have not been doing much in a long time.

On one of my SL6.2 box which has been up for approx 14 days, got 8GB RAM and 
~2GB free in the buffers/cache segment.  That box have swapped out 34MB to disk.

The only time where swap can be a hassle is if you have a process which leaks 
memory and OOM killer gets into action.  With swap enabled, it will first fill 
up the swap before OOM killer starts to act.  And this will cause a lot of 
processes which normally needs to be in RAM to work well to be swapped in and 
out.  When this happens, the system gets slow.  But that's a symptom caused by 
a badly behaving process, not that swap makes the system generally slower.


kind regards,

David Sommerseth

ATOM RSS1 RSS2