Skip to contentSkip to conversation

slow raid5 performance

DISCUSSION Peter 2 participants 2 messages Oct 22, 2007 MD RAID

lore
Share & tools
lore

Peter

author
#0 lore raw

----- Original Message ----

From: Peter Grandi <[email protected]>

Thank you for your insightful response Peter (Yahoo spam filter hid it from me until now).

Quoted 6 lines

Most 500GB drives can do 60-80MB/s on the outer tracks

(30-40MB/s on the inner ones), and 3 together can easily swamp

the PCI bus. While you see the write rates of two disks, the OS

Quoted 7 lines

is really writing to all three disks at the same time, and it

will do read-modify-write unless the writes are exactly stripe

aligned. When RMW happens write speed is lower than writing to a

single disk.

I can understand that if a RMW happens it will effectively lower the write throughput substantially but I'm not sure entirely sure why this would happen while writing new content, I don't know enough about RAID internals. Would this be the case the majority of time?

Quoted 5 lines

The system time is because the Linux page cache etc. is CPU

bound (never mind RAID5 XOR computation, which is not that

big). The IO wait is because IO is taking place.

http://www.sabi.co.uk/blog/anno05-4th.html#051114

Quoted 16 lines

Almost all kernel developers of note have been hired by wealthy

corporations who sell to people buying large servers. Then the

typical system that these developers may have and also target

are high ends 2-4 CPU workstations and servers, with CPUs many

times faster than your PC, and on those system the CPU overhead

of the page cache at speeds like yours less than 5%.

My impression is that something that takes less than 5% on a

Quoted 7 lines

developers's system does not get looked at, even if it takes 50%

on your system. The Linux kernel was very efficient when most

developers were using old cheap PCs themselves. "scratch your

itch" rules.

This is a rather unfortunate situation, it seems that some of the roots are forgotten, especially in a case like this where one would think running a file server on a modest CPU should be enough. I was waiting for Phenom and AM2+ motherboards to become available before relegating this X2 4600+ to file server duty, guess I'll need to stay with the slow performance for a few more months.

Quoted 3 lines

Anyhow, try to bypass the page cache with 'O_DIRECT' or test

with 'dd oflag=direct' and similar for an alterative code path.

I'll give this a try, thanks.

Quoted 1 line

Misaligned writes and page cache CPU time most likely.

What influence would adding more harddrives to this RAID have? I know in terms of a Netapp filer they always talk about spindle count for performance.

-

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

#1 lore raw
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

On Mon, 22 Oct 2007 10:18:59 -0700 (PDT), Peter
<[email protected]> said:

[ ... ]

thenephilim13> I can understand that if a RMW happens it will thenephilim13> effectively lower the write throughput thenephilim13> substantially but I'm not sure entirely sure why thenephilim13> this would happen while writing new content,

It does not really depend on new vs. old content, but on whether the filesystem knows the real address of the blocks it is writing to and assembles writes in sequences beginning at the appropriate boundary and of the approriate length. XFS (at least some recetn versions) makes a valiant attempt to deduce the right values from the underlying storage system, but double checking usually helps.

Quoted 5 lines
Quoted 5 lines

[ ... ] My impression is that something that takes less than 5% on a developers's system does not get looked at, even if it takes 50% on your system. The Linux kernel was very efficient when most developers were using old cheap PCs themselves. "scratch your itch" rules.

thenephilim13> This is a rather unfortunate situation, it seems thenephilim13> that some of the roots are forgotten,

If somebody's roots are to be a poor postdoc/postgrad scrounging used/broken PC parts and then they get hired with a huge salary and given a 4-CPU 4GB PC to play with, usually they are very happy to forget those roots and don't think it unfortunate.

Just another instance also of the "who pays the piper calls the tunes" principle.

thenephilim13> especially in a case like this where one would thenephilim13> think running a file server on a modest CPU thenephilim13> should be enough.

Let's say that I have been myself been astonished by how CPU intensive is the Linux page cache. But then I think that quite a few aspects of the Linux page/IO management subsystems (never mind sick, mad horrors like 'vm/page-cluster') could be substantially improved by someone who had read the relevant literature (I am not volunteering unfortunately) instead of trying to wing it and flounder.

[ ... ]

Quoted 1 line
Quoted 1 line

Misaligned writes and page cache CPU time most likely.

thenephilim13> What influence would adding more harddrives to thenephilim13> this RAID have?

If you can guarantee that writes (and reads, less importantly) be aligned and of the right size adding more drives improves performance as long as this does not hit the bus bandwidth limits and the CPU ones (and your system likely is near those); unfortunately adding more drives makes it less likely that writes will be properly aligned and of the right size, never mind all the other downsides. A 3-drive RAID5 is one of only two common (or uncommon) cases in which RAID5 is a tolerable idea.

thenephilim13> I know in terms of a Netapp filer they always thenephilim13> talk about spindle count for performance.

NetApp use something very different from RAID5 (and which is not quite RAID4)and they also have a custom filesystem described in an interesting paper:

http://www.netapp.com/library/tr/3002.pdf
http://blogs.sun.com/val/entry/zfs_faqs_freenix_cfp_new