From: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
To: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Balbir Singh <balbir@linux.vnet.ibm.com>,
Li Zefan <lizf@cn.fujitsu.com>, Paul Menage <menage@google.com>,
linux-mm <linux-mm@kvack.org>,
Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
Subject: Re: [PATCH -mmotm 0/7] memcg: move charge at task migration (04/Dec)
Date: Mon, 7 Dec 2009 15:34:48 +0900 [thread overview]
Message-ID: <20091207153448.55e11607.nishimura@mxp.nes.nec.co.jp> (raw)
In-Reply-To: <20091204160042.3e5fd83d.kamezawa.hiroyu@jp.fujitsu.com>
[-- Attachment #1: Type: text/plain, Size: 3296 bytes --]
On Fri, 4 Dec 2009 16:00:42 +0900, KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> wrote:
> On Fri, 4 Dec 2009 15:53:17 +0900
> KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> wrote:
>
> > On Fri, 4 Dec 2009 14:46:09 +0900
> > Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp> wrote:
>
> > > In this version:
> > > | 252M | 512M | 1G
> > > -----+--------+--------+--------
> > > (1) | 0.15 | 0.30 | 0.60
> > > -----+--------+--------+--------
> > > (2) | 0.15 | 0.30 | 0.60
> > > -----+--------+--------+--------
> > > (3) | 0.22 | 0.44 | 0.89
> > >
> > Nice !
> >
>
> Ah. could you clarify...
>
> 1. How is fork()/exit() affected by this move ?
I measured using unixbench(./Run -c 1 spawn execl). I used the attached script to do
task migration infinitly(./switch3.sh /cgroup/memory/01 /cgroup/memory/02 [pid of bash]).
The script is executed on a different cpu from the unixbench's by taskset.
(1) no task migration(run on /01)
Execl Throughput 192.7 lps (29.9 s, 2 samples)
Process Creation 475.5 lps (30.0 s, 2 samples)
Execl Throughput 191.2 lps (29.9 s, 2 samples)
Process Creation 463.4 lps (30.0 s, 2 samples)
Execl Throughput 191.0 lps (29.9 s, 2 samples)
Process Creation 474.9 lps (30.0 s, 2 samples)
(2) under task migration between /01 and /02 w/o setting move_charge_at_immigrate
Execl Throughput 150.2 lps (29.8 s, 2 samples)
Process Creation 344.1 lps (30.0 s, 2 samples)
Execl Throughput 146.9 lps (29.8 s, 2 samples)
Process Creation 337.7 lps (30.0 s, 2 samples)
Execl Throughput 150.5 lps (29.8 s, 2 samples)
Process Creation 345.3 lps (30.0 s, 2 samples)
(3) under task migration between /01 and /02 w/ setting move_charge_at_immigrate
Execl Throughput 142.9 lps (29.9 s, 2 samples)
Process Creation 323.1 lps (30.0 s, 2 samples)
Execl Throughput 146.6 lps (29.8 s, 2 samples)
Process Creation 332.0 lps (30.0 s, 2 samples)
Execl Throughput 150.9 lps (29.8 s, 2 samples)
Process Creation 344.2 lps (30.0 s, 2 samples)
(those values seem terrible :( I run them on KVM guest...)
(2) seems a bit better than (3), but the impact of task migration itself is
far bigger.
> 2. How long cpuset's migration-at-task-move requires ?
> I guess much longer than this.
I measured in the same environment using fakenuma. It took 1.17sec for 256M,
2.33sec for 512M, and 4.69sec for 1G.
> 3. If need to reclaim memory for moving tasks, can this be longer ?
I think so.
> If so, we may need some trick to release cgroup_mutex in task moving.
>
hmm, I see your concern but I think it isn't so easy.. IMHO, we need changes
in cgroup layer and should take care not to cause dead lock.
Regards,
Daisuke Nishimura.
[-- Attachment #2: switch3.sh --]
[-- Type: text/x-sh, Size: 451 bytes --]
#!/bin/bash
SRC=$1
DST=$2
EXCLUDE_LIST="$3"
move_task()
{
local ret
for pid in $1
do
echo "${EXCLUDE_LIST}" | grep -w -q $pid
if [ $? -eq 0 ]; then
continue
fi
echo -n "$pid "
/bin/echo $pid >$2/tasks 2>/dev/null
done
echo ""
}
stopflag=0
interrupt()
{
stopflag=1
}
trap interrupt INT
while [ $stopflag -ne 1 ]
do
echo "----- `date` -----"
move_task "`cat ${SRC}/tasks`" ${DST}
TMP=${SRC}
SRC=${DST}
DST=${TMP}
done
next prev parent reply other threads:[~2009-12-07 6:36 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-04 5:46 Daisuke Nishimura
2009-12-04 5:47 ` [PATCH -mmotm 1/7] cgroup: introduce cancel_attach() Daisuke Nishimura
2009-12-04 5:48 ` [PATCH -mmotm 2/7] memcg: add interface to move charge at task migration Daisuke Nishimura
2009-12-04 6:55 ` KAMEZAWA Hiroyuki
2009-12-04 5:49 ` [PATCH -mmotm 3/7] memcg: move charges of anonymous page Daisuke Nishimura
2009-12-04 5:50 ` [PATCH -mmotm 4/7] memcg: improbe performance in moving charge Daisuke Nishimura
2009-12-04 7:10 ` KAMEZAWA Hiroyuki
2009-12-04 7:29 ` Daisuke Nishimura
2009-12-04 5:51 ` [PATCH -mmotm 5/7] memcg: avoid oom during " Daisuke Nishimura
2009-12-04 7:14 ` KAMEZAWA Hiroyuki
2009-12-04 7:43 ` Daisuke Nishimura
2009-12-04 5:52 ` [PATCH -mmotm 6/7] memcg: move charges of anonymous swap Daisuke Nishimura
2009-12-04 7:32 ` KAMEZAWA Hiroyuki
2009-12-04 10:53 ` Daisuke Nishimura
2009-12-04 5:54 ` [PATCH -mmotm 7/7] memcg: improbe performance in moving swap charge Daisuke Nishimura
2009-12-04 6:53 ` [PATCH -mmotm 0/7] memcg: move charge at task migration (04/Dec) KAMEZAWA Hiroyuki
2009-12-04 7:00 ` KAMEZAWA Hiroyuki
2009-12-07 6:34 ` Daisuke Nishimura [this message]
2009-12-09 0:21 ` KAMEZAWA Hiroyuki
2009-12-04 7:09 ` Daisuke Nishimura
2009-12-04 7:34 ` 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=20091207153448.55e11607.nishimura@mxp.nes.nec.co.jp \
--to=nishimura@mxp.nes.nec.co.jp \
--cc=akpm@linux-foundation.org \
--cc=balbir@linux.vnet.ibm.com \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=linux-mm@kvack.org \
--cc=lizf@cn.fujitsu.com \
--cc=menage@google.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