From: fengguang.wu@intel.com
To: Josef Bacik <jbacik@fusionio.com>
Cc: linux-btrfs <linux-btrfs@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
lkp@linux.intel.com
Subject: 1be41b78: +18% increased btrfs write throughput
Date: Fri, 3 Jan 2014 23:54:21 +0800 [thread overview]
Message-ID: <20140103155421.GA7494@localhost> (raw)
Hi Josef,
FYI. We are doing 0day performance tests and happen to notice that
btrfs write throughput increased considerably during v3.10-11 time
frame:
v3.10 v3.11 v3.12 v3.13-rc6
--------------- ------------------------- ------------------------- -------------------------
50619 ~ 1% +17.0% 59209 ~ 2% +18.8% 60159 ~ 2% +20.5% 61007 ~ 0% lkp-ws02/micro/dd-write/11HDD-JBOD-cfq-btrfs-1dd
50619 +17.0% 59209 +18.8% 60159 +20.5% 61007 TOTAL iostat.sdd.wkB/s
and it's contributed by
commit 1be41b78bc688fc634bf30965d2be692c99fd11d
Author: Josef Bacik <jbacik@fusionio.com>
AuthorDate: Wed Jun 12 13:56:06 2013 -0400
Commit: Josef Bacik <jbacik@fusionio.com>
CommitDate: Mon Jul 1 08:52:28 2013 -0400
Btrfs: fix transaction throttling for delayed refs
Dave has this fs_mark script that can make btrfs abort with sufficient amount of
ram. This is because with more ram we can keep more dirty metadata in cache
which in a round about way makes for many more pending delayed refs. What
happens is we end up not throttling the transaction enough so when we go to
commit the transaction when we've completely filled the file system we'll
abort() because we use all of the space in the global reserve and we still have
delayed refs to run. To fix this we need to make the delayed ref flushing and
the transaction throttling dependant upon the number of delayed refs that we
have instead of how much reserved space is left in the global reserve. With
this patch we not only stop aborting transactions but we also get a smoother run
speed with fs_mark and it makes us about 10% faster. Thanks,
Reported-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
fs/btrfs/ctree.h | 2 ++
fs/btrfs/extent-tree.c | 61 ++++++++++++++++++++++++++++++++++++++++++++++----
fs/btrfs/transaction.c | 24 +++++++++-----------
3 files changed, 69 insertions(+), 18 deletions(-)
time.elapsed_time
740 ++------------------*------------------------------------------------+
*.. .*.*..* *..*.*..*. |
720 ++ *.*..*.*. *..*.*..*. .*..*. .*..*. .*. |
| *. *..* *. *..*
700 ++ |
| |
680 ++ |
| |
660 ++ |
| |
640 ++ |
| |
620 ++ O O |
O O O O O O O O O O O O O O O O O O O O O O O O |
600 ++-------------------------------------------------------------------+
time.voluntary_context_switches
100000 ++------------------*-*----*--------------------------------------+
90000 ++ *. .*..*.*. *. *.. |
*. .. *..* .*.. .*..*.*.*..*.*..*.*..* .*
80000 ++* * * + .* |
70000 ++ *. |
| |
60000 ++ |
50000 ++ |
40000 ++ |
| |
30000 ++ |
20000 ++ |
| |
10000 ++ |
0 O+O--O-O--O-O--O-O--O-O-O--O-O--O-O--O-O--O-O-O--O-O--O-O--O-O----+
time.file_system_inputs
800000 ++--------------------*----*--------------------------------------+
| *. .*..*.*..* *. *.. |
700000 *+ .. *..* .*.. .*..*.*.*..*.*..*.*..* .*
| * * * + .* |
600000 ++ *. |
500000 ++ |
| |
400000 ++ |
| |
300000 ++ |
200000 ++ |
| |
100000 ++ |
| |
0 O+O--O-O--O-O--O-O--O-O-O--O-O--O-O--O-O--O-O-O--O-O--O-O--O-O----+
time.file_system_outputs
900000 ++----------------------------------------------------------------+
| *.*.. .*.*. .*. .*.*.*..*. .* |
800000 *+ .. *.*..*.*. *. *.. .*..*.*. *..*.*. + .*.*
700000 ++* * *. |
| |
600000 ++ |
500000 ++ |
| |
400000 ++ |
300000 ++ |
| |
200000 ++ |
100000 ++ |
| |
0 O+O--O-O--O-O--O-O--O-O-O--O-O--O-O--O-O--O-O-O--O-O--O-O--O-O----+
perf-stat.page-faults
6.6e+06 ++---------------------------------------------------------------+
| |
6.4e+06 ++ .*.*.. .*.. |
*. .*.*..*.*.*. *.* *. .*. .*..*. |
6.2e+06 ++*. *. *..*.* *..*.*.*..*.*..*.*
| |
6e+06 ++ |
| |
5.8e+06 ++ |
| |
5.6e+06 ++ |
| |
5.4e+06 ++O O |
O O O O O O O O O O O O O O O O O O O O O O O O |
5.2e+06 ++---------------------------------------------------------------+
perf-stat.minor-faults
6.6e+06 ++---------------------------------------------------------------+
| |
6.4e+06 ++ .*.*.. .*.. |
*. .*.*..*.*.*. *.* *. .*. .*..*. |
6.2e+06 ++*. *. *..*.* *..*.*.*..*.*..*.*
| |
6e+06 ++ |
| |
5.8e+06 ++ |
| |
5.6e+06 ++ |
| |
5.4e+06 ++O O |
O O O O O O O O O O O O O O O O O O O O O O O O |
5.2e+06 ++---------------------------------------------------------------+
vmstat.io.bi
600 ++-----------*-*--*-*--*--*----*-------------------------------------+
| .. *. + |
500 *+.*.*..*.* *..*.*..*.*.. .*.*..*.*..*.*..*.*..*
| *. |
| |
400 ++ |
| |
300 ++ |
| |
200 ++ |
| O O |
| |
100 ++ O |
O O O O O O O O O O O O O O O O O O O O O O |
0 ++-----------------------------------------------O-------------------+
vmstat.io.bo
660000 ++----------------------------------------------------------------+
| O O O O O O O O O |
640000 O+ O O O O O O O O O O O O O |
| O O O |
620000 ++ |
| |
600000 ++ |
| |
580000 ++ |
| |
560000 ++ .*.|
| .*. .*.*..*. .*..*.*..*.*..*.*. *
540000 *+*..*.*..*. .*.*.. .*. *. * |
| *..*.*..* * |
520000 ++----------------------------------------------------------------+
iostat.sde.avgrq-sz
720 ++-------------------------------------------------------------------+
| O O |
700 ++ O O O O O |
680 O+ O O O O O O O O O O O |
| O O O O O O O |
660 ++ |
| |
640 ++ |
| |
620 ++ |
600 ++ |
| |
580 ++ .*.*..*.*.. .*.*.. .*.. .*. *. .*..|
*..*.*..*.*. *. *.*.. .*..* *. *..*. .. *..* *
560 ++----------------------------------*-------------------*------------+
iostat.sde.avgqu-sz
125 ++-------------------------------------------------------------------+
| O |
120 ++ O O |
O O O O O O O O O O O O O O O O |
| O O O O O O O |
115 ++ |
| |
110 ++ |
| |
105 ++ |
| .*.. |
| .*. .* *..*.*..* .*. .*. .*.*.. .*..*
100 *+ *.. .*. + .*..*.*.. + *. *. *. * |
| * *..*.*. * |
95 ++-------------------------------------------------------------------+
iostat.sdf.avgrq-sz
720 ++-------------------------------------------------------------------+
| O O |
700 ++ O O O O O O |
680 O+ O O O O O O O O |
| O O O O O O O O O |
660 ++ |
| |
640 ++ |
| |
620 ++ |
600 ++ |
| .* |
580 ++ *.*.. .*..*. + .*.. .*..*.*.. *..|
|.. .*..*.*..* *..*.*.. .*..* *..*.*..* + *
560 *+------*---------------------------*---------------------------*----+
iostat.sdg.avgrq-sz
720 ++-------------------------------------------------------------------+
| O O |
700 O+ O O O O |
680 ++ O O O O O O O O O O O O O |
| O O O O O O |
660 ++ |
640 ++ |
| |
620 ++ |
600 ++ |
| .*.. .*.. |
580 ++ .*..* *.*..*. .*..*.*..*. .*.*..*..*.*..*.*..* .*..*
560 ++.* *. *..*.*. * |
*. |
540 ++-------------------------------------------------------------------+
iostat.sdd.avgrq-sz
720 ++-------------------------------------------------------------------+
| O |
700 O+ O O O O O O O O |
680 ++ O O O O O O O O O O O O |
| O O O O |
660 ++ |
640 ++ |
| |
620 ++ |
600 ++ |
| |
580 ++ .*..*.*..*.*.. .*..*..*.*.. .*.. .*.*..*.*.. .*.. .*..*
560 *+.* * *.*.. .*..* *. * * |
| * |
540 ++-------------------------------------------------------------------+
iostat.sdd.avgqu-sz
120 ++-------------------------------------------------------------------+
| O O O O O O O O O O O O |
115 O+ O O O O O O O O O O O O O |
| |
| |
110 ++ |
| |
105 ++ |
| |
100 ++ *. *.. .*. .*.*..*. .*.*..|
|.. *..*.*..*.*..*. .*..*. .*.. + *. *. *. *
* *. *..* .*..* |
95 ++ * |
| |
90 ++-------------------------------------------------------------------+
iostat.sdh.avgrq-sz
720 ++-------------------------------------------------------------------+
| O O |
700 O+ O O O O O O O |
680 ++ O O O O O O O O O O O O |
| O O O O |
660 ++ |
640 ++ |
| |
620 ++ |
600 ++ |
| |
580 ++.*.*..*.*.. .*..*.*.. .*.*..*. .*.*.. .*. .*. .*.*.. .*..*
560 *+ * *. *..*.*. *. *. *. * |
| |
540 ++-------------------------------------------------------------------+
iostat.sdh.avgqu-sz
120 ++-------------------------------------------------------------------+
| O O O O O O O O |
| O O O O O O O O O O |
115 O+ O O O O O O |
| O |
| |
110 ++ |
| |
105 ++ |
| |
| |
100 ++.*. *.. .*.. *. .*. .*..|
*. *..*. .*.. .*.. + * .. *. *..*.*..* *
| *..* *.*..*..* .*..* * |
95 ++-----------------------------*-------------------------------------+
iostat.sdi.avgrq-sz
720 ++-------------------------------------------------------------------+
| O O |
700 O+ O O O O O O O O |
680 ++ O O O O O O O O O O |
| O O O O O |
660 ++ |
640 ++ |
| |
620 ++ |
600 ++ |
| .*. .*.. .*..|
580 ++ .*.*..*.*..*. .*. *..*. *.. .*..*..*.*..*. .* * |
560 *+.*.*. *. *.. + * *. *
| * |
540 ++-------------------------------------------------------------------+
iostat.sdi.avgqu-sz
125 ++-------------------------------------------------------------------+
| |
120 ++ O |
| O O O O O O O |
O O O O O O O O O O O |
115 ++ O O O O O O |
| O |
110 ++ |
| |
105 ++ |
| |
| .*.. .*..|
100 ++ *.*..*.*..*. .*.. .*..*.*..*..*.*..* *. .* |
|.. *..*.*. *.*..*.*..* *. *
95 *+-------------------------------------------------------------------+
iostat.sdj.avgqu-sz
120 ++---------------------------------------------------------O---------+
| O O O O O O O |
115 O+ O O O O O O O O O O O O O |
| O O O O |
| |
110 ++ |
| |
105 ++ |
| * |
100 ++.*.*..*. *.. + + .*.. *..|
*. *..*. + *.*.. + *..*.*..* + *
| *..*. .*..*.*..*.*..* * * |
95 ++ *. |
| |
90 ++-------------------------------------------------------------------+
iostat.sdk.avgrq-sz
720 ++-------------------------------------------------------------------+
| |
700 ++ O O O O O O O O O |
680 O+ O O O O O O |
| O O O O O O O O O |
660 ++ O |
| |
640 ++ |
| |
620 ++ |
600 ++ |
| |
580 ++.*. .*.. .*.. *.. *. .*.. .*. .*. .*.. .*..*
*. *..* * *. .. *. .. *.. .*..* *. *. *..* * |
560 ++------------------*-------*-------*--------------------------------+
iostat.sdk.avgqu-sz
125 ++-------------------------------------------------------------------+
| |
120 ++ O |
O O O O O O O O O O O O |
115 ++ O O O O O O O O O O O O O |
| |
110 ++ |
| |
105 ++ |
| .*.. |
100 ++.*. .*. .*.. .*..* .*.*..*. .*
*. *. *..*. .*..*. .* * *. *..*.*..*.*. |
95 ++ *..*.*. *. |
| |
90 ++-------------------------------------------------------------------+
iostat.sdl.avgrq-sz
720 ++-------------------------------------------------------------------+
O |
700 ++ O O O O O O |
680 ++ O O O O O O O O O O O O O O |
| O O O O O |
660 ++ |
640 ++ |
| |
620 ++ |
600 ++ |
| *..|
580 ++ .*..*.*..*.*..* *..*.*..*. .*.*.. .*. .*. .*.*.. + *
560 *+.* + .. *..*.*. *. *. *. * |
| * |
540 ++-------------------------------------------------------------------+
iostat.sdl.avgqu-sz
125 ++-------------------------------------------------------------------+
| |
120 ++ O O |
| O O O O O O O O |
O O O O O O O O O O O O O |
115 ++ O O O |
| |
110 ++ |
| |
105 ++ |
| .*. |
| .*..*. .*.*.. .*. .*.*. *.. .*..|
100 ++.* *..* .*..* *.*.. .*. *. *. * *
*. + .*.*. + .. * |
95 ++-------------*------------*----------------------------------------+
iostat.sdm.avgrq-sz
700 ++---------------------O-------O-------------------------------------+
O O O O O O O O O O O O |
680 ++ O O O O O O O O O |
| O O |
660 ++ O |
| |
640 ++ |
| |
620 ++ |
| |
600 ++ |
| .*.. *..|
580 ++ *.. .*..* .*.. .*.*..*. .*.*.. .*. .*. .*.*.. + *
| + * * *. *.. .*. *. *. *. * |
560 *+-*--------------------------------*--------------------------------+
iostat.sdn.avgrq-sz
700 ++------------------O----------O-------------------------------------+
O O O O O O O O O |
680 ++ O O O O O O O O O O O O O O |
660 ++ O |
| |
640 ++ |
| |
620 ++ |
| |
600 ++ |
580 ++ .*..* .*..|
*..*. .*.*.. .*.*. + .*. .*.. .*.. .* *. .*..* *
560 ++ *. *.*. *. *..* * *. + .. *..* |
| * |
540 ++-------------------------------------------------------------------+
next reply other threads:[~2014-01-03 15:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-03 15:54 fengguang.wu [this message]
2014-01-03 16:07 ` 1be41b78: +18% increased btrfs write throughput 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=20140103155421.GA7494@localhost \
--to=fengguang.wu@intel.com \
--cc=jbacik@fusionio.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@linux.intel.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).