From: jfm2@club-internet.fr
To: sct@redhat.com
Cc: jfm2@club-internet.fr, linux-mm@kvack.org
Subject: Re: Two naive questions and a suggestion
Date: 24 Nov 1998 21:44:32 -0000 [thread overview]
Message-ID: <19981124214432.2922.qmail@sidney.remcomp.fr> (raw)
In-Reply-To: <199811241117.LAA06562@dax.scot.redhat.com> (sct@redhat.com)
>
> > The problem is: will you be able to manage the following situation?
>
> > Two processes running in an 8 Meg box. Both will page fault every ms
> > if you give them 4 Megs (they are scanning large arrays so no
> > locality), a page fault will take 20 ms to handle. That means only 5%
> > of the CPU time is used, remainder is spent waiting for page being
> > brought from disk or pushing a page of the other process out of
> > memory. And both of these processes would run like hell (no page
> > fault) given 6 Megs of memory.
>
> These days, most people agree that in this situation your box is simply
> misconfigured for the load. :) Seriously, requirements have changed
> enormously since swapping was first implemented.
>
> > Only solution I see is stop one of them (short of adding memory :) and
> > let the other one make some progress. That is swapping.
>
> No it is not. That is scheduling. Swapping is a very precise term used
> to define a mechanism by which we suspend a process and stream all of
> its internal state to disk, including page tables and so on. There's no
> reason why we can't do a temporary schedule trick to deal with this in
> Linux: it's still not true swapping.
>
Agreed, the important feature is the stopping one of the processes
when critically short of memory. Swapping is only a trick for getting
more bandwidth at the expenses of pushing in an out of memory a
greater amount of process space so there is no proof it is faster than
letting other processes steal memory page by page from the now stopped
process.
> > In 96 I asked for that same feature, gave the same example (same
> > numbers :-) and Alan Cox agreed but told Linux was not used under
> > heavy loads. That means we are in a catch 22 situation: Linux not used
> > for heavy loads because it does not handle them well and the necessary
> > feaatures not implemented because it is not used in such situations.
>
> Linux is used under very heavy load, actually.
>
BSD and Solaris partisans are still boasting about how much better
those systems are at heavy loads. I agree boasting tends to survive
to the situation who originated it.
> > And now we are at it: in 2.0 I found a deamon can be killed by the
> > system if it runs out of VM.
>
> Same on any BSD. Once virtual memory is full, any new memory
> allocations must fail. It doesn't matter whether that allocation comes
> from a user process or a daemon: if there is no more virtual memory then
> the process will get a NULL back from malloc. If a daemon dies as a
> result of that, the death will happen on any Unix system.
>
Say the Web or database server can be deemed important enough for it
not being killed just because some dim witt is playing with the GIMP
at the console and the GIMP has allocated 80 Megs.
More reallistically, it can happen that the X server is killed
(-9) due to the misbeahviour of a user program and you get
trapped with a useless console. Very diificult to recover. Specially
if you consider inetd could have been killed too, so no telnetting.
You can also find half of your daemons, are gone. That is no mail, no
printing, no nothing.
> > Problem is: it was a normal user process who had allocatedc most of it
> > and in addition that daemon could be important enough it is better to
> > kill anything else, so it would be useful to give some privilege to
> > root processes here.
>
> No. It's not an issue of the operating system killing processes. It is
> an issue of the O/S failing a request for new memory, and a process
> exit()ing as a result of that failed malloc. The process is voluntarily
> exiting, as far as the kernel is concerned.
>
In situation like those above I would like Linux supported a concept
like guaranteed processses: if VM is exhausted by one of them then try
to get memory by killing non guaranteed processes and only kill the
original one if all reamining survivors are guaranteed ones.
It would be better for mission critical tasks.
--
Jean Francois Martinez
Project Independence: Linux for the Masses
http://www.independence.seul.org
--
This is a majordomo managed list. To unsubscribe, send a message with
the body 'unsubscribe linux-mm me@address' to: majordomo@kvack.org
next prev parent reply other threads:[~1998-11-24 22:58 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-11-19 0:20 jfm2
1998-11-19 20:05 ` Rik van Riel
1998-11-20 1:25 ` jfm2
1998-11-20 15:31 ` Eric W. Biederman
1998-11-23 18:08 ` Stephen C. Tweedie
1998-11-23 20:45 ` jfm2
1998-11-23 21:59 ` jfm2
1998-11-24 1:21 ` Vladimir Dergachev
1998-11-24 11:17 ` Stephen C. Tweedie
1998-11-24 21:44 ` jfm2 [this message]
1998-11-25 6:41 ` Rik van Riel
1998-11-25 12:27 ` Stephen C. Tweedie
1998-11-25 13:08 ` Rik van Riel
1998-11-25 14:46 ` Stephen C. Tweedie
1998-11-25 16:47 ` Rik van Riel
1998-11-25 21:02 ` Stephen C. Tweedie
1998-11-25 21:21 ` Rik van Riel
1998-11-25 22:29 ` Stephen C. Tweedie
1998-11-26 7:30 ` Rik van Riel
1998-11-26 12:48 ` Stephen C. Tweedie
1998-11-25 20:01 ` jfm2
1998-11-26 7:16 ` Rik van Riel
1998-11-26 19:59 ` jfm2
1998-11-27 17:45 ` Stephen C. Tweedie
1998-11-27 21:14 ` jfm2
1998-11-25 14:48 ` Eric W. Biederman
1998-11-25 20:29 ` jfm2
1998-11-25 16:31 ` ralf
1998-11-26 12:18 ` Rik van Riel
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=19981124214432.2922.qmail@sidney.remcomp.fr \
--to=jfm2@club-internet.fr \
--cc=linux-mm@kvack.org \
--cc=sct@redhat.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