xlock too slow to wake up

Paul Smith paul at mad-scientist.net
Fri May 18 16:40:58 UTC 2012


On Fri, 2012-05-18 at 18:22 +0200, oxy wrote:
> i just checked it again. I have
> 
> 8G RAM
> 2x 16G swap

Yikes!  32G!  That's WAY WAY WAY too much swap.

For an 8G RAM system I would recommend NO MORE THAN 4G swap.  Total.
Unless you have unusual requirements for the system (kernel development,
where you're taking kernel panic cores, suspend to ram, etc. are
situations where you need lots of swap).  Normal usage for a desktop and
user-space development definitely doesn't need that much.

> I run everything on a raid lvl 2. So swap should be on it as well
> (thus only 16G).
> For some reason i left it out n i have now 32G. Maybe I'll disable one of them.

Even 16G is far too much swap IMO.

> Actually i even split the swap in each HD in 2 parts. In old times it would get
> swaping faster. So maybe i can reduce it to 8G. I also wanna upgrade to 16G
> RAM. Now its getting completely used:
> 
> Mem:   8158508k total,  7954992k used,   203516k free

You missed my comment:

> Don't worry about how much RAM is used; Linux will always use all the
> RAM it can.  The question is do you see much swap being used?

The fact that you have all your RAM used is fine, it just means Linux is
being efficient and not wasting resources, by using RAM to make disk
access faster, not getting rid of unused pages in case they're needed
again, etc.  You WANT all your memory to be used!  Don't buy more memory
just because Linux uses it all; you'll be forever buying more memory.

The question, as I said above, is how much swap is being used?  If your
RAM is all used but only 100M or so of swap is used, even during busy
times, then you're fine.  In fact, even if you have 1G or so of swap
used (for a system with that much RAM) I would say you're fine.  If you
see you have 2-3G of swap used constantly then you might consider adding
more RAM, if your system feels slow/choppy (not in the morning, I mean
once you get it to a steady state).

There are other tools you can use to get a better idea of the "swap
churn", which is more of a problem them a lot of steady-state swap
content.  It's too technical to get into here though.





More information about the ubuntu-users mailing list