mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: ebiederm@xmission.com (Eric W. Biederman)
To: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: Rob Landley <rob@landley.net>, Theodore Tso <tytso@mit.edu>,
	James Bottomley <James.Bottomley@steeleye.com>,
	Matthew Wilcox <matthew@wil.cx>,
	linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org,
	Jens Axboe <axboe@suse.de>,
	Suparna Bhattacharya <suparna@in.ibm.com>,
	Nick Piggin <piggin@cyberone.com.au>
Subject: Re: OOM killer gripe (was Re: What still uses the block layer?)
Date: Mon, 15 Oct 2007 22:38:33 -0600	[thread overview]
Message-ID: <m1lka3ishi.fsf@ebiederm.dsl.xmission.com> (raw)
In-Reply-To: <200710161659.28826.nickpiggin@yahoo.com.au> (Nick Piggin's message of "Tue, 16 Oct 2007 16:59:28 +1000")

Nick Piggin <nickpiggin@yahoo.com.au> writes:

> On Tuesday 16 October 2007 13:55, Eric W. Biederman wrote:
>> Nick Piggin <nickpiggin@yahoo.com.au> writes:
>
>> > How much swap do you have configured? You really shouldn't configure
>> > so much unless you do want the kernel to actually use it all, right?
>>
>> No.
>>
>> There are three basic swapping scenarios.
>> - Pushing unused data out of ram
>> - Swapping
>> - Thrashing
>>
>> To effectively swap you need SWAP > RAM because after a little while of
>> swapping all of your pages in RAM should be assigned a location in the
>> page cache.
>
> I don't follow your logic. We don't need SWAP > RAM in order to swap
> effectively, IMO.

The steady state of a system that is heavily and usably swapping but
not thrashing is that all of the pages in RAM are in the swap cache,
at least that used to be the case.

>> I have not heard of many people swapping and not thrashing lately.
>> I think part of the problem is that we do random access to the swap
>> partition which makes us seek limited.  And since the number of
>> seeks per unit time has been increasing at a linear or slower rate
>> that if we are doing random disk I/O then the amount we can use
>
> I don't know if there is a causal relationship there. I mean, I
> think it's been a long time since thrashing was ever a viable mode
> of operation, right?

Right.  But swapping heavily has been a viable mode of operation
and that the vast gap in disk random IO performance seems to have
hurt significantly.

It be very clear is used to able to run a problem at little below
full speed with the disk pegged with swap traffic, and I did this
regularly when I started out with linux.

> Maybe desktops just have less need for swapping now, so nobody sees
> it much until something goes _really_ bad. When I'm using my 256MB
> machine, unused stuff goes to swap.

There is a bit of truth in the fact that there is less need for
swapping now.  At the same time however swapping simply does not
work well right now, and I'm not at all certain why.

>> the disk for is very limited.   I wonder if we could figure out
>> how to push and pull 1M or bigger chunks into and out of swap?
>
> Pulling in 1MB pages can really easily end up compounding the
> thrashing problem unless you're very sure a significant amount
> of it will be used.

It's a hard call.  The I/O time for 1MB of contiguous disk data
is about the I/O time of 512 bytes of contiguous disk data.

>> I don't know if swap has actually worked since we vmscan stopped
>> going over the virtual addresses.
>
> I do, and it does ;)

Really?  Not just the pushing of unused stuff into swap.


>> > Because if we're not really conservative about OOM killing, then the
>> > user who actually really did want to use all the swap they configured
>> > gets angry when we kill their jobs without using it all.
>>
>> I totally agree. The fact that the OOM killer started is a sign that
>> the system was completely overwhelmed and nothing better could happen.
>>
>> In this case my gut feel says limiting the total number of processes
>> would have been much more effective then anything at all to do with
>> swap. make -j reminds me of the classic fork bomb.
>
> Yep.
>
>
>> > Would an oom-kill-someone-now sysrq be of help, I wonder?
>>
>> Well we have SAQ which should kill everything on your current VT
>> which should include X and all of it's children.
>
> Which is exactly what you don't want to do if you've just forkbombed
> yourself. I missed the fact that we now have a manual oom kill...

You probably have a point there.

Eric


  reply	other threads:[~2007-10-16  4:39 UTC|newest]

Thread overview: 93+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-12  1:11 What still uses the block layer? Rob Landley
2007-10-13 22:05 ` Matthew Wilcox
2007-10-14  5:54   ` David Newall
2007-10-14 17:46     ` Stefan Richter
2007-10-14 22:35       ` Tilman Schmidt
2007-10-14 23:36       ` Rob Landley
2007-10-15  1:23         ` Neil Brown
2007-10-15  5:44         ` Stefan Richter
2007-10-15  9:26           ` Rob Landley
2007-10-15 16:08             ` Matthew Wilcox
2007-10-15 17:10               ` Stefan Richter
2007-10-16  3:06                 ` david
2007-10-16  5:56                   ` Stefan Richter
2007-10-16 10:19                   ` Alan Cox
2007-10-16 19:54                     ` david
2007-10-16 19:54                       ` Matthew Wilcox
2007-10-16 20:18                         ` Stefan Richter
2007-10-16 20:34                         ` Theodore Tso
2007-10-16 20:56                           ` Stefan Richter
2007-10-16 20:55                         ` david
2007-10-16 21:49                           ` Alan Cox
2007-10-17  9:48                           ` Gabor Gombas
2007-10-17 17:23                             ` Stefan Richter
2007-10-17 21:04                             ` david
2007-10-15 20:29             ` Wilfried Klaebe
2007-10-14 22:24   ` James Bottomley
2007-10-14 23:45     ` Rob Landley
2007-10-15  1:45       ` Theodore Tso
2007-10-15  8:04         ` Rob Landley
2007-10-15  9:06           ` Julian Calaby
2007-10-15 10:08             ` Rob Landley
2007-10-15 17:33               ` Greg KH
2007-10-16  2:54                 ` david
2007-10-16  4:04                   ` Matthew Wilcox
2007-10-16  4:11                     ` Arjan van de Ven
2007-10-16  4:15                     ` david
2007-10-16  4:21                     ` Greg KH
2007-10-16  5:00                       ` david
     [not found]               ` <646765f40710150327i78519a0fvaea7a83d5975b180@mail.gmail.com>
     [not found]                 ` <200710151511.29748.rob@landley.net>
2007-10-15 23:49                   ` Julian Calaby
2007-10-15 10:32           ` Loïc Grenié
2007-10-15 21:09             ` Rob Landley
2007-10-15 11:19           ` Neil Brown
2007-10-15 21:34             ` Rob Landley
2007-10-15 21:46               ` Jeff Garzik
2007-10-15 22:01               ` Alan Cox
2007-10-15 23:41               ` Neil Brown
2007-10-16  2:12                 ` david
2007-10-15 13:21           ` Theodore Tso
2007-10-15 13:29             ` Alan Cox
2007-10-15 13:35               ` Theodore Tso
2007-10-15 17:44               ` Jeff Garzik
2007-10-15 14:46             ` Douglas Gilbert
2007-10-16  2:51             ` david
2007-10-15 13:37           ` OOM killer gripe (was Re: What still uses the block layer?) Nick Piggin
2007-10-15  9:52             ` Rob Landley
2007-10-15 15:08               ` Nick Piggin
2007-10-16  6:22                 ` David Newall
2007-10-20  9:48               ` Pavel Machek
2007-10-15 11:40             ` Theodore Tso
2007-10-20  9:50               ` Pavel Machek
2007-10-16  3:55             ` Eric W. Biederman
2007-10-16  4:10               ` david
2007-10-16  4:45                 ` Eric W. Biederman
2007-10-16  6:59               ` Nick Piggin
2007-10-16  4:38                 ` Eric W. Biederman [this message]
2007-10-16  6:38                   ` Rob Landley
2007-10-16  9:31                     ` Eric W. Biederman
2007-10-16 10:28                     ` Alan Cox
2007-10-16 23:59                       ` Rob Landley
2007-10-16  7:34                   ` Nick Piggin
2007-10-18 13:00                     ` Rogier Wolff
2007-10-19  6:49                       ` Rob Landley
2007-10-19  7:21                         ` Rogier Wolff
2007-10-16 20:37             ` Andrew Morton
2007-10-17  5:34           ` What still uses the block layer? Valdis.Kletnieks
2007-10-17  6:07             ` david
2007-10-15  6:00       ` Greg KH
2007-10-15  8:36         ` Rob Landley
2007-10-15 13:08           ` Alan Cox
2007-10-15 14:00           ` Arjan van de Ven
2007-10-15 18:56             ` Matthew Garrett
2007-10-15 17:25           ` Greg KH
2007-10-15 18:00             ` Matthew Wilcox
2007-10-15 18:46             ` Jeff Garzik
2007-10-16  6:33               ` Stefan Richter
2007-10-17 23:43               ` Bill Davidsen
2007-10-15 22:54             ` Rob Landley
2007-10-15  8:52         ` Christoph Hellwig
2007-10-15 13:10       ` James Bottomley
2007-10-15 21:51         ` Rob Landley
2007-10-15  0:45     ` Luben Tuikov
2007-10-15  6:51       ` Rob Landley
2007-10-15  8:37         ` Luben Tuikov

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=m1lka3ishi.fsf@ebiederm.dsl.xmission.com \
    --to=ebiederm@xmission.com \
    --cc=James.Bottomley@steeleye.com \
    --cc=axboe@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=matthew@wil.cx \
    --cc=nickpiggin@yahoo.com.au \
    --cc=piggin@cyberone.com.au \
    --cc=rob@landley.net \
    --cc=suparna@in.ibm.com \
    --cc=tytso@mit.edu \
    /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

all inboxes | Powered by JetHome®