From: Bill Davidsen <davidsen@tmr.com>
To: Buddy Lumpkin <b.lumpkin@comcast.net>
Cc: "'Con Kolivas'" <kernel@kolivas.org>,
"'FabF'" <fabian.frederick@skynet.be>,
"'Bernd Eckenfels'" <ecki-news2004-05@lina.inka.de>,
linux-kernel@vger.kernel.org
Subject: Re: why swap at all?
Date: Fri, 04 Jun 2004 13:08:45 -0400 [thread overview]
Message-ID: <40C0AC9D.1020805@tmr.com> (raw)
In-Reply-To: <S265663AbUFDHTq/20040604071946Z+537@vger.kernel.org>
Buddy Lumpkin wrote:
>>But swap behaviour kills performance even when memory is more than
>>adequate. Consider building a DVD image in a 4GB system. The i/o forces
>>all of the unused programs out, in spite of the fact that an extra 100MB
>>doesn't make a measurable difference in performance. But when I click
>>Mozilla paging most of it in from disk make a big difference in
>>performance to the user.
>
>
>
> We really need a server option. Something that ages out file backed pages
> naturally with less overhead than kswapd. One method would be to keep the
> pagecache on it's own list, and move pages to the head of the list any time
> they are modified or referenced, and reclaim from the tail.
>
> All pages on this list can be considered as "free memory", because any new
> memory requests would just cause pages to be evicted from the tail of the
> list.
>
> Anonymous memory would *not* be on this list. This way any time anonymous
> memory is allocated, the pages can be readily stolen from the pagecache
> list.
>
> Lastly one nifty configuration parameter that could exist as a knob for
> sys-admins is the ability to tell the VM not to add file backed pages with
> the execute bit set to the page cache list but rather, leave them to be
> reclaimed if kswapd wakes up in a true low memory situation (pagecache is
> exhausted and memory is still low). This would require a sys-admin to make
> sure only executables have the execute bit set and "data files", etc... do
> not have the execute bit set.
Or have the exec() call set a "part of a process" flag. That means that
if I read an executable in as data it doesn't get locked, other than
what part might be in my i/o buffers. And mmap can produce different
effects than read/write which may be good, if they are GOOD different
effects ;-) Before you ask, thing 'strings' as why avg user does this.
But I fail to make my point... I want to limit how much memory is used
for i/o buffers, cache, or anything else which will produce memory
pressure of my programs. The quick solution might be just a number from
the admin, like the 2.2 patch, but some kernel logic to understand that
while 20MB is much better than 10MB in a tiny system, 2GB is not a lot
better than 1GB in a large memory system, and having a sync() bog the
system for tens of seconds is undesirable. Well, maybe some folks don't
agree, it could be that the admin set limit is really the way to go.
I regard this as a desktop issue, trading some i/o performance to keep
window changes fast.
>
>
> A system that works like this is nice for the following reasons:
>
> 1) The system administrator can size a system so that all programs
> Safely run within physical RAM. Extra RAM
> Could be added and sized based on the need
> for caching files.
>
> 2) Anonymous pages (and possibly executable if you read
> the last paragraph above) will only be evicted if kswapd is
> awaken due to a true memory shortage (1/128th pagable memory?).
>
>
> I like to view the VM system as always being full, because if enough unique
> file system IO takes place, that is exactly what eventually happens. A
> system that counts page cache as free memory and uses a gentler mechanism to
> evict pages from the page cache would benefit IO bound servers significantly
> IMHO.
That's what would be nice with tuning, the admin can optimize what is
important on that system. I am usually happy with what the system does
on i/o, but I want my 500MB or so of programs to stay resident in a 2GB
machine, and if that adds a ms or two to i/o I can live with it, so that
when I change windows it happens now, not eventually. And I bet there
are a lot of others who would like better response to focus changes aswell.
--
-bill davidsen (davidsen@tmr.com)
"The secret to procrastination is to put things off until the
last possible moment - but no longer" -me
next prev parent reply other threads:[~2004-06-04 17:10 UTC|newest]
Thread overview: 146+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-05-31 19:34 why swap at all? Michael Brennan
2004-05-31 20:29 ` John Bradford
2004-05-31 22:47 ` Nick Piggin
2004-05-31 23:30 ` Bernd Eckenfels
2004-06-01 18:36 ` FabF
2004-06-01 19:02 ` Valdis.Kletnieks
2004-06-01 19:53 ` FabF
2004-06-01 20:00 ` Valdis.Kletnieks
2004-06-01 20:14 ` FabF
2004-06-01 20:22 ` Valdis.Kletnieks
2004-06-01 21:15 ` FabF
2004-06-01 21:40 ` Valdis.Kletnieks
2004-06-03 13:54 ` Bill Davidsen
2004-06-04 0:01 ` Nick Piggin
2004-06-01 23:17 ` Bernd Eckenfels
2004-06-02 5:38 ` FabF
2004-06-02 11:42 ` Con Kolivas
2004-06-02 12:22 ` John Bradford
2004-06-02 12:22 ` Con Kolivas
2004-06-02 17:06 ` FabF
2004-06-03 14:14 ` Bill Davidsen
2004-06-04 7:23 ` Buddy Lumpkin
2004-06-04 17:08 ` Bill Davidsen [this message]
2004-06-15 14:55 ` Charles Shannon Hendrix
2004-06-04 9:11 ` Catalin BOIE
2004-06-04 17:24 ` Bill Davidsen
2004-06-06 14:39 ` Rik van Riel
2004-06-02 17:59 ` Valdis.Kletnieks
2004-06-02 18:30 ` FabF
2004-06-02 23:54 ` Con Kolivas
2004-06-03 16:16 ` FabF
2004-06-03 23:56 ` Con Kolivas
2004-06-04 0:16 ` Con Kolivas
2004-06-03 14:18 ` Bill Davidsen
2004-06-03 14:27 ` Con Kolivas
2004-06-02 17:52 ` Valdis.Kletnieks
2004-06-02 3:50 ` Tim Connors
2004-06-02 17:45 ` Valdis.Kletnieks
2004-06-01 8:34 ` John Bradford
2004-06-01 8:32 ` William Lee Irwin III
2004-06-01 8:50 ` John Bradford
2004-06-01 8:54 ` William Lee Irwin III
2004-06-01 9:10 ` John Bradford
2004-06-08 1:18 ` Tim Connors
2004-06-08 5:29 ` Denis Vlasenko
2004-06-01 9:38 ` Buddy Lumpkin
2004-06-01 10:13 ` Tim Connors
2004-06-01 10:24 ` William Lee Irwin III
2004-06-01 11:19 ` Tim Connors
[not found] <fa.amhil9e.o5kt1u@ifi.uio.no>
[not found] ` <fa.kfm8lru.1l2mdp4@ifi.uio.no>
2004-06-08 15:12 ` Ray Bryant
2004-06-08 15:15 ` Ray Bryant
2004-06-09 19:24 ` Bill Davidsen
-- strict thread matches above, loose matches on Subject: below --
2004-05-27 12:31 Piszcz, Justin Michael
2004-05-27 12:41 ` William Lee Irwin III
2004-05-27 15:59 ` John Bradford
2004-05-27 16:16 ` William Lee Irwin III
2004-06-03 13:38 ` Bill Davidsen
[not found] <fa.fegqf9v.kmidof@ifi.uio.no>
[not found] ` <fa.bqpvcrs.u648jq@ifi.uio.no>
2004-05-27 11:39 ` Andy Lutomirski
2004-05-28 21:37 ` Denis Vlasenko
2004-05-28 22:28 ` Bernd Eckenfels
2004-05-29 7:31 ` Denis Vlasenko
2004-05-31 10:49 ` jlnance
2004-06-01 11:57 ` Lenar Lõhmus
2004-06-01 12:27 ` Robin Rosenberg
2004-06-01 16:49 ` jlnance
2004-06-02 18:38 ` John Hendrikx
2004-06-01 12:21 ` David B. Stevens
2004-05-27 5:37 Nick Piggin
2004-05-27 17:27 ` Buddy Lumpkin
2004-05-26 12:34 Piszcz, Justin Michael
2004-05-26 12:24 Nick Piggin
2004-05-26 13:03 ` Buddy Lumpkin
2004-05-26 13:27 ` Helge Hafting
2004-05-26 11:57 Nick Piggin
2004-05-26 12:19 ` Buddy Lumpkin
2004-05-26 11:04 Nick Piggin
2004-05-26 6:38 Anthony DiSante
2004-05-26 7:31 ` Buddy Lumpkin
2004-05-26 7:55 ` William Lee Irwin III
2004-05-26 8:30 ` Buddy Lumpkin
2004-05-26 8:44 ` Nick Piggin
2004-05-26 9:34 ` John Bradford
2004-05-26 9:48 ` Nick Piggin
2004-05-26 10:10 ` Matthias Schniedermeyer
2004-05-26 10:33 ` Nick Piggin
2004-05-26 10:58 ` Matthias Schniedermeyer
2004-05-26 11:19 ` Nick Piggin
2004-05-26 12:27 ` Matthias Schniedermeyer
2004-05-27 5:38 ` Nick Piggin
2004-05-26 12:37 ` Matthias Schniedermeyer
2004-05-26 13:06 ` Gianni Tedesco
2004-05-26 13:41 ` Matt H.
2004-05-26 13:55 ` Buddy Lumpkin
2004-05-27 5:14 ` Tom Felker
2004-05-27 6:02 ` Nick Piggin
2004-05-27 7:04 ` Bernd Eckenfels
2004-05-27 7:16 ` Oliver Neukum
2004-05-26 10:45 ` Martin Olsson
2004-05-26 11:25 ` Nick Piggin
2004-05-26 16:33 ` David Schwartz
2004-05-26 16:58 ` John Bradford
2004-05-26 23:32 ` Kyle Moffett
2004-05-27 8:05 ` John Bradford
2004-05-26 10:46 ` John Bradford
2004-05-26 11:46 ` Buddy Lumpkin
2004-05-26 11:39 ` Buddy Lumpkin
2004-05-26 9:42 ` Anthony DiSante
2004-05-26 9:58 ` Nick Piggin
2004-05-26 20:11 ` Wakko Warner
2004-05-27 5:59 ` Nick Piggin
2004-05-27 14:34 ` Wakko Warner
2004-05-26 10:40 ` Buddy Lumpkin
2004-05-26 13:15 ` Helge Hafting
2004-05-26 9:09 ` William Lee Irwin III
2004-05-26 11:38 ` Buddy Lumpkin
2004-05-26 12:12 ` Paulo Marques
2004-05-26 12:14 ` Nick Piggin
2004-05-26 12:40 ` Denis Vlasenko
2004-05-26 10:41 ` Denis Vlasenko
2004-05-26 12:07 ` Buddy Lumpkin
2004-05-26 12:06 ` Marc-Christian Petersen
2004-05-26 12:19 ` Denis Vlasenko
2004-05-26 13:48 ` Buddy Lumpkin
2004-05-26 12:33 ` Richard B. Johnson
2004-05-26 13:25 ` Buddy Lumpkin
2004-05-26 12:30 ` Rik van Riel
2004-05-26 10:44 ` Denis Vlasenko
2004-05-26 11:49 ` Buddy Lumpkin
2004-05-26 12:19 ` Rik van Riel
2004-05-26 12:55 ` Buddy Lumpkin
2004-05-26 8:27 ` Roger Luethi
2004-05-26 9:23 ` John Bradford
2004-05-26 9:30 ` Roger Luethi
2004-05-26 10:35 ` John Bradford
2004-05-26 10:37 ` Nick Piggin
2004-05-26 10:48 ` John Bradford
2004-05-26 13:01 ` Helge Hafting
2004-05-26 8:32 ` Denis Vlasenko
2004-05-26 9:00 ` Helge Hafting
2004-05-26 9:40 ` John Bradford
2004-05-26 13:06 ` Helge Hafting
2004-05-26 9:06 ` John Bradford
2004-05-26 12:31 ` Buddy Lumpkin
2004-05-26 10:02 ` Raphael Jacquot
2004-05-26 13:00 ` Satoshi Oshima
2004-05-26 13:38 ` William Lee Irwin III
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=40C0AC9D.1020805@tmr.com \
--to=davidsen@tmr.com \
--cc=b.lumpkin@comcast.net \
--cc=ecki-news2004-05@lina.inka.de \
--cc=fabian.frederick@skynet.be \
--cc=kernel@kolivas.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