From: "John Fremlin" <vii@penguinpowered.com>
To: linux-mm@kvack.org
Subject: Re: [RFC] RSS guarantees and limits
Date: 22 Jun 2000 19:00:54 +0100 [thread overview]
Message-ID: <m2lmzx38a1.fsf@boreas.southchinaseas> (raw)
In-Reply-To: Rik van Riel's message of "Wed, 21 Jun 2000 19:29:44 -0300 (BRST)"
Rik van Riel <riel@conectiva.com.br> writes:
> I think I have an idea to solve the following two problems:
> - RSS guarantees and limits to protect applications from
> each other
I think that this principle should be queried. Taking the base unit to
be the process, while reasonable, is not IMHO a good idea.
For multiuser systems the obvious unit is the user; that is, it is
clearly necessary to stop one user hogging system memory, whether
they've got 5 or 500 processes.
For workstations, often the user is only working with one or two
processes, which are extremely large (window system and math package
for example) and a series of smaller processes (xeyes and window
manager). Taking resources away from a coffee making simulator just so
some mailnotifier can keep a stupid animation in memory doesn't make
sense.
For special boxes with only one process running, keeping others in
cache will only be harmful.
[ Perhaps some system analogous to "nice" would be helpful. I think that
the user can directly give a lot of very useful information to the VM
(for example, the hint that when memory runs out, netscape should be
killed before other processes). ]
It would be better to treat all memory objects as equals; for example,
when emacs is taking up a huge amount of memory because it's acting
alternately as a news client and tetris game, your system would only
count it as one process, which is unfair -- it is logically being
treated as two. If the page were taken as basic block, all of these
problems would be solved (or why not? after all we're supposed to be
converting to the perpage system).
> - make sure streaming IO doesn't cause the RSS of the application
> to grow too large
This problem could be more generally stated: make sure that streaming
IO does not chuck stuff which will be looked at again out of cache.
As I explained above, I think that the process is a bad basic
unit.
> - protect smaller apps from bigger memory hogs
Why? Yes, it's very altruistic, very sportsmanlike, but giving small,
rarely used processes a form of social security is only going to
increase bureaucracy ;-)
I don't follow the idea that processes should be squashed if they're
large, and my three examples demonstrate that this is a bad.
> The idea revolves around two concepts. The first idea is to
> have an RSS guarantee and an RSS limit per application, which
> is recalculated periodically. A process' RSS will not be shrunk
> to under the guarantee and cannot be grown to over the limit.
> The ratio between the guarantee and the limit is fixed (eg.
> limit = 4 x guarantee).
This is complex and arbitrary; the concept of a guarantee is not
naturally occuring therefore (looking at the current state of the mm
code) it will become detuned if it ever gets tuned (like the priority
argument to vmscan::swap_out which is almost always between 60 and 64
on my box) and merely make more performance trouble because the
complexity isn't helping any.
I do agree that looking at and adjusting to processes memory access
patterns is a good idea, if it can be done right. I disagree with this
particular way of doing it; it feels too arbitrary and I don't think
it will do any good.
[...]
--
http://altern.org/vii
--
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.eu.org/Linux-MM/
next prev parent reply other threads:[~2000-06-22 18:00 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-06-21 22:29 Rik van Riel
2000-06-22 18:00 ` John Fremlin [this message]
2000-06-22 19:12 ` Rik van Riel
2000-06-22 21:19 ` Stephen Tweedie
2000-06-22 21:37 ` Rik van Riel
2000-06-22 22:48 ` John Fremlin
2000-06-22 23:59 ` Stephen Tweedie
2000-06-23 16:08 ` John Fremlin
2000-06-22 22:39 ` John Fremlin
2000-06-22 23:27 ` Rik van Riel
2000-06-23 0:49 ` Ed Tomlinson
2000-06-23 13:45 ` Rik van Riel
2000-06-23 15:36 ` volodya
2000-06-23 15:52 ` John Fremlin
2000-06-24 11:22 ` Andrey Savochkin
2000-06-27 3:26 ` Stephen C. Tweedie
2000-06-22 14:41 [RFC] " frankeh
2000-06-22 15:31 ` Rik van Riel
2000-06-22 15:49 frankeh
2000-06-22 16:05 ` Rik van Riel
2000-06-22 16:22 frankeh
2000-06-22 16:38 ` Rik van Riel
2000-06-22 19:48 ` Jamie Lokier
2000-06-22 19:52 ` Rik van Riel
2000-06-22 20:00 ` Jamie Lokier
2000-06-22 20:07 ` Rik van Riel
2000-06-22 23:02 Mark_H_Johnson
2000-06-23 14:01 frankeh
2000-06-23 17:56 ` Stephen Tweedie
2000-06-23 18:07 frankeh
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=m2lmzx38a1.fsf@boreas.southchinaseas \
--to=vii@penguinpowered.com \
--cc=linux-mm@kvack.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