public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Jakob Østergaard" <jakob@unthought.net>
To: "Jeffrey W. Baker" <jwbaker@acm.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Ongoing 2.4 VM suckage
Date: Fri, 3 Aug 2001 00:20:12 +0200	[thread overview]
Message-ID: <20010803002012.F7650@unthought.net> (raw)
In-Reply-To: <20010802234434.E7650@unthought.net> <Pine.LNX.4.33.0108021448400.21298-100000@heat.gghcwest.com>
In-Reply-To: <Pine.LNX.4.33.0108021448400.21298-100000@heat.gghcwest.com>; from jwbaker@acm.org on Thu, Aug 02, 2001 at 02:52:11PM -0700

On Thu, Aug 02, 2001 at 02:52:11PM -0700, Jeffrey W. Baker wrote:
> On Thu, 2 Aug 2001, Jakob Østergaard wrote:
> 
> > You fill up mem and you fill up swap, and you complain the box is
> > acting funny ??
> 
> The kernel should save whatever memory it needs to do its work.  It isn't
> my problem, from userland, to worry that I take the last page in the
> machine.  If the kernel needs pages to operate efficiently, it had better
> reserve them and not just hand them out until it locks up.

Sure, I agree,  to an extent.

If I start 50 CPU-bound jobs on my one-processor machine, I don't want the
kernel to tell me "no, you probably didn't mean to do that, I'll kill 40 of
your jobs so the others will go faster".    Same with resource usage - it's not
the kernel's job to implement that kind of policy - you have ulimits for
limiting your users, and if it's your own machine you should have enough
knowledge to know that deliberately using up every resource in the machine is
going to cause a resource shortage.

It is possible that there is a real problem and the kernel doesn't operate
efficiently in your case - I won't argue with that.   But you cannot expect
your system to perform very well if you use up all resources - maybe if you 
hit a real bug in your case, and if someone fixes it, the kernel will operate
efficiently under those circumstances - but userspace will *not* operate
very well if you want the OOM killer to regularly kill "production" jobs etc.

At least, you must be doing another kind of production that what I'm used to
  :)

> 
> > This is a clear case of "Doctor it hurts when I ..."  - Don't do it !
> >
> > I'm interested in hearing how you would accomplish graceful
> > performance degradation in a situation where you have used up any
> > possible resource on the machine.  Transparent process back-tracking ?
> > What ?
> 
> Gosh, here's an idea: if there is no memory left and someone malloc()s
> some more, have malloc() fail?

Actually, having malloc() fail is not that simple  :)

> Kill the process that required the memory?

Yes, you're perfectly right here.  If there's a critical shortage the OOM
killer should strike.

However - it should only strike the offending process (detecting that is hard
enough).  And it should not be possible for an attacker or untrusted user to
cause the OOM killer to kill anything but his own jobs.

> I can't believe the attitude I am hearing.  Userland processes should be
> able to go around doing whaever the fuck they want and the box should stay
> alive.

No offense was intended.

But if this things were really so simple, they would have been in the kernel
for ages.

I'm tempted to say:  Well your ideals seem to correlate well with the general
ideals of the LKML wrt. VM and OOM - it'd be great if you could post a patch to
fix it all properly     :)

We all want:  Perfect performance in both normal and resource-starved cases,
an OOM killer that strikes fairly when necessary and only when necessary,  a
userspace that's not just fool-proof but "very fool-proof", etc. etc.


>  Currently, if a userland process runs amok, the kernel goes into
> self-fucking mode for the rest of the week.

We know.

What is your suggestion for tackling this problem ?

-- 
................................................................
:   jakob@unthought.net   : And I see the elder races,         :
:.........................: putrid forms of man                :
:   Jakob Østergaard      : See him rise and claim the earth,  :
:        OZ9ABN           : his downfall is at hand.           :
:.........................:............{Konkhra}...............:

  parent reply	other threads:[~2001-08-02 22:20 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-08-02 18:29 Ongoing 2.4 VM suckage Jeffrey W. Baker
2001-08-02 18:52 ` Richard B. Johnson
2001-08-02 19:10   ` Jeffrey W. Baker
2001-08-02 19:54     ` Richard B. Johnson
2001-08-02 20:10       ` Jeffrey W. Baker
2001-08-02 20:16         ` Rik van Riel
2001-08-02 20:28           ` Rik van Riel
2001-08-03 17:59             ` David Ford
2001-08-03 20:53               ` Rik van Riel
2001-08-03 21:59                 ` Mike Black
2001-08-03 22:08                   ` Rik van Riel
2001-08-04  1:06                     ` Daniel Phillips
2001-08-03 23:58                   ` [PATCH] Disable kswapd through proc (was Ongoing 2.4 VM suckage) Daniel Phillips
2001-08-04  7:21                   ` Ongoing 2.4 VM suckage Stephen Satchell
2001-08-06  8:55                     ` Helge Hafting
2001-08-06 16:37                     ` Jeremy Linton
2001-08-07  7:51                       ` David Weinehall
2001-08-03 22:47                 ` David Ford
2001-08-02 21:01         ` Richard B. Johnson
2001-08-02 21:11           ` Jeffrey W. Baker
2001-08-02 21:44             ` Jakob Østergaard
2001-08-02 21:52               ` Jeffrey W. Baker
2001-08-02 21:56                 ` Miles Lane
2001-08-02 22:05                   ` Jeffrey W. Baker
2001-08-02 22:07                 ` Rik van Riel
2001-08-02 22:17                   ` Jeffrey W. Baker
2001-08-02 22:27                     ` Rik van Riel
2001-08-02 22:32                       ` Jeffrey W. Baker
2001-08-02 22:56                       ` BERECZ Szabolcs
2001-08-03 13:07                       ` jlnance
2001-08-03 13:31                         ` Richard B. Johnson
2001-08-06 13:22                         ` Luigi Genoni
2001-08-06 13:29                           ` David S. Miller
2001-08-02 23:46                     ` Ongoing 2.4 VM suckage pagemap_lru_lock Jeremy Linton
2001-08-02 22:15                 ` Ongoing 2.4 VM suckage Pavel Zaitsev
2001-08-02 22:20                 ` Jakob Østergaard [this message]
2001-08-03 12:04 ` Anders Peter Fugmann
2001-08-03 16:03   ` Rik van Riel
2001-08-03 16:24     ` Anders Peter Fugmann
2001-08-03 21:24       ` Rik van Riel
2001-08-03 22:00         ` Anders Peter Fugmann

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=20010803002012.F7650@unthought.net \
    --to=jakob@unthought.net \
    --cc=jwbaker@acm.org \
    --cc=linux-kernel@vger.kernel.org \
    /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