All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@redhat.com>
To: xfs mailing list <xfs@oss.sgi.com>
Cc: Christoph Hellwig <hch@infradead.org>,
	linux-mm@kvack.org, "MASON, CHRISTOPHER" <CHRIS.MASON@oracle.com>
Subject: [PATCH] bump up nr_to_write in xfs_vm_writepage
Date: Thu, 02 Jul 2009 16:29:41 -0500	[thread overview]
Message-ID: <4A4D26C5.9070606@redhat.com> (raw)

Talking w/ someone who had a raid6 of 15 drives on an areca
controller, he wondered why he could only get 300MB/s or so
out of a streaming buffered write to xfs like so:

dd if=/dev/zero of=/mnt/storage/10gbfile bs=128k count=81920
10737418240 bytes (11 GB) copied, 34.294 s, 313 MB/s

when the same write directly to the device was going closer
to 700MB/s...

With the following change things get moving again for xfs:

dd if=/dev/zero of=/mnt/storage/10gbfile bs=128k count=81920
10737418240 bytes (11 GB) copied, 16.2938 s, 659 MB/s

Chris had sent out something similar at Christoph's suggestion,
and Christoph reminded me of it, and I tested it a variant of
it, and it seems to help shockingly well.

Feels like a bandaid though; thoughts?  Other tests to do?

Thanks,
-Eric

Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Cc: Chris Mason <chris.mason@oracle.com>
---

Index: linux-2.6/fs/xfs/linux-2.6/xfs_aops.c
===================================================================
--- linux-2.6.orig/fs/xfs/linux-2.6/xfs_aops.c
+++ linux-2.6/fs/xfs/linux-2.6/xfs_aops.c
@@ -1268,6 +1268,13 @@ xfs_vm_writepage(
 	if (!page_has_buffers(page))
 		create_empty_buffers(page, 1 << inode->i_blkbits, 0);
 
+
+	/*
+	 *  VM calculation for nr_to_write seems off.  Bump it way
+	 *  up, this gets simple streaming writes zippy again.
+	 */
+	wbc->nr_to_write *= 4;
+
 	/*
 	 * Convert delayed allocate, unwritten or unmapped space
 	 * to real space and flush out to disk.

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

WARNING: multiple messages have this Message-ID (diff)
From: Eric Sandeen <sandeen@redhat.com>
To: xfs mailing list <xfs@oss.sgi.com>
Cc: linux-mm@kvack.org, Christoph Hellwig <hch@infradead.org>,
	"MASON,CHRISTOPHER" <CHRIS.MASON@oracle.com>
Subject: [PATCH] bump up nr_to_write in xfs_vm_writepage
Date: Thu, 02 Jul 2009 16:29:41 -0500	[thread overview]
Message-ID: <4A4D26C5.9070606@redhat.com> (raw)

Talking w/ someone who had a raid6 of 15 drives on an areca
controller, he wondered why he could only get 300MB/s or so
out of a streaming buffered write to xfs like so:

dd if=/dev/zero of=/mnt/storage/10gbfile bs=128k count=81920
10737418240 bytes (11 GB) copied, 34.294 s, 313 MB/s

when the same write directly to the device was going closer
to 700MB/s...

With the following change things get moving again for xfs:

dd if=/dev/zero of=/mnt/storage/10gbfile bs=128k count=81920
10737418240 bytes (11 GB) copied, 16.2938 s, 659 MB/s

Chris had sent out something similar at Christoph's suggestion,
and Christoph reminded me of it, and I tested it a variant of
it, and it seems to help shockingly well.

Feels like a bandaid though; thoughts?  Other tests to do?

Thanks,
-Eric

Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Cc: Chris Mason <chris.mason@oracle.com>
---

Index: linux-2.6/fs/xfs/linux-2.6/xfs_aops.c
===================================================================
--- linux-2.6.orig/fs/xfs/linux-2.6/xfs_aops.c
+++ linux-2.6/fs/xfs/linux-2.6/xfs_aops.c
@@ -1268,6 +1268,13 @@ xfs_vm_writepage(
 	if (!page_has_buffers(page))
 		create_empty_buffers(page, 1 << inode->i_blkbits, 0);
 
+
+	/*
+	 *  VM calculation for nr_to_write seems off.  Bump it way
+	 *  up, this gets simple streaming writes zippy again.
+	 */
+	wbc->nr_to_write *= 4;
+
 	/*
 	 * Convert delayed allocate, unwritten or unmapped space
 	 * to real space and flush out to disk.

--
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/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

             reply	other threads:[~2009-07-02 21:29 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-02 21:29 Eric Sandeen [this message]
2009-07-02 21:29 ` [PATCH] bump up nr_to_write in xfs_vm_writepage Eric Sandeen
2009-07-03 23:51 ` Michael Monnerie
2009-07-07  9:07 ` Olaf Weber
2009-07-07  9:07   ` Olaf Weber
2009-07-07 10:19   ` Christoph Hellwig
2009-07-07 10:19     ` Christoph Hellwig
2009-07-07 10:33     ` KOSAKI Motohiro
2009-07-07 10:33       ` KOSAKI Motohiro
2009-07-07 10:44       ` Christoph Hellwig
2009-07-07 10:44         ` Christoph Hellwig
2009-07-09  2:04         ` KOSAKI Motohiro
2009-07-09  2:04           ` KOSAKI Motohiro
2009-07-09 13:01           ` Chris Mason
2009-07-09 13:01             ` Chris Mason
2009-07-10  7:12             ` KOSAKI Motohiro
2009-07-10  7:12               ` KOSAKI Motohiro
2009-07-24  5:20               ` Felix Blyakher
2009-07-24  5:20                 ` Felix Blyakher
2009-07-24  5:33                 ` KOSAKI Motohiro
2009-07-24  5:33                   ` KOSAKI Motohiro
2009-07-24 12:05                 ` Chris Mason
2009-07-24 12:05                   ` Chris Mason
2009-07-07 11:37     ` Olaf Weber
2009-07-07 11:37       ` Olaf Weber
2009-07-07 14:46       ` Christoph Hellwig
2009-07-07 14:46         ` Christoph Hellwig
2009-07-07 15:17 ` Chris Mason
2009-07-07 15:17   ` Chris Mason

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=4A4D26C5.9070606@redhat.com \
    --to=sandeen@redhat.com \
    --cc=CHRIS.MASON@oracle.com \
    --cc=hch@infradead.org \
    --cc=linux-mm@kvack.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.