Re: Swap usage always goes up - never down

From: Michael Heiming (michael+USENET_at_www.heiming.de)
Date: 08/19/05


Date: Fri, 19 Aug 2005 17:57:25 +0200

In comp.os.linux.misc Chris <ithinkiam@gmail.com>:
> Michael Heiming wrote:
>> In comp.os.linux.misc Chris <ithinkiam@gmail.com>:
>>
>>>Michael Heiming wrote:
>>>
>>>>In comp.os.linux.misc Dan Espen <daneNO@spam.mk.telcordia.com>:
[snip]
>>
>>>But, if I'm querying whether I'm running out of swap occasionally surely
>>>settting overcommit_memory to positive would result in more problems,
>>>not less?
>>
>>
>> It depends, you'd need to profile the memory usage of working
>> apps, easiest would be to just try it out and monitor the system
>> closely (sar/mrtg/etc). Then decide if it settings are fine,
>> there are a bunch of other settings allowing to tune vm
>> behavior, the question is usually if it's worth all the work or
>> if just adding RAM, which is cheap enough or even more swap is
>> enough to solve the problem.

> I'm pretty sure I'm not running out of ram as I've always got
> buffers/cache available in RAM, even when I'm running my 'big' jobs.

> Currently I've only got thunderbird running and this is what free shows:

> total used free shared buffers cached
> Mem: 513776 436040 77736 0 80732 245196
> -/+ buffers/cache: 110112 403664
> Swap: 1028120 73584 954536

> I've even killed things like amarok, suse plugger, OO quick starter, but

Ah see, suse. It's the slowest distro one can install. Hopefully
you have at least installed all patches available for your
distro.

> I'm still using >70Mb of swap. I realise these are apps that are no
> longer active, but I can't think what else to kill. All that's left in
> ps of any significance is kdeinit stuff, nscd and X. Could there be a
> leak somewhere?

>> Can't look into your system, so it's not possible to tell what
>> really needs to be done. In the mean time, I'd just try it out
>> which should show you quite fast. What's the problem with just
>> doing it?

> Lack of root access! :-( And the sysadmin is very workshy... If the
> system is running then he can't see a problem.

Don't see a big problem either, you have only used 110MB of your
512MB, anything else is buffers/cache, 70 MB swap used isn't a
problem, it just needs a single run of updatedb or so to use
that, no need to worry. You could ask your admin to setup sudo,
should be installed per default to allow you using 'sysctl' if
you really want to try out overcommit_memory. But from the above
free output there's no problem. Linux uses all available RAM +
some swap, it'll free ram for you as soon as you need it.

-- 
Michael Heiming (X-PGP-Sig > GPG-Key ID: EDD27B94)
mail: echo zvpunry@urvzvat.qr | perl -pe 'y/a-z/n-za-m/'
#bofh excuse 325: Your processor does not develop enough heat.


Relevant Pages

  • Re: Need advice on how to partition a 10gig hdrive
    ... >> install your fourth kernel. ... Swap size depends on the RAM and the purpose of the ... > possible on the system partitions. ...
    (alt.os.linux)
  • Re: How much drive space for Linux?
    ... It is generally recommended to have twice as much swap ... >> space as you have RAM. ... Sounds like 4 gig is not enough. ... >> make the attempt to install it and see whether it fits. ...
    (linux.redhat.install)
  • Re: three questions about Suse
    ... the swap is required before the YaST can start ... the partitioning tool). ... I see this often with SuSE installs on lowRAM machines. ... My suggestions to the OP was to first try a text install. ...
    (alt.os.linux.suse)
  • Re: What Size Partitions for XP and Linux?
    ... > also put all of your scripts and any applications that you install). ... > swap 2X your RAM space. ... Unless you are running a 4.x BSD system, swap is ... max((2xtotal expected memory use - total RAM installed), ...
    (comp.os.linux.misc)
  • Re: Need advice on how to partition a 10gig hdrive
    ... Michael Heiming wrote: ... >> ram) ... > Where did I suggest to use 1 GB swap? ...
    (alt.os.linux)