From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
To: Ying Han <yinghan@google.com>
Cc: "linux-mm@kvack.org" <linux-mm@kvack.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"nishimura@mxp.nes.nec.co.jp" <nishimura@mxp.nes.nec.co.jp>,
"balbir@linux.vnet.ibm.com" <balbir@linux.vnet.ibm.com>,
hannes@cmpxchg.org, Michal Hocko <mhocko@suse.cz>,
"akpm@linux-foundation.org" <akpm@linux-foundation.org>
Subject: Re: [PATCH 0/8] memcg async reclaim v2
Date: Tue, 24 May 2011 09:19:28 +0900 [thread overview]
Message-ID: <20110524091928.3aee46da.kamezawa.hiroyu@jp.fujitsu.com> (raw)
In-Reply-To: <BANLkTimd0CAqoAnuGz7WvKsbwphJxo0eZQ@mail.gmail.com>
On Mon, 23 May 2011 15:38:31 -0700
Ying Han <yinghan@google.com> wrote:
> Hi Kame:
>
> I applied and tested the patchset on top of mmotm-2011-05-12-15-52. I
> admit that I didn't look the patch closely yet, which I plan to do
> next. Now i have few quick questions based on the testing result:
>
> Test:
> 1) create a 2g memcg and enable async_control
> $ mkdir /dev/cgroup/memory/A
> $ echo 2g >/dev/cgroup/memory/A/memory.limit_in_bytes
> $ echo 1 >/dev/cgroup/memory/A/memory.async_control
>
> 2) read a 20g file in the memcg
> $ echo $$ >/dev/cgroup/memory/A/tasks
> $ time cat /export/hdc3/dd_A/tf0 > /dev/zero
>
> real 4m26.677s
> user 0m0.222s
> sys 0m28.481s
>
> Here are the questions:
>
> 1. I monitored the "top" while the test is running. The amount of
> cputime the kworkers take worries me, and the following top output
> stays pretty consistent while the "cat" is running/
>
memcg-async's kworker is kworker/u:x .....because of UNBOUND_WQ.
Then, kworker you see is for other purpose....Hmm, from trace log,
most of them are for "draining" per-cpu memcg cache. I'll prepare a patch.
> Tasks: 152 total, 2 running, 150 sleeping, 0 stopped, 0 zombie
> Cpu(s): 0.1%us, 1.2%sy, 0.0%ni, 87.6%id, 10.6%wa, 0.0%hi, 0.5%si, 0.0%st
> Mem: 32963480k total, 2694728k used, 30268752k free, 3888k buffers
> Swap: 0k total, 0k used, 0k free, 2316500k cached
>
> PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
> 389 root 20 0 0 0 0 R 45 0.0 1:36.24
> kworker/3:1
> 23127 root 20 0 0 0 0 S 44 0.0 0:13.44
> kworker/4:2
> 393 root 20 0 0 0 0 S 43 0.0 2:02.28
> kworker/7:1
> 32 root 20 0 0 0 0 S 42 0.0 1:54.02
> kworker/6:0
> 1230 root 20 0 0 0 0 S 42 0.0 1:22.01
> kworker/2:2
> 23130 root 20 0 0 0 0 S 31 0.0 0:04.04
> kworker/0:2
> 391 root 20 0 0 0 0 S 22 0.0 1:45.79
> kworker/5:1
> 23109 root 20 0 3104 228 180 D 10 0.0 0:08.56 cat
>
> I attached the tracing output of the kworkers while they are running
> by doing the following:
>
> $ mount -t debugfs nodev /sys/kernel/debug/
> $ echo workqueue:workqueue_queue_work > /sys/kernel/debug/tracing/set_event
> $ cat /sys/kernel/debug/tracing/trace_pipe > out.txt
>
> 2. I can not justify the cputime on the kworkers. I am looking for the
> patch which we exports the time before and after workitem on memcg
> basis. I recall we have that in previous post, sorry I missed that
> patch somehere.
>
> # cat /cgroup/memory/A/memory.stat
> ....
> direct_elapsed_ns 0
> wmark_elapsed_ns 103566424
> direct_scanned 0
> wmark_scanned 29303
> direct_freed 0
> wmark_freed 29290
>
I didn't include this for this version because you and others working on
memory.stat file. I wanted to avoid to add new mess ;)
I'll include it again in v3.
> 3. Here is the outout of memory.stat after the test, the last one is
> the memory.failcnt. As far as I remember, the failcnt is far higher
> than the result i got on previous testing (per-memcg-per-kswapd
> patch). This is all clean file pages which shouldn't be hard to
> reclaim.
>
> cache 2147151872
> rss 94208
> mapped_file 0
> pgpgin 5242945
> pgpgout 4718715
> pgfault 274
> pgmajfault 0
> 1050041
>
> Please let me know if the current version isn't ready for testing, and
> I will wait :)
>
This version has tweaked to be less cpu hogging than previous one. So,
hit_limit increases. I'll drop some tweakes I added in v2 for starting from
a simple one.
I'll post v3 in this week. But if dirty_ratio is ready, I think it should be
merged 1st. But it's merge window....
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
prev parent reply other threads:[~2011-05-24 0:26 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-20 3:37 KAMEZAWA Hiroyuki
2011-05-20 3:41 ` [PATCH 1/8] memcg: export zone reclaimable pages KAMEZAWA Hiroyuki
2011-05-20 3:42 ` [PATCH 2/8] memcg: easy check routine for reclaimable KAMEZAWA Hiroyuki
2011-05-20 21:49 ` Andrew Morton
2011-05-20 23:57 ` Hiroyuki Kamezawa
2011-05-20 3:43 ` [PATCH 0/8] memcg: clean up, export swapiness KAMEZAWA Hiroyuki
2011-05-23 17:26 ` Ying Han
2011-05-23 23:55 ` KAMEZAWA Hiroyuki
2011-05-20 3:44 ` [PATCH 4/8] memcg: export release victim KAMEZAWA Hiroyuki
2011-05-20 3:46 ` [PATCH 6/8] memcg asynchronous memory reclaim interface KAMEZAWA Hiroyuki
2011-05-20 21:49 ` Andrew Morton
2011-05-20 23:56 ` Hiroyuki Kamezawa
2011-05-23 23:36 ` Ying Han
2011-05-24 0:11 ` KAMEZAWA Hiroyuki
2011-05-24 0:26 ` Ying Han
2011-05-20 3:47 ` [PATCH 7/8] memcg static scan reclaim for asyncrhonous reclaim KAMEZAWA Hiroyuki
2011-05-20 21:50 ` Andrew Morton
2011-05-21 0:23 ` Hiroyuki Kamezawa
2011-05-20 3:48 ` [PATCH 8/8] memcg asyncrhouns reclaim workqueue KAMEZAWA Hiroyuki
2011-05-20 21:51 ` Andrew Morton
2011-05-21 0:41 ` Hiroyuki Kamezawa
2011-05-21 1:26 ` Andrew Morton
2011-05-23 0:25 ` KAMEZAWA Hiroyuki
2011-05-25 5:51 ` Ying Han
[not found] ` <BANLkTimd0CAqoAnuGz7WvKsbwphJxo0eZQ@mail.gmail.com>
2011-05-24 0:19 ` KAMEZAWA Hiroyuki [this message]
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=20110524091928.3aee46da.kamezawa.hiroyu@jp.fujitsu.com \
--to=kamezawa.hiroyu@jp.fujitsu.com \
--cc=akpm@linux-foundation.org \
--cc=balbir@linux.vnet.ibm.com \
--cc=hannes@cmpxchg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.cz \
--cc=nishimura@mxp.nes.nec.co.jp \
--cc=yinghan@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