1 Nov 2011 11:52
Re: [patch 3/5] mm: try to distribute dirty pages fairly across zones
Johannes Weiner <jweiner <at> redhat.com>
2011-11-01 10:52:57 GMT
2011-11-01 10:52:57 GMT
On Sat, Oct 29, 2011 at 04:39:44AM +0800, Wu Fengguang wrote: > [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. They are throttled in balance_dirty_pages() when there are too many dirty pages. But they are also 'throttled' in direct reclaim when there are too many clean + dirty pages. Wild guess: speeding up direct reclaim allows dirty pages to be generated faster and the(Continue reading)
> Besides, the patchset also performs good on random writes:
>
> 3.1.0-rc9-ioless-full-nfs-wq5-next-20111014+
3.1.0-rc9-ioless-full-per-zone-dirty-next-20111014+
> ------------------------ ------------------------
> 1.65 -5.1% 1.57 MMAP-RANDWRITE-4K/btrfs-fio_fat_mmap_randwrite_4k-4k-8p-4096M-20:10-X
> 18.65 -6.4% 17.46 MMAP-RANDWRITE-4K/ext3-fio_fat_mmap_randwrite_4k-4k-8p-4096M-20:10-X
> 2.09 +1.2% 2.12 MMAP-RANDWRITE-4K/ext4-fio_fat_mmap_randwrite_4k-4k-8p-4096M-20:10-X
> 2.49 -0.3% 2.48 MMAP-RANDWRITE-4K/xfs-fio_fat_mmap_randwrite_4k-4k-8p-4096M-20:10-X
> 51.35 +0.0% 51.36 MMAP-RANDWRITE-64K/btrfs-fio_fat_mmap_randwrite_64k-64k-8p-4096M-20:10-X
> 45.20 +0.5% 45.43 MMAP-RANDWRITE-64K/ext3-fio_fat_mmap_randwrite_64k-64k-8p-4096M-20:10-X
> 44.77 +0.7% 45.10 MMAP-RANDWRITE-64K/ext4-fio_fat_mmap_randwrite_64k-64k-8p-4096M-20:10-X
> 45.11 +2.5% 46.23 MMAP-RANDWRITE-64K/xfs-fio_fat_mmap_randwrite_64k-64k-8p-4096M-20:10-X
> 211.31 +0.2% 211.74 TOTAL write_bw
RSS Feed