From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
To: Joel Krauska <jkrauska@gmail.com>
Cc: linux-mm@kvack.org
Subject: Re: swapoff throttling and speedup?
Date: Thu, 4 Jun 2009 11:54:48 +0900 [thread overview]
Message-ID: <20090604115448.c1b434ed.kamezawa.hiroyu@jp.fujitsu.com> (raw)
In-Reply-To: <4A2734BA.7080004@gmail.com>
On Wed, 03 Jun 2009 19:43:06 -0700
Joel Krauska <jkrauska@gmail.com> wrote:
> KAMEZAWA Hiroyuki wrote:
> >> 1. Has anyone tried making a nicer swapoff?
> >> Right now swapoff can be pretty aggressive if the system is otherwise
> >> heavily loaded. On systems that I need to leave running other jobs,
> >> swapoff compounds the slowness of the system overall by burning up
> >> a single CPU and lots of IO
> >>
> >> I wrote a perl wrapper that briefly runs swapoff
> >> and then kills it, but it would seem more reasonable to have a knob
> >> to make swapoff less aggressive. (max kb/s, etc)
> >>
> >> It looked to me like the swapoff code was immediately hitting kernel
> >> internals instead of doing more lifting itself (and making it
> >> obvious where I could insert some sleeps)
> >>
>
> I find I need a slower swapoff when a system that's already running very hot
> needs to be recovered from lots of swapping without overly impacting the other
> running processes.
>
> The bulk of the work is still being done in normal RAM, and the overhead
> of consuming an entire CPU just for swapoff degrades my other running processes.
>
> > How about throttling swapoff's cpu usage by cpu scheduler cgroup ?
> > No help ?
>
> I think swapoff is all done as systemcalls, not in userspace, so I'm not
> sure that cgroups would apply here. (granted I had never heard of control
> groups until just now...)
>
IIUC, some "cond_resched()" , means "reschedule if necessary", are inserted to
swapoff's main loop. Then, limiting usage of cpu may have effects, I think.
Thanks,
-Kame
--
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-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2009-06-04 2:56 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-03 17:01 Joel Krauska
2009-06-04 2:04 ` KAMEZAWA Hiroyuki
2009-06-04 2:43 ` Joel Krauska
2009-06-04 2:54 ` KAMEZAWA Hiroyuki [this message]
2009-06-04 15:50 ` Hugh Dickins
2009-06-04 16:25 ` KAMEZAWA Hiroyuki
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=20090604115448.c1b434ed.kamezawa.hiroyu@jp.fujitsu.com \
--to=kamezawa.hiroyu@jp.fujitsu.com \
--cc=jkrauska@gmail.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