Skip to contentSkip to conversation

below 10MB/s write on raid5

DISCUSSION Dexter Filmore 6 participants 15 messages Jun 11, 2007 – Jun 14, 2007 MD RAID

lore
Share & tools
lore
#0 lore raw

I recently upgraded my file server, yet I'm still unsatisfied with the write speed.
Machine now is a Athlon64 3400+ (Socket 754) equipped with 1GB of RAM. The four RAID disks are attached to the board's onbaord sATA controller (Sil3114 attached via PCI)
Kernel is 2.6.21.1, custom on Slackware 11.0.
RAID is on four Samsung SpinPoint disks, has LVM, 3 volumes atop of each XFS.

The machine does some other work, too, but still I would have suspected to get into the 20-30MB/s area. Too much asked for?

Dex

Signature · 9 lines
-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GCS d--(+)@ s-:+ a- C++++ UL++ P+>++ L+++>++++ E-- W++ N o? K-
w--(---) !O M+ V- PS+ PE Y++ PGP t++(---)@ 5 X+(++) R+(++) tv--(+)@ 
b++(+++) DI+++ D- G++ e* h>++ r* y?
------END GEEK CODE BLOCK------

http://www.stop1984.com
http://www.againsttcpa.com
#1 lore raw
Quoted 8 lines · Dexter Filmore

I recently upgraded my file server, yet I'm still unsatisfied with the write speed.
Machine now is a Athlon64 3400+ (Socket 754) equipped with 1GB of RAM. The four RAID disks are attached to the board's onbaord sATA controller (Sil3114 attached via PCI)
Kernel is 2.6.21.1, custom on Slackware 11.0.
RAID is on four Samsung SpinPoint disks, has LVM, 3 volumes atop of each XFS.

Quoted 4 lines

The machine does some other work, too, but still I would have suspected to get into the 20-30MB/s area. Too much asked for?

Dex

What do you get without LVM?

#2 lore raw
Quoted 10 lines · On Monday 11 June 2007 14:47:50 Justin Piszcz wrote:
Quoted 9 lines · Dexter Filmore

I recently upgraded my file server, yet I'm still unsatisfied with the write speed.
Machine now is a Athlon64 3400+ (Socket 754) equipped with 1GB of RAM. The four RAID disks are attached to the board's onbaord sATA controller (Sil3114 attached via PCI)
Kernel is 2.6.21.1, custom on Slackware 11.0.
RAID is on four Samsung SpinPoint disks, has LVM, 3 volumes atop of each XFS.

Quoted 6 lines
Quoted 4 lines

The machine does some other work, too, but still I would have suspected to get into the 20-30MB/s area. Too much asked for?

Dex

What do you get without LVM?

Hard to tell: the PV hogs all of the disk space, can't really do non-LVM tests.

Signature · 9 lines
-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GCS d--(+)@ s-:+ a- C++++ UL++ P+>++ L+++>++++ E-- W++ N o? K-
w--(---) !O M+ V- PS+ PE Y++ PGP t++(---)@ 5 X+(++) R+(++) tv--(+)@ 
b++(+++) DI+++ D- G++ e* h>++ r* y?
------END GEEK CODE BLOCK------

http://www.stop1984.com
http://www.againsttcpa.com
#3 lore raw
Quoted 14 lines · Dexter Filmore
Quoted 13 lines · On Monday 11 June 2007 14:47:50 Justin Piszcz wrote:
Quoted 12 lines · Dexter Filmore

I recently upgraded my file server, yet I'm still unsatisfied with the write speed.
Machine now is a Athlon64 3400+ (Socket 754) equipped with 1GB of RAM. The four RAID disks are attached to the board's onbaord sATA controller (Sil3114 attached via PCI)
Kernel is 2.6.21.1, custom on Slackware 11.0.
RAID is on four Samsung SpinPoint disks, has LVM, 3 volumes atop of each XFS.

The machine does some other work, too, but still I would have suspected to get into the 20-30MB/s area. Too much asked for?

Quoted 6 lines
Quoted 3 lines
Quoted 1 line

Dex

What do you get without LVM?

Hard to tell: the PV hogs all of the disk space, can't really do non-LVM tests.

You can do a read test.

10gb read test:

dd if=/dev/md0 bs=1M count=10240 of=/dev/null

What is the result?

I've read that LVM can incur a 30-50% slowdown.

Justin.

#4 lore raw
Quoted 22 lines · Justin Piszcz
Quoted 18 lines · Dexter Filmore
Quoted 16 lines · On Monday 11 June 2007 14:47:50 Justin Piszcz wrote:
Quoted 9 lines · Dexter Filmore

I recently upgraded my file server, yet I'm still unsatisfied with the write speed.
Machine now is a Athlon64 3400+ (Socket 754) equipped with 1GB of RAM. The four RAID disks are attached to the board's onbaord sATA controller (Sil3114 attached via PCI)
Kernel is 2.6.21.1, custom on Slackware 11.0.
RAID is on four Samsung SpinPoint disks, has LVM, 3 volumes atop of each XFS.

Quoted 4 lines

The machine does some other work, too, but still I would have suspected to get into the 20-30MB/s area. Too much asked for?

Dex

What do you get without LVM?

Quoted 8 lines
Quoted 2 lines

Hard to tell: the PV hogs all of the disk space, can't really do non-LVM tests.

You can do a read test.

10gb read test:

dd if=/dev/md0 bs=1M count=10240 of=/dev/null

eek! Make sure to use iflag=direct
with that otherwise you'll get cached reads and that will throw the numbers off considerably.

--
Jon Nelson <[email protected]>

#5 lore raw
Quoted 29 lines · Jon Nelson
Quoted 27 lines · Justin Piszcz
Quoted 14 lines · Dexter Filmore
Quoted 13 lines · On Monday 11 June 2007 14:47:50 Justin Piszcz wrote:
Quoted 12 lines · Dexter Filmore

I recently upgraded my file server, yet I'm still unsatisfied with the write speed.
Machine now is a Athlon64 3400+ (Socket 754) equipped with 1GB of RAM. The four RAID disks are attached to the board's onbaord sATA controller (Sil3114 attached via PCI)
Kernel is 2.6.21.1, custom on Slackware 11.0.
RAID is on four Samsung SpinPoint disks, has LVM, 3 volumes atop of each XFS.

The machine does some other work, too, but still I would have suspected to get into the 20-30MB/s area. Too much asked for?

Quoted 6 lines
Quoted 3 lines
Quoted 1 line

Dex

What do you get without LVM?

Hard to tell: the PV hogs all of the disk space, can't really do non-LVM tests.

You can do a read test.

Quoted 7 lines
Quoted 3 lines

10gb read test:

dd if=/dev/md0 bs=1M count=10240 of=/dev/null

eek! Make sure to use iflag=direct
with that otherwise you'll get cached reads and that will throw the numbers off considerably.

Wow, makes a difference for faster devices. Does bonnie++ use iflag=direct when benchmarking?

p34:~# dd if=/dev/md0 bs=1M count=1024 of=/dev/null iflag=direct
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB) copied, 15.0454 seconds, 71.4 MB/s
p34:~# dd if=/dev/md0 bs=1M count=1024 of=/dev/null
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB) copied, 14.991 seconds, 71.6 MB/s
p34:~# dd if=/dev/md3 bs=1M count=1024 of=/dev/null iflag=direct
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB) copied, 3.08707 seconds, 348 MB/s
p34:~# dd if=/dev/md3 bs=1M count=1024 of=/dev/null
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB) copied, 2.02948 seconds, 529 MB/s
p34:~#
p34:~# dd if=/dev/md3 bs=1M count=10024 of=/dev/null
10024+0 records in
10024+0 records out
10510925824 bytes (11 GB) copied, 17.7321 seconds, 593 MB/s
p34:~# sync
p34:~# dd if=/dev/md3 bs=1M count=10024 of=/dev/null iflag=direct
10024+0 records in
10024+0 records out
10510925824 bytes (11 GB) copied, 29.022 seconds, 362 MB/s
p34:~#
#6 lore raw
In reply to Justin Piszcz
Quoted 5 lines

10gb read test:

dd if=/dev/md0 bs=1M count=10240 of=/dev/null

What is the result?

71,7MB/s - but that's reading to null. *writing* real data however looks quite different.

Quoted 3 lines

I've read that LVM can incur a 30-50% slowdown.

Even then the 8-10MB/s I get would be a little low.

Signature · 9 lines
-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GCS d--(+)@ s-:+ a- C++++ UL++ P+>++ L+++>++++ E-- W++ N o? K-
w--(---) !O M+ V- PS+ PE Y++ PGP t++(---)@ 5 X+(++) R+(++) tv--(+)@ 
b++(+++) DI+++ D- G++ e* h>++ r* y?
------END GEEK CODE BLOCK------

http://www.stop1984.com
http://www.againsttcpa.com
#7 lore raw
Quoted 6 lines · Dexter Filmore
Quoted 5 lines

10gb read test:

dd if=/dev/md0 bs=1M count=10240 of=/dev/null

What is the result?

Quoted 21 lines

71,7MB/s - but that's reading to null. *writing* real data however looks quite different.

Quoted 3 lines

I've read that LVM can incur a 30-50% slowdown.

Even then the 8-10MB/s I get would be a little low.

Signature · 9 lines
-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GCS d--(+)@ s-:+ a- C++++ UL++ P+>++ L+++>++++ E-- W++ N o? K-
w--(---) !O M+ V- PS+ PE Y++ PGP t++(---)@ 5 X+(++) R+(++) tv--(+)@
b++(+++) DI+++ D- G++ e* h>++ r* y?
------END GEEK CODE BLOCK------

http://www.stop1984.com
http://www.againsttcpa.com

Would it be possible to trash the LVM and write directly to the MD device? I'd be really curious to see what it gets with XFS ontop of MD.

Justin.

#8 lore raw
In reply to Justin Piszcz

On 11 Jun 2007, Justin Piszcz told this:

Quoted 9 lines

You can do a read test.

10gb read test:

dd if=/dev/md0 bs=1M count=10240 of=/dev/null

What is the result?

I've read that LVM can incur a 30-50% slowdown.

FWIW I see a much smaller penalty than that.

loki:~# lvs -o +devices
  LV           VG    Attr   LSize   Origin Snap%  Move Log Copy%  Devices
[...]
  usr          raid  -wi-ao   6.00G                               /dev/md1(50)
loki:~# time dd if=/dev/md1 bs=1000 count=502400 of=/dev/null
502400+0 records in
502400+0 records out
502400000 bytes (502 MB) copied, 16.2995 s, 30.8 MB/s
real    0m16.360s
user    0m0.310s
sys     0m11.780s
loki:~# time dd if=/dev/raid/usr bs=1000 count=502400 of=/dev/null
502400+0 records in
502400+0 records out
502400000 bytes (502 MB) copied, 18.6172 s, 27.0 MB/s
real    0m18.790s
user    0m0.380s
sys     0m14.750s

So there's a penalty, sure, accounted for mostly in sys time, but it's only about 10%: small enough that I at least can ignore it in exchange for the administrative convenience of LVM.

Signature · 3 lines
`... in the sense that dragons logically follow evolution so they would
 be able to wield metal.' --- Kenneth Eng's colourless green ideas sleep
 furiously
#9 lore raw
Quoted 23 lines · Nix

On 11 Jun 2007, Justin Piszcz told this:

Quoted 9 lines

You can do a read test.

10gb read test:

dd if=/dev/md0 bs=1M count=10240 of=/dev/null

What is the result?

I've read that LVM can incur a 30-50% slowdown.

FWIW I see a much smaller penalty than that.

loki:~# lvs -o +devices
  LV           VG    Attr   LSize   Origin Snap%  Move Log Copy%  Devices
[...]
  usr          raid  -wi-ao   6.00G                               /dev/md1(50)
loki:~# time dd if=/dev/md1 bs=1000 count=502400 of=/dev/null
502400+0 records in
502400+0 records out
502400000 bytes (502 MB) copied, 16.2995 s, 30.8 MB/s
Quoted 4 lines
loki:~# time dd if=/dev/raid/usr bs=1000 count=502400 of=/dev/null
502400+0 records in
502400+0 records out
502400000 bytes (502 MB) copied, 18.6172 s, 27.0 MB/s

And what is it like with 'iflag=direct' which I really feel you have to use, otherwise you get caching.

--
Jon Nelson <[email protected]>

#14 lore raw
In reply to Bill Davidsen
Quoted 10 lines · Bill Davidsen
Quoted 8 lines · Dexter Filmore

I recently upgraded my file server, yet I'm still unsatisfied with the write speed. Machine now is a Athlon64 3400+ (Socket 754) equipped with 1GB of RAM.
The four RAID disks are attached to the board's onbaord sATA controller (Sil3114 attached via PCI) Kernel is 2.6.21.1, custom on Slackware 11.0.
RAID is on four Samsung SpinPoint disks, has LVM, 3 volumes atop of each XFS.

The machine does some other work, too, but still I would have suspected to get into the 20-30MB/s area. Too much asked for?

Quoted 18 lines

Increase your stripe cache size in /sys/block/mdX/md/stripe_cache_size. If you have a chunk size of 256, try setting the cache size to 8192 and see if your write performance ends up ~100MB/s or so.

echo 8192 > /sys/block/mdX/md/stripe_cache_size

Where "X" is your array name, of course.

Note, larger values will help more, but it's definitely diminishing returns, so don't get carried away. There was a report of problems with size > 32768, I don't remember the details, so I would avoid that as well.

Signature · 8 lines
bill davidsen <[email protected]>
CTO TMR Associates, Inc
Doing interesting things with small computers since 1979

-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

I was the one who tried > 32768 it crashed the machine (on an older box).

Justin.

#13 lore raw
In reply to Dexter Filmore
Quoted 8 lines · Dexter Filmore

I recently upgraded my file server, yet I'm still unsatisfied with the write speed. Machine now is a Athlon64 3400+ (Socket 754) equipped with 1GB of RAM.
The four RAID disks are attached to the board's onbaord sATA controller (Sil3114 attached via PCI) Kernel is 2.6.21.1, custom on Slackware 11.0.
RAID is on four Samsung SpinPoint disks, has LVM, 3 volumes atop of each XFS.

The machine does some other work, too, but still I would have suspected to get into the 20-30MB/s area. Too much asked for?

Increase your stripe cache size in /sys/block/mdX/md/stripe_cache_size. If you have a chunk size of 256, try setting the cache size to 8192 and see if your write performance ends up ~100MB/s or so.

echo 8192 > /sys/block/mdX/md/stripe_cache_size

Where "X" is your array name, of course.

Note, larger values will help more, but it's definitely diminishing returns, so don't get carried away. There was a report of problems with size > 32768, I don't remember the details, so I would avoid that as well.

Signature · 3 lines
bill davidsen <[email protected]>
 CTO TMR Associates, Inc
 Doing interesting things with small computers since 1979
#10 lore raw
In reply to Jon Nelson

On 12 Jun 2007, Jon Nelson told this:

Quoted 8 lines · Nix
Quoted 7 lines

On 11 Jun 2007, Justin Piszcz told this:

loki:~# time dd if=/dev/md1 bs=1000 count=502400 of=/dev/null
502400+0 records in
502400+0 records out
502400000 bytes (502 MB) copied, 16.2995 s, 30.8 MB/s
Quoted 7 lines
Quoted 4 lines
loki:~# time dd if=/dev/raid/usr bs=1000 count=502400 of=/dev/null
502400+0 records in
502400+0 records out
502400000 bytes (502 MB) copied, 18.6172 s, 27.0 MB/s

And what is it like with 'iflag=direct' which I really feel you have to use, otherwise you get caching.

I have little enough memory on this box that caching is really not significant :)

With iflag=direct I get, um,

loki:/var/log# time dd if=/dev/md1 bs=1000 count=502400 of=/dev/null iflag=direct
dd: reading `/dev/md1': Invalid argument
0+0 records in
0+0 records out
0 bytes (0 B) copied, 0.0324791 s, 0.0 kB/s
real    0m0.085s
user    0m0.000s
sys     0m0.000s

so not exactly ideal.

Signature · 3 lines
`... in the sense that dragons logically follow evolution so they would
 be able to wield metal.' --- Kenneth Eng's colourless green ideas sleep
 furiously
#12 lore raw
In reply to Jon Nelson

On 12 Jun 2007, Jon Nelson told this:

Quoted 8 lines · Nix
Quoted 7 lines

On 11 Jun 2007, Justin Piszcz told this:

loki:~# time dd if=/dev/md1 bs=1000 count=502400 of=/dev/null
502400+0 records in
502400+0 records out
502400000 bytes (502 MB) copied, 16.2995 s, 30.8 MB/s
Quoted 7 lines
Quoted 4 lines
loki:~# time dd if=/dev/raid/usr bs=1000 count=502400 of=/dev/null
502400+0 records in
502400+0 records out
502400000 bytes (502 MB) copied, 18.6172 s, 27.0 MB/s

And what is it like with 'iflag=direct' which I really feel you have to use, otherwise you get caching.

I have little enough memory on this box that caching is really not significant :)

With iflag=direct I get, um,

loki:/var/log# time dd if=/dev/md1 bs=1000 count=502400 of=/dev/null iflag=direct
dd: reading `/dev/md1': Invalid argument
0+0 records in
0+0 records out
0 bytes (0 B) copied, 0.0324791 s, 0.0 kB/s
real    0m0.085s
user    0m0.000s
sys     0m0.000s

so not exactly ideal.

Signature · 3 lines
`... in the sense that dragons logically follow evolution so they would
 be able to wield metal.' --- Kenneth Eng's colourless green ideas sleep
 furiously
#11 lore raw
In reply to Nix

Nix wrote:
[]

Quoted 4 lines

With iflag=direct I get, um,

loki:/var/log# time dd if=/dev/md1 bs=1000 count=502400 of=/dev/null iflag=direct
dd: reading `/dev/md1': Invalid argument

For direct i/o, you have to use blocksize =512, 1024, ... - multiple of a sector size.

/mjt