From: Wu Fengguang <fengguang.wu@intel.com>
To: Johannes Weiner <jweiner@redhat.com>
Cc: Michal Hocko <mhocko@suse.cz>,
Andrew Morton <akpm@linux-foundation.org>,
Mel Gorman <mgorman@suse.de>,
Christoph Hellwig <hch@infradead.org>,
Dave Chinner <david@fromorbit.com>, Jan Kara <jack@suse.cz>,
Rik van Riel <riel@redhat.com>,
Minchan Kim <minchan.kim@gmail.com>,
Chris Mason <chris.mason@oracle.com>,
Theodore Ts'o <tytso@mit.edu>,
Andreas Dilger <adilger.kernel@dilger.ca>,
"Li, Shaohua" <shaohua.li@intel.com>,
"xfs@oss.sgi.com" <xfs@oss.sgi.com>,
"linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>,
"linux-ext4@vger.kernel.org" <linux-ext4@vger.kernel.org>,
"linux-mm@kvack.org" <linux-mm@kvack.org>,
"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [patch 3/5] mm: try to distribute dirty pages fairly across zones
Date: Sat, 29 Oct 2011 04:39:44 +0800 [thread overview]
Message-ID: <20111028203944.GB20607@localhost> (raw)
In-Reply-To: <20111027231933.GB1319@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 3343 bytes --]
[restore CC list]
> > I'm trying to understand where the performance gain comes from.
> >
> > I noticed that in all cases, before/after patchset, nr_vmscan_write are all zero.
> >
> > nr_vmscan_immediate_reclaim is significantly reduced though:
>
> That's a good thing, it means we burn less CPU time on skipping
> through dirty pages on the LRU.
>
> Until a certain priority level, the dirty pages encountered on the LRU
> list are marked PageReclaim and put back on the list, this is the
> nr_vmscan_immediate_reclaim number. And only below that priority, we
> actually ask the FS to write them, which is nr_vmscan_write.
Yes, it is.
> I suspect this is where the performance improvement comes from: we
> find clean pages for reclaim much faster.
That explains how it could reduce CPU overheads. However the dd's are
throttled anyway, so I still don't understand how the speedup of dd page
allocations improve the _IO_ performance.
> > $ ./compare.rb -g 1000M -e nr_vmscan_immediate_reclaim thresh*/*-ioless-full-nfs-wq5-next-20111014+ thresh*/*-ioless-full-per-zone-dirty-next-20111014+
> > 3.1.0-rc9-ioless-full-nfs-wq5-next-20111014+ 3.1.0-rc9-ioless-full-per-zone-dirty-next-20111014+
> > ------------------------ ------------------------
> > 560289.00 -98.5% 8145.00 thresh=1000M/btrfs-100dd-4k-8p-4096M-1000M:10-X
> > 576882.00 -98.4% 9511.00 thresh=1000M/btrfs-10dd-4k-8p-4096M-1000M:10-X
> > 651258.00 -98.8% 7963.00 thresh=1000M/btrfs-1dd-4k-8p-4096M-1000M:10-X
> > 1963294.00 -85.4% 286815.00 thresh=1000M/ext3-100dd-4k-8p-4096M-1000M:10-X
> > 2108028.00 -10.6% 1885114.00 thresh=1000M/ext3-10dd-4k-8p-4096M-1000M:10-X
> > 2499456.00 -99.9% 2061.00 thresh=1000M/ext3-1dd-4k-8p-4096M-1000M:10-X
> > 2534868.00 -78.5% 545815.00 thresh=1000M/ext4-100dd-4k-8p-4096M-1000M:10-X
> > 2921668.00 -76.8% 677177.00 thresh=1000M/ext4-10dd-4k-8p-4096M-1000M:10-X
> > 2841049.00 -100.0% 779.00 thresh=1000M/ext4-1dd-4k-8p-4096M-1000M:10-X
> > 2481823.00 -86.3% 339342.00 thresh=1000M/xfs-100dd-4k-8p-4096M-1000M:10-X
> > 2508629.00 -87.4% 316614.00 thresh=1000M/xfs-10dd-4k-8p-4096M-1000M:10-X
> > 2656628.00 -100.0% 678.00 thresh=1000M/xfs-1dd-4k-8p-4096M-1000M:10-X
> > 24303872.00 -83.2% 4080014.00 TOTAL nr_vmscan_immediate_reclaim
> >
> > If you'd like to compare any other vmstat items before/after patch,
> > let me know and I'll run the compare script to find them out.
>
> I will come back to you on this, so tired right now. But I find your
> scripts interesting ;-) Are those released and available for download
> somewhere? I suspect every kernel hacker has their own collection of
> scripts to process data like this, maybe we should pull them all
> together and put them into a git tree!
Thank you for the interest :-)
I used to upload my writeback test scripts to kernel.org. However its
file service is not restored yet. So I attach the compare script here.
It's a bit hacky for now, which I hope can be improved over time to be
useful to other projects as well.
Thanks,
Fengguang
[-- Attachment #2: compare.rb --]
[-- Type: application/x-ruby, Size: 7046 bytes --]
next prev parent reply other threads:[~2011-10-28 20:39 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-30 7:17 [patch 0/5] per-zone dirty limits v3 Johannes Weiner
2011-09-30 7:17 ` [patch 1/5] mm: exclude reserved pages from dirtyable memory Johannes Weiner
2011-09-30 13:53 ` Michal Hocko
2011-10-01 7:10 ` Minchan Kim
2011-10-03 11:22 ` Mel Gorman
2011-09-30 7:17 ` [patch 2/5] mm: writeback: cleanups in preparation for per-zone dirty limits Johannes Weiner
2011-09-30 13:56 ` Michal Hocko
2011-09-30 7:17 ` [patch 3/5] mm: try to distribute dirty pages fairly across zones Johannes Weiner
2011-09-30 7:35 ` Pekka Enberg
2011-09-30 8:55 ` Johannes Weiner
2011-09-30 14:28 ` Michal Hocko
2011-10-28 20:18 ` Wu Fengguang
2011-10-31 11:33 ` Wu Fengguang
2011-11-01 10:55 ` Johannes Weiner
[not found] ` <20111027155618.GA25524@localhost>
[not found] ` <20111027161359.GA1319@redhat.com>
[not found] ` <20111027204743.GA19343@localhost>
[not found] ` <20111027221258.GA22869@localhost>
[not found] ` <20111027231933.GB1319@redhat.com>
2011-10-28 20:39 ` Wu Fengguang [this message]
2011-11-01 10:52 ` Johannes Weiner
2011-09-30 7:17 ` [patch 4/5] mm: filemap: pass __GFP_WRITE from grab_cache_page_write_begin() Johannes Weiner
2011-09-30 14:41 ` Michal Hocko
2011-09-30 7:17 ` [patch 5/5] Btrfs: pass __GFP_WRITE for buffered write page allocations Johannes Weiner
2011-10-03 11:25 ` Mel Gorman
-- strict thread matches above, loose matches on Subject: below --
2011-11-23 13:34 [patch 0/5] mm: per-zone dirty limits v3-resend Johannes Weiner
2011-11-23 13:34 ` [patch 3/5] mm: try to distribute dirty pages fairly across zones Johannes Weiner
2011-11-24 1:07 ` KAMEZAWA Hiroyuki
2011-11-24 13:11 ` Johannes Weiner
2011-11-25 1:00 ` 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=20111028203944.GB20607@localhost \
--to=fengguang.wu@intel.com \
--cc=adilger.kernel@dilger.ca \
--cc=akpm@linux-foundation.org \
--cc=chris.mason@oracle.com \
--cc=david@fromorbit.com \
--cc=hch@infradead.org \
--cc=jack@suse.cz \
--cc=jweiner@redhat.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mgorman@suse.de \
--cc=mhocko@suse.cz \
--cc=minchan.kim@gmail.com \
--cc=riel@redhat.com \
--cc=shaohua.li@intel.com \
--cc=tytso@mit.edu \
--cc=xfs@oss.sgi.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;
as well as URLs for NNTP newsgroup(s).