Skip to contentSkip to conversation

Bonnie++ run with RAID-1 on a single SSD (2.6.29-rc4-224-g4b6136c)

DISCUSSION Chris Samuel 3 participants 4 messages Feb 13, 2009 – Mar 24, 2009 Btrfs file system

lore
Share & tools
lore
#0 lore raw

Hi folks,

For people who might be interested, here is how btrfs performs with two partitions on a single SSD drive in a RAID-1 mirror.

This is on a Dell E4200 with Core 2 Duo U9300 (1.2GHz), 2GB RAM and a Samsung SSD (128GB Thin uSATA SSD).

Version 1.03c ------Sequential Output------ --Sequential Input- --Random-

                    -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--
Machine        Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP  /sec %CP
sys26            2G           28299  17 18633  12           85702  29  3094  18
                    ------Sequential Create------ --------Random Create--------
                    -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--
              files  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP
                 16  7513  99 +++++ +++  5140  98  3964  67 +++++ +++  5652  99

sys26,2G,,,28299,17,18633,12,,,85702,29,3093.9,18,16,7513,99,+++++,+++,5140,98,3964,67,+++++,+++,5652,99

real    3m51.883s
user    0m0.360s
sys     0m46.099s

I'd previously blogged a test with 2.6.29-rc2 and there's no real difference between the two runs.

http://www.csamuel.org/2009/01/04/btrfs-raid1-benchmark-on-dell-e4200-with-128gb-ssd

For a comparison, here is XFS on a single partition:

Version 1.03c ------Sequential Output------ --Sequential Input- --Random-

                    -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--
Machine        Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP  /sec %CP
sys26            2G           62075  19 36634  16           92023  26  1432  12
                    ------Sequential Create------ --------Random Create--------
                    -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--
              files  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP
                 16   585  13 +++++ +++   578   5   538  11 +++++ +++   417   5

sys26,2G,,,62075,19,36634,16,,,92023,26,1431.8,12,16,585,13,+++++,+++,578,5,538,11,+++++,+++,417,5

real    4m10.987s
user    0m0.404s
sys     0m33.602s

Block I/O is faster, but btrfs hammers it for metadata operations, an order of magnitude faster!

cheers,
Chris

Signature · 4 lines
 Chris Samuel  :  http://www.csamuel.org/  :  Melbourne, VIC

This email may come with a PGP signature as a file. Do not panic.
For more info see: http://en.wikipedia.org/wiki/OpenPGP
#1 lore raw

Hi Chris,

Thank you for sharing your numbers.

Chris Samuel wrote (ao):

Quoted 5 lines

For people who might be interested, here is how btrfs performs with two partitions on a single SSD drive in a RAID-1 mirror.

This is on a Dell E4200 with Core 2 Duo U9300 (1.2GHz), 2GB RAM and a Samsung SSD (128GB Thin uSATA SSD).

MLC SSDs are famous for their write stalls when the disk gets full and old blocks need to be reused.

Do you experience that too? Or can you test that situation?

On your site you write:

"As SSD's are not necessarily as reliable as spinning disk yet for data integrity .."

I've skimmed the article you link to. I still think SSDs are much more reliable than spinning disks, especially the high end SLC SSDs.

What is the general opinion on this?

Could you also test without RAID1?
And with the compression mount flag?
And without the ssd mount flag?

Quoted 8 lines

Version 1.03c ------Sequential Output------ --Sequential Input- --Random-

                    -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--
Machine        Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP  /sec %CP
sys26            2G           28299  17 18633  12           85702  29  3094  18
                    ------Sequential Create------ --------Random Create--------
                    -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--
              files  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP
                 16  7513  99 +++++ +++  5140  98  3964  67 +++++ +++  5652  99
Quoted 5 lines

sys26,2G,,,28299,17,18633,12,,,85702,29,3093.9,18,16,7513,99,+++++,+++,5140,98,3964,67,+++++,+++,5652,99

real    3m51.883s
user    0m0.360s
sys     0m46.099s

I have no experience with Bonnie++, but based on the output it seems you use a 2GB file while you have 2GB RAM. Is that a valid test?

Also the test run of only 3 minutes 52 seconds seems way too short.

With kind regards, Sander

Signature · 2 lines
Humilis IT Services and Solutions
http://www.humilis.net
#2 lore raw
In reply to Chris Samuel
Quoted 8 lines · Chris Samuel

Hi folks,

For people who might be interested, here is how btrfs performs with two partitions on a single SSD drive in a RAID-1 mirror.

This is on a Dell E4200 with Core 2 Duo U9300 (1.2GHz), 2GB RAM and a Samsung SSD (128GB Thin uSATA SSD).

Thanks for posting these, it is especially good to see the metadata ops are still fast on this ssd.

Quoted 10 lines

Version 1.03c ------Sequential Output------ --Sequential Input- --Random-

                    -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--
Machine        Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP  /sec %CP
sys26            2G           28299  17 18633  12           85702  29  3094  18
                    ------Sequential Create------ --------Random Create--------
                    -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--
              files  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP
                 16  7513  99 +++++ +++  5140  98  3964  67 +++++ +++  5652  99

sys26,2G,,,28299,17,18633,12,,,85702,29,3093.9,18,16,7513,99,+++++,+++,5140,98,3964,67,+++++,+++,5652,99

So, btrfs is doing ~28MB/s writes while writing the data twice and XFS is doing 62MB writing it once. That's not too bad really.

But, one important thing about the ssds is they stripe internally across a bunch of flash storage, and then they have the FTL managing all the writes.

So, if you make two partitions on a single device, a raid1 data write from btrfs is very likely to result in two large IOs, which the FTL very well might put directly adjacent to each other on the SSD.

Duplicating the data does make it more likely you'll recover something if the device goes bad, but two devices are still safer than one.

I'm not saying the test isn't valid, I just want to make sure people reading the list don't run off and partition their ssds in hopes of getting raid ;)

-chris

#3 lore raw
Quoted 1 line · Chris Mason

On Fri, 2009-02-13 at 23:31 +1100, Chris Samuel wrote:

[Bonnie++]

Quoted 5 lines
Quoted 2 lines

This is on a Dell E4200 with Core 2 Duo U9300 (1.2GHz), 2GB RAM and a Samsung SSD (128GB Thin uSATA SSD).

Thanks for posting these, it is especially good to see the metadata ops are still fast on this ssd.

Not a problem - sorry for the delay in responding.. :-(

Quoted 2 lines

So, btrfs is doing ~28MB/s writes while writing the data twice and XFS is doing 62MB writing it once. That's not too bad really.

Yup, I'm very happy!

Quoted 3 lines

But, one important thing about the ssds is they stripe internally across a bunch of flash storage, and then they have the FTL managing all the writes.

Ah...

Quoted 3 lines

So, if you make two partitions on a single device, a raid1 data write from btrfs is very likely to result in two large IOs, which the FTL very well might put directly adjacent to each other on the SSD.

...yes, I can see that could well happen. Bugger.. :-(

Quoted 2 lines

Duplicating the data does make it more likely you'll recover something if the device goes bad, but two devices are still safer than one.

Yeah, but pretty hard to do in a very light laptop!

Quoted 3 lines

I'm not saying the test isn't valid, I just want to make sure people reading the list don't run off and partition their ssds in hopes of getting raid ;)

Agreed - I'm just hoping to be a bit safer than not having it.. ;-)

cheers,
Chris

Signature · 4 lines
 Chris Samuel  :  http://www.csamuel.org/  :  Melbourne, VIC

This email may come with a PGP signature as a file. Do not panic.
For more info see: http://en.wikipedia.org/wiki/OpenPGP