From: Scott Mayhew <smayhew@redhat.com>
To: linux-nfs@vger.kernel.org
Subject: [PATCH RFC 0/1] Allow nfs_updatepage to extend a write to cover a full page when we have a lock that covers the entire file
Date: Thu, 23 May 2013 17:53:40 -0400 [thread overview]
Message-ID: <1369346021-20041-1-git-send-email-smayhew@redhat.com> (raw)
We had a customer experience some performance issues after migrating their
MQseries servers from AIX to Linux. Their performance benchmark basically puts
50000 messages in a message queue, and a tcpdump captured during these tests
would show a ton of very small writes that were sequential but not contiguous.
After doing some investigation with systemtap we determined that when we called
nfs_updatepage() we were not being allowed to extend the write because the
inode->i_flock was not NULL. So then later when we'd arrive at
nfs_try_to_update_request() we would always wind up calling nfs_wb_page().
I gave the customer a test kernel using a patch similar to the one that follows
and the test results were favorable, with far fewer writes, the majority of
which were utilizing the full wsize. For example, the top ten write sizes and
number of occurrences from a tcpdump captured while running the benchmark with
an unpatched kernel:
$ tshark -r before.pcap.gz -R "nfs.opcode==write && nfs.stateid4.hash==0xf09c"
-T fields -e nfs.write.data_length | sort | uniq -c | sort -nr | head
5852 512
5575 1024
2262 1035
2160 1121
1661 1023
1460 1074
1413 1073
1394 1152
1244 1055
933 1804
contrasted with a tcpdump captured while running the benchmark with the test
kernel:
$ tshark -r after.pcap.gz -R "nfs.opcode==write && nfs.stateid4.hash==0x9f87"
-T fields -e nfs.write.data_length | sort | uniq -c | sort -nr | head
917 65536
76 36864
69 20480
55 53248
32 18432
31 49152
31 4096
31 32768
30 16384
25 65536,4096
Scott Mayhew (1):
NFS: Allow nfs_updatepage to extend a write to cover a full page when
we have a lock that covers the entire file
fs/nfs/write.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
--
1.7.11.7
next reply other threads:[~2013-05-23 21:53 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-23 21:53 Scott Mayhew [this message]
2013-05-23 21:53 ` [PATCH RFC 1/1] NFS: Allow nfs_updatepage to extend a write to cover a full page when we have a lock that covers the entire file Scott Mayhew
2013-05-23 22:15 ` Myklebust, Trond
2013-05-23 22:24 ` Jeff Layton
2013-05-23 22:30 ` Myklebust, Trond
2013-05-24 11:24 ` Jeff Layton
2013-06-04 13:21 ` Scott Mayhew
2013-06-04 14:01 ` Jeff Layton
2013-06-25 19:15 ` Jeff Layton
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=1369346021-20041-1-git-send-email-smayhew@redhat.com \
--to=smayhew@redhat.com \
--cc=linux-nfs@vger.kernel.org \
/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).