From: Huang Ying <ying.huang@intel.com>
To: lkp@lists.01.org
Subject: Re: [Btrfs] 3a8b36f3780: -62.6% fileio.requests_per_sec
Date: Wed, 01 Apr 2015 12:59:07 +0800 [thread overview]
Message-ID: <1427864347.17170.105.camel@intel.com> (raw)
In-Reply-To: <551AB664.4080303@suse.com>
[-- Attachment #1: Type: text/plain, Size: 1942 bytes --]
On Tue, 2015-03-31 at 15:59 +0100, Filipe Manana wrote:
[snip]
> From: Filipe Manana <fdmanana@suse.com>
> Date: Tue, 31 Mar 2015 14:16:52 +0100
> Subject: [PATCH] Btrfs: avoid syncing log in the fast fsync path when not
> necessary
>
> Commit 3a8b36f37806 ("Btrfs: fix data loss in the fast fsync path") added
> a performance regression for that causes an unnecessary sync of the log
> trees (fs/subvol and root log trees) when 2 consecutive fsyncs are done
> against a file, without no writes or any metadata updates to the inode in
> between them and if a transaction is committed before the second fsync is
> called.
>
> Huang Ying reported this to lkml after a test sysbench test that measured
> a -62% decrease of file io requests for that tests' workload.
>
> The test is:
>
> echo performance > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
> echo performance > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
> echo performance > /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor
> echo performance > /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor
> mkfs -t btrfs /dev/sda2
> mount -t btrfs /dev/sda2 /fs/sda2
> cd /fs/sda2
> for ((i = 0; i < 1024; i++)); do fallocate -l 67108864 testfile.$i; done
> sysbench --test=fileio --max-requests=0 --num-threads=4 --max-time=600 \
> --file-test-mode=rndwr --file-total-size=68719476736 --file-io-mode=sync \
> --file-num=1024 run
>
> A test on kvm guest, running a debug kernel gave me the following results:
>
> Without 3a8b36f378060d: 16.01 reqs/sec
> With 3a8b36f378060d: 3.39 reqs/sec
> With 3a8b36f378060d and this patch: 16.04 reqs/sec
>
> Reported-by: Huang Ying <ying.huang@intel.com>
I have tested your patch, the regression restored in our test. Thanks!
Tested-by: Huang, Ying <ying.huang@intel.com>
Best Regards,
Huang, Ying
[snip]
WARNING: multiple messages have this Message-ID (diff)
From: Huang Ying <ying.huang@intel.com>
To: Filipe Manana <fdmanana@suse.com>
Cc: Chris Mason <clm@fb.com>, LKML <linux-kernel@vger.kernel.org>,
LKP ML <lkp@01.org>
Subject: Re: [LKP] [Btrfs] 3a8b36f3780: -62.6% fileio.requests_per_sec
Date: Wed, 01 Apr 2015 12:59:07 +0800 [thread overview]
Message-ID: <1427864347.17170.105.camel@intel.com> (raw)
In-Reply-To: <551AB664.4080303@suse.com>
On Tue, 2015-03-31 at 15:59 +0100, Filipe Manana wrote:
[snip]
> From: Filipe Manana <fdmanana@suse.com>
> Date: Tue, 31 Mar 2015 14:16:52 +0100
> Subject: [PATCH] Btrfs: avoid syncing log in the fast fsync path when not
> necessary
>
> Commit 3a8b36f37806 ("Btrfs: fix data loss in the fast fsync path") added
> a performance regression for that causes an unnecessary sync of the log
> trees (fs/subvol and root log trees) when 2 consecutive fsyncs are done
> against a file, without no writes or any metadata updates to the inode in
> between them and if a transaction is committed before the second fsync is
> called.
>
> Huang Ying reported this to lkml after a test sysbench test that measured
> a -62% decrease of file io requests for that tests' workload.
>
> The test is:
>
> echo performance > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
> echo performance > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
> echo performance > /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor
> echo performance > /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor
> mkfs -t btrfs /dev/sda2
> mount -t btrfs /dev/sda2 /fs/sda2
> cd /fs/sda2
> for ((i = 0; i < 1024; i++)); do fallocate -l 67108864 testfile.$i; done
> sysbench --test=fileio --max-requests=0 --num-threads=4 --max-time=600 \
> --file-test-mode=rndwr --file-total-size=68719476736 --file-io-mode=sync \
> --file-num=1024 run
>
> A test on kvm guest, running a debug kernel gave me the following results:
>
> Without 3a8b36f378060d: 16.01 reqs/sec
> With 3a8b36f378060d: 3.39 reqs/sec
> With 3a8b36f378060d and this patch: 16.04 reqs/sec
>
> Reported-by: Huang Ying <ying.huang@intel.com>
I have tested your patch, the regression restored in our test. Thanks!
Tested-by: Huang, Ying <ying.huang@intel.com>
Best Regards,
Huang, Ying
[snip]
next prev parent reply other threads:[~2015-04-01 4:59 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-18 8:20 [Btrfs] 3a8b36f3780: -62.6% fileio.requests_per_sec Huang Ying
2015-03-18 8:20 ` [LKP] " Huang Ying
2015-03-18 10:05 ` Filipe Manana
2015-03-18 10:05 ` [LKP] " Filipe Manana
2015-03-31 8:32 ` Huang Ying
2015-03-31 8:32 ` [LKP] " Huang Ying
2015-03-31 14:59 ` Filipe Manana
2015-03-31 14:59 ` [LKP] " Filipe Manana
2015-04-01 4:59 ` Huang Ying [this message]
2015-04-01 4:59 ` Huang Ying
2015-04-01 9:56 ` Filipe Manana
2015-04-01 9:56 ` [LKP] " Filipe Manana
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=1427864347.17170.105.camel@intel.com \
--to=ying.huang@intel.com \
--cc=lkp@lists.01.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 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.