[lkml]   [2011]   [Sep]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
SubjectRe: [PATCH 00/18] IO-less dirty throttling v11
> Finally, the complete IO-less balance_dirty_pages(). NFS is observed to perform
> better or worse depending on the memory size. Otherwise the added patches can
> address all known regressions.

I find that the NFS performance regressions on large memory system can
be fixed by this patch. It tries to make the progress more smooth by
reasonably reducing the commit size.

Subject: nfs: limit the commit size to reduce fluctuations
Date: Thu Dec 16 13:22:43 CST 2010

Limit the commit size to half the dirty control scope, so that the
arrival of one commit will not knock the overall dirty pages off the

Also limit the commit size to one second worth of data. This will
obviously help make the pipeline run more smoothly.

Also change "<=" to "<": if an inode has only one dirty page in the end,
it should be committed. I wonder why the "<=" didn't cause a bug...

CC: Trond Myklebust <>
Signed-off-by: Wu Fengguang <>
fs/nfs/write.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)

After patch, there are still drop offs from the control scope,

due to bursty arrival of commits:

--- linux-next.orig/fs/nfs/write.c 2011-09-07 21:29:15.000000000 +0800
+++ linux-next/fs/nfs/write.c 2011-09-07 21:29:32.000000000 +0800
@@ -1543,10 +1543,14 @@ static int nfs_commit_unstable_pages(str
int ret = 0;

if (wbc->sync_mode == WB_SYNC_NONE) {
+ unsigned long bw = MIN_WRITEBACK_PAGES +
+ NFS_SERVER(inode)->backing_dev_info.avg_write_bandwidth;
/* Don't commit yet if this is a non-blocking flush and there
- * are a lot of outstanding writes for this mapping.
+ * are a lot of outstanding writes for this mapping, until
+ * collected enough pages to commit.
- if (nfsi->ncommit <= (nfsi->npages >> 1))
+ if (nfsi->ncommit < min(nfsi->npages / DIRTY_SCOPE, bw))
goto out_mark_dirty;

/* don't wait for the COMMIT response */

 \ /
  Last update: 2011-09-07 18:23    [W:0.369 / U:4.576 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site