linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Karl Vogel <karl.vogel@seagha.com>
To: Marcelo Tosatti <marcelo.tosatti@cyclades.com>
Cc: Karl Vogel <karl.vogel@pandora.be>, Andrew Morton <akpm@osdl.org>,
	Jens Axboe <axboe@suse.de>,
	wli@holomorphy.com, linux-mm@kvack.org
Subject: Re: Kernel 2.6.8.1: swap storm of death - nr_requests > 1024 on swap partition
Date: Tue, 31 Aug 2004 01:02:06 +0200	[thread overview]
Message-ID: <200408310102.06510.karl.vogel@seagha.com> (raw)
In-Reply-To: <20040830203339.GA2955@logos.cnet>

On Monday 30 August 2004 22:33, Marcelo Tosatti wrote:
> Can you please try the following - it limits the number of in-flight
> writeback pages to 25% of total RAM at the VM level.
>
> Does wonders for me with 8192 nr_requests. The hogs finish _much_ faster
> and and interactivity feels much better.
>
> With nr_requests=128, this limit is not reached (probably never), but with
> 8192, it certainly does.
>
> --- a/mm/vmscan.c	2004-08-30 17:50:25.000000000 -0300
> +++ b/mm/vmscan.c	2004-08-30 18:34:54.666423368 -0300
> @@ -247,6 +247,12 @@
>
>  static int may_write_to_queue(struct backing_dev_info *bdi)
>  {
> +	int nr_writeback = read_page_state(nr_writeback);
> +
> +	if (nr_writeback > (totalram_pages * 25 / 100)) {
> +		blk_congestion_wait(WRITE, HZ/5);
> +		return 0;
> +	}
>  	if (current_is_kswapd())
>  		return 1;
>  	if (current_is_pdflush())	/* This is unlikely, but why not... */

This fixes the OOM for me.. I can do some more testing if needed tomorrow..

[kvo@localhost sources]$ cat /proc/meminfo
MemTotal:       515728 kB
MemFree:        445084 kB
Buffers:          9492 kB
Cached:          33268 kB
SwapCached:          0 kB
Active:          19748 kB
Inactive:        28716 kB
HighTotal:           0 kB
HighFree:            0 kB
LowTotal:       515728 kB
LowFree:        445084 kB
SwapTotal:     1044216 kB
SwapFree:      1044216 kB
Dirty:              84 kB
Writeback:           0 kB
Mapped:           8960 kB
Slab:            17284 kB
Committed_AS:     9544 kB
PageTables:        548 kB
VmallocTotal:   516020 kB
VmallocUsed:      2372 kB
VmallocChunk:   512624 kB
HugePages_Total:     0
HugePages_Free:      0
Hugepagesize:     4096 kB
[kvo@localhost sources]$ date;./expunge 1024;date;time cat /proc/meminfo;date
Tue Aug 31 00:51:20 CEST 2004
Tue Aug 31 00:51:55 CEST 2004
MemTotal:       515728 kB
MemFree:        381036 kB
Buffers:           272 kB
Cached:           2844 kB
SwapCached:     120572 kB
Active:           2036 kB
Inactive:       121868 kB
HighTotal:           0 kB
HighFree:            0 kB
LowTotal:       515728 kB
LowFree:        381036 kB
SwapTotal:     1044216 kB
SwapFree:       919020 kB
Dirty:               0 kB
Writeback:           0 kB
Mapped:           1420 kB
Slab:             5932 kB
Committed_AS:     9764 kB
PageTables:        572 kB
VmallocTotal:   516020 kB
VmallocUsed:      2372 kB
VmallocChunk:   512624 kB
HugePages_Total:     0
HugePages_Free:      0
Hugepagesize:     4096 kB

real	0m0.071s
user	0m0.000s
sys	0m0.000s
Tue Aug 31 00:51:55 CEST 2004
[kvo@localhost sources]$ date;./expunge 1024;date;time cat /proc/meminfo;date
Tue Aug 31 00:52:41 CEST 2004
Tue Aug 31 00:53:16 CEST 2004
MemTotal:       515728 kB
MemFree:        383832 kB
Buffers:           220 kB
Cached:           2792 kB
SwapCached:     117196 kB
Active:           1944 kB
Inactive:       118652 kB
HighTotal:           0 kB
HighFree:            0 kB
LowTotal:       515728 kB
LowFree:        383832 kB
SwapTotal:     1044216 kB
SwapFree:       922316 kB
Dirty:               0 kB
Writeback:       16432 kB
Mapped:           1484 kB
Slab:             6328 kB
Committed_AS:     9768 kB
PageTables:        572 kB
VmallocTotal:   516020 kB
VmallocUsed:      2372 kB
VmallocChunk:   512624 kB
HugePages_Total:     0
HugePages_Free:      0
Hugepagesize:     4096 kB

real	0m0.328s
user	0m0.000s
sys	0m0.001s
Tue Aug 31 00:53:16 CEST 2004
[kvo@localhost sources]$ exit
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"aart@kvack.org"> aart@kvack.org </a>

  parent reply	other threads:[~2004-08-30 23:02 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20040824124356.GW2355@suse.de>
     [not found] ` <412CDE7E.9060307@seagha.com>
     [not found]   ` <20040826144155.GH2912@suse.de>
     [not found]     ` <412E13DB.6040102@seagha.com>
     [not found]       ` <412E31EE.3090102@pandora.be>
     [not found]         ` <41308C62.7030904@seagha.com>
     [not found]           ` <20040828125028.2fa2a12b.akpm@osdl.org>
     [not found]             ` <4130F55A.90705@pandora.be>
2004-08-28 21:43               ` Andrew Morton
2004-08-28 21:54                 ` William Lee Irwin III
2004-08-28 22:13                   ` Andrew Morton
2004-08-28 22:28                     ` William Lee Irwin III
2004-08-29 10:30                       ` Andrew Morton
2004-08-29 14:15                         ` Jens Axboe
2004-08-29 14:17                           ` Jens Axboe
2004-08-29 14:45                             ` Rik van Riel
2004-08-29 20:18                             ` Andrew Morton
2004-08-29 20:30                               ` Jens Axboe
2004-08-29 20:59                                 ` Andrew Morton
2004-08-29 22:17                                   ` William Lee Irwin III
2004-08-29 22:28                                     ` Andrew Morton
2004-08-30  7:41                                       ` Hugh Dickins
2004-08-30 15:20                                   ` Marcelo Tosatti
2004-08-30 18:01                                     ` Karl Vogel
2004-08-30 17:16                                       ` Marcelo Tosatti
2004-08-30 22:59                                         ` Karl Vogel
2004-08-30 20:33                                       ` Marcelo Tosatti
2004-08-30 22:37                                         ` Andrew Morton
2004-08-30 22:17                                           ` Marcelo Tosatti
2004-08-30 23:51                                             ` Andrew Morton
2004-08-31 10:23                                               ` Marcelo Tosatti
2004-08-31 16:02                                                 ` Marcelo Tosatti
2004-08-31 17:50                                                 ` Karl Vogel
2004-08-31 16:52                                                   ` Marcelo Tosatti
2004-08-31 18:24                                                     ` Karl Vogel
2004-08-31 17:25                                                       ` Marcelo Tosatti
2004-08-31 19:36                                                         ` Karl Vogel
2004-09-02  9:05                                                         ` Rik van Riel
2004-08-30 23:02                                         ` Karl Vogel [this message]
2004-08-29 16:54                       ` Jens Axboe
2004-08-29 17:52                         ` William Lee Irwin III
2004-08-28 21:59                 ` Karl Vogel
2004-08-29 16:53                 ` Jens Axboe

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=200408310102.06510.karl.vogel@seagha.com \
    --to=karl.vogel@seagha.com \
    --cc=akpm@osdl.org \
    --cc=axboe@suse.de \
    --cc=karl.vogel@pandora.be \
    --cc=linux-mm@kvack.org \
    --cc=marcelo.tosatti@cyclades.com \
    --cc=wli@holomorphy.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