linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* ext4 vs btrfs performance on SSD array
@ 2014-08-26 23:39 Nikolai Grigoriev
  2014-08-27  7:10 ` Duncan
  2014-09-02  0:08 ` Dave Chinner
  0 siblings, 2 replies; 14+ messages in thread
From: Nikolai Grigoriev @ 2014-08-26 23:39 UTC (permalink / raw)
  To: linux-btrfs

Hi,

This is not exactly a problem - I am trying to understand why BTRFS
demonstrates significantly higher throughput in my environment.

I am observing something that I cannot explain. I am trying to come up
with a good filesystem configuration using HP P420i controller and
SSDs (Intel S3500). Out of curiosity I have tried BTRFS (still
unstable so I can't really expect to be able to use it) and noticed
that the read speed is about 150% of ext4 - while write speed is
comparable.

To be clear, I am using RAID0 with two SSDs with strip size of 256Kb.
I have 6 disks so I have created 3 logical disks, 2 SSDs each - just
for testing. And then I have formatted them with ext4, XFS and BTRFS.

When I write (something like dd if=/dev/zero of=test2 bs=512k
count=20000 conv=fdatasync,fsync) and watch the system using iostats,
I see that both BTRFS and EXT4 are writing at approximately the same
rate with similar number of write requests:

(ext4  - writing)
Device:         rrqm/s   wrqm/s     r/s     w/s    rMB/s    wMB/s
avgrq-sz avgqu-sz   await  svctm  %util
sdb               0.00     0.00    0.00 1791.00     0.00   895.00
1023.43   141.73   78.97   0.56 100.00
(btrfs - writing)
Device:         rrqm/s   wrqm/s     r/s     w/s    rMB/s    wMB/s
avgrq-sz avgqu-sz   await  svctm  %util
sdc               0.00     0.00    0.00 1786.00     0.00   893.00
1024.00   137.87   77.21   0.56 100.10

When I read, I observe different picture:

Device:         rrqm/s   wrqm/s     r/s     w/s    rMB/s    wMB/s
avgrq-sz avgqu-sz   await  svctm  %util
(ext4 - reading)
sdb               0.00     0.00 4782.00    0.00   597.75     0.00
256.00     1.57    0.33   0.18  84.10
(btrfs - reading)
Device:         rrqm/s   wrqm/s     r/s     w/s    rMB/s    wMB/s
avgrq-sz avgqu-sz   await  svctm  %util
sdc             207.00     0.00 1794.00    0.00   886.40     0.00
1011.90    10.59    5.90   0.56 100.00
(xfs - reading)
Device:         rrqm/s   wrqm/s     r/s     w/s    rMB/s    wMB/s
avgrq-sz avgqu-sz   await  svctm  %util
sdd               0.00     0.00 4623.00    0.00   577.88     0.00
256.00     1.71    0.37   0.21  97.00

And this is what I see if I just try to read the block device with dd:

(reading block device)
Device:         rrqm/s   wrqm/s     r/s     w/s    rMB/s    wMB/s
avgrq-sz avgqu-sz   await  svctm  %util
sdb           132055.00     0.00 4259.00    0.00   532.38     0.00
256.00     1.61    0.38   0.23  99.80
sdc           131750.00     0.00 4250.00    0.00   531.25     0.00
256.00     1.58    0.37   0.24 100.00
sdc           142476.00     0.00 4596.00    0.00   574.50     0.00
256.00     1.61    0.35   0.20  92.40

All settings seem to be identical (I/O scheduler, readahead...) for
all 3 logical volumes.

So, everything else being equal, I clearly see that btrfs does much
fewer reads per second and clearly reads more bytes per second. And
that number of rrqm/s - this is the number of merged requests. I can
only see it on the device that is formatted with btrfs.

Kernel: 3.8.13-35.3.5.el6uek.x86_64 #2 SMP Fri Aug 8 21:58:11 PDT 2014
x86_64 x86_64 x86_64 GNU/Linux
Btrfs v0.20-rc1
#   btrfs fi show
Label: 'cassandra-data'  uuid: 6677e858-7a3e-4c76-861c-32977fd2fff9
    Total devices 1 FS bytes used 49.22GB
    devid    1 size 1.46TB used 60.02GB path /dev/sdc

Btrfs v0.20-rc1
# btrfs fi df /cassandra-data/disk2
Data: total=59.01GB, used=49.15GB
System: total=4.00MB, used=12.00KB
Metadata: total=1.01GB, used=72.20MB
dmesg:
btrfs: use ssd allocation scheme
btrfs: turning off barriers
btrfs: disk space caching is enabled

Puzzled... What is so special btrfs can do (and ext4 and xfs do not
do) to make such a difference?

P.S. No, compression is disabled with mount option compress=no



-- 
Nikolai Grigoriev
(514) 772-5178



-- 
Nikolai Grigoriev
(514) 772-5178

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2014-09-05 16:50 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-26 23:39 ext4 vs btrfs performance on SSD array Nikolai Grigoriev
2014-08-27  7:10 ` Duncan
2014-08-27 21:59   ` Nikolai Grigoriev
2014-09-02  0:08 ` Dave Chinner
2014-09-02  1:22   ` Christoph Hellwig
2014-09-02 11:31     ` Theodore Ts'o
2014-09-02 14:20       ` Jan Kara
2014-09-02 14:55         ` Theodore Ts'o
2014-09-02 12:55     ` Zack Coffey
2014-09-02 13:40       ` Austin S Hemmelgarn
2014-09-03  0:01     ` NeilBrown
2014-09-05 16:08       ` Christoph Hellwig
2014-09-05 16:40         ` Jeff Moyer
2014-09-05 16:50           ` Jens Axboe

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).