From: Helge Hafting <helgehaf@aitel.hist.no>
To: Yaroslav Rastrigin <yarick@relex.ru>
Cc: linux-kernel@vger.kernel.org, mlmoser@comcast.net
Subject: Re: How do I make this thing stop laging? Reboot? Sounds like Windows!
Date: Wed, 18 Jun 2003 13:02:18 +0200 [thread overview]
Message-ID: <20030618110218.GA2037@hh.idb.hist.no> (raw)
In-Reply-To: <200306181330.48072.yarick@relex.ru>
On Wed, Jun 18, 2003 at 01:30:48PM +0400, Yaroslav Rastrigin wrote:
[...]
> Well, the problem is probably unsolvable on kernel level (kernel is unaware of
> user's habits in app/mem usage), but I think it's pretty solvable on user
> level - give us a knob to tune VM's behavior. We mere mortals often know
> better how we will use our system's memory, and which apps we will be
> running.
There are some knobs. There's the mlock call that disables
paging for whatever memory you want.
xmms could easily stop skipping if it mlocks its own code
and data. Running it at elevated priority might also
be a good idea, so cpu hogs don't starve it.
Both of these needs root pribileges, or at least a suid
binary. (The priority stuff _can_ be done without extra
privileges by nicing every _other_ process instead.)
> I, for myself, like laptop-mode patch (basically, it groups disk
> writes to do them once in 5-10 minutes, thus allowing hdd to sleep a lot)
> very much - when I'm on AC, most probably I'm in office , and turning it off
> is reasonable. When I'm on battery, though, chances are I won't be compiling
> the kernel and/or do other heavy disk IO, instead, I most likely will be
> coding, so echo 1 >/proc/sys/vm/laptop_mode seems appropriate, reasonable and
> useful.
> Could something like this be done with VM/swap policy ?
>
Sure. Take a look at /proc/sys/vm/swappiness for example.
More stuff like this can be made - by those interested.
The original poster also fixed the problems by doing
swapoff -a ; swapon -a
after quitting a memory hog. That can be automated
with a little cron script that parses the output
of free or vmstat and do this trick whenever
free memory exceed the amount in swap.
Helge Hafting
next prev parent reply other threads:[~2003-06-18 10:43 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-06-18 0:30 rmoser
2003-06-18 8:22 ` Helge Hafting
2003-06-18 9:22 ` Karl Vogel
2003-06-18 9:44 ` Oliver Neukum
2003-06-18 10:23 ` Anders Karlsson
2003-06-18 15:08 ` Gianni Tedesco
2003-06-18 16:43 ` Joe
2003-06-18 9:30 ` Yaroslav Rastrigin
2003-06-18 11:02 ` Helge Hafting [this message]
2003-06-18 12:17 ` Mike Galbraith
2003-06-19 8:04 ` H. Peter Anvin
2003-06-19 10:00 ` Helge Hafting
2003-06-19 10:02 ` Nick Piggin
2003-06-19 15:54 ` Daniel Gryniewicz
2003-06-18 9:56 Karl Vogel
2003-06-18 16:53 ` Oliver Neukum
2003-06-18 10:43 Karl Vogel
2003-06-18 10:49 Karl Vogel
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=20030618110218.GA2037@hh.idb.hist.no \
--to=helgehaf@aitel.hist.no \
--cc=linux-kernel@vger.kernel.org \
--cc=mlmoser@comcast.net \
--cc=yarick@relex.ru \
/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®