public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Linda Walsh <lkml@tlinx.org>
To: Charles Shannon Hendrix <shannon@widomaker.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: OOM kills if swappiness set to 0, swap storms otherwise
Date: Tue, 11 Apr 2006 01:33:02 -0700	[thread overview]
Message-ID: <443B69BE.6060601@tlinx.org> (raw)
In-Reply-To: <20060405144716.GA10353@widomaker.com>



Charles Shannon Hendrix wrote:
> Mon, 27 Mar 2006 @ 19:59 -0800, Andrew Morton said:
>
>   
>> Much porkiness.
>>
>> /proc/meminfo is very useful for obtaining a top-level view of where all
>> the memory's gone to.  I'd tentatively say that your options are to put up
>> with the swapping or find a new mail client.
>>     
>
> I use mutt for my email, and I have the same issue on a 1GB system.
>
> I really wish we could put an upper limit on what file cache can use.
>   
----
    Hmmm, not to be contrary, but I have a 1GB system that refuses to swap
during large file i/o operations.  For the first time in a *long* time,
I read someone's suggestion to increase swappiness -- I did, to 75 or 80,
(I've booted since then, so it's back to 60 and no swap usage) and some of
the programs that rarely run actually swapped.  It was great!  I finally had
more memory for file i/o operations.

    Maybe you are telling the system to "feel free" to use swap by having a
large swap file?  I have a 256Mb swap partition near the front of the disk
where I/O is fastest, but it usually remains untouched, but that also means
I can only overcommit used memory by 25% (1Gphys, 256M swap).  I don't know
what the OOM "looks like" when it runs.  I had a buggy perlapp, once, that
tried to consume infinite memory, but I think it segfaulted before the OOM
could act.

    Maybe if you don't want linux to swap as much, it might swap less if 
you give
it less to swap with?  I know it sounds simplistic, but I've run with 
smallish
swap files ever since I got up to 1GB of main memory.  The only reason I 
have one
at all is I presumed that infrequently used functions, like dhcp (only 
used when
friends are over) would be shuffled out -- but it isn't unless I increase
swappiness.
> I shouldn't be suffering from swap storms.
>   
I agree.  Try getting rid of your swap file entirely -- your system will 
still
run unless you are overloading memory, but you have a Gig.  How much do you
need to keep in memory?  Sure, if/when I get a 4-way CPU (I have a 2-cpu 
setup now),
I might go up to 4G, but I might be running multiple virtual machines too!
> For example, my normal working set of programs eats about 250MB of memory. If
> I also start a job running to something like tag some mp3s, copy a CD, or just
> process a lot of files, it only takes a few minutes before performance becomes
> unacceptable.  
>   
---
    You might try the "cfq" block i/o algorithm.  Then you can
ionice down the disk priority of background processes (though you need
to be root to reduce ionice levels at this point, unlike cpu nice).
> If you are doing some work where you switch among several applications
> frequently, the pigginess of file cache becomes a serious problem.
>   
---
    Never a problem.  I don't allocate enough swap for it to be a 
problem I'm
guessing. Programs stay in memory and blocks get forced out to disk more
frequently.

Linda

  parent reply	other threads:[~2006-04-11  8:33 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-28  1:53 OOM kills if swappiness set to 0, swap storms otherwise Lee Revell
2006-03-28  3:59 ` Andrew Morton
2006-03-28  4:09   ` Lee Revell
2006-03-28  4:12   ` Parag Warudkar
2006-03-28  4:20     ` Lee Revell
2006-04-05 14:47   ` Charles Shannon Hendrix
2006-04-05 20:47     ` Bill Davidsen
2006-05-02  4:12       ` Charles Shannon Hendrix
2006-04-11  8:33     ` Linda Walsh [this message]
2006-05-02  4:21       ` Charles Shannon Hendrix
2006-05-02  5:04         ` Randy.Dunlap
2006-03-28 11:41 ` Alan Cox
  -- strict thread matches above, loose matches on Subject: below --
2006-04-06  1:13 Shantanu Goel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=443B69BE.6060601@tlinx.org \
    --to=lkml@tlinx.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=shannon@widomaker.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox