In a thoughtful message, Clay Jones <[EMAIL PROTECTED]> writes:
> I have not fully read your explanations, but you staed that the
> theoretical performance of raid 1 was 200% of a normal disk. That
> is true in a "Multi User" environment, where 2 users are reading
> simultaneously, and adding both of their read numbers together.
>
> In a single user sequential read, you will get no better performance
> that a normal disk, and I would suspect, that with overheads and such
> for the raid device, you will have some degredation. 25% seems like
> more than some though.
That's an excellent point; I hadn't really thought about how bonnie
worked, but clearly it's doing its reads synchronously, so there's no way
that the RAID-1 code could beat the performance of a single disk with only
one thing hitting it. I agree with Clay that 25% overhead seems like a
lot, though, especially given that the processor has plenty of idle time,
but perhaps that's just how it is.
But still, this seemed a good reason for some new bonnie tests. For the
sake of clarity, I'll repeat some numbers that I've posted before.
First, here's what I get if I mount the two disks separately and
run a copy of bonnie for each, simultaneously:
-------Sequential Output-------- ---Sequential Input-- --Random--
-Per Char- --Block--- -Rewrite-- -Per Char- --Block--- --Seeks---
Machine MB K/sec %CPU K/sec %CPU K/sec %CPU K/sec %CPU K/sec %CPU /sec %CPU
pa 384 3312 47.9 10074 14.6 4463 12.6 3494 49.4 12235 13.2 77.6 2.2
pb 384 3332 47.9 9320 12.9 4411 11.7 3468 48.9 11991 13.4 83.5 1.8
sum 768 6644 95.8 19394 27.5 8874 24.3 6962 98.3 24226 26.6 161.1 4.0
Then if I take those partitions and turn them into a RAID-1 mirror,
I get these results:
-------Sequential Output-------- ---Sequential Input-- --Random--
-Per Char- --Block--- -Rewrite-- -Per Char- --Block--- --Seeks---
Machine MB K/sec %CPU K/sec %CPU K/sec %CPU K/sec %CPU K/sec %CPU /sec %CPU
md0 384 5611 82.0 13586 20.5 4264 12.3 6032 86.2 8884 10.8 117.5 3.4
md0 384 5539 81.0 13568 21.0 4335 12.5 6038 86.2 8897 11.0 115.7 3.3
md0 384 5680 83.5 13584 20.6 4300 12.9 6025 86.6 8784 10.9 117.7 3.6
avg 384 5610 82.2 13579 20.7 4300 12.6 6032 86.3 8855 10.9 117.0 3.4
Y'all will note that the RAID average speed for block reads is only 75%
of that for either one of the disk partitions on its own.
As Clay pointed out, I'd missed testing several processes running at
once and working on the raid volume. First I tried it for two copies of
bonnie running simultaneously:
-------Sequential Output-------- ---Sequential Input-- --Random--
-Per Char- --Block--- -Rewrite-- -Per Char- --Block--- --Seeks---
Machine MB K/sec %CPU K/sec %CPU K/sec %CPU K/sec %CPU K/sec %CPU /sec %CPU
md0 384 2716 40.0 6109 9.5 1908 5.8 3134 45.3 3927 5.6 53.3 1.9
md0 384 2720 40.3 6159 9.5 1907 5.6 3143 45.2 3885 5.5 52.6 1.6
sum 768 5436 80.3 12268 19.0 3815 11.4 6277 90.5 7812 11.1 105.9 3.5
And then I tried it for four copies:
-------Sequential Output-------- ---Sequential Input-- --Random--
-Per Char- --Block--- -Rewrite-- -Per Char- --Block--- --Seeks---
Machine MB K/sec %CPU K/sec %CPU K/sec %CPU K/sec %CPU K/sec %CPU /sec %CPU
md0 256 1281 18.8 2930 4.6 926 2.8 1617 23.3 2008 2.5 25.4 0.9
md0 256 1282 18.7 2927 4.6 927 2.8 1607 23.4 2031 2.8 25.2 0.8
md0 256 1283 18.7 2895 4.6 931 2.8 1616 23.4 1862 2.3 25.8 1.0
md0 256 1302 19.0 2968 4.7 923 2.8 1517 22.2 1657 2.1 29.6 1.0
sum 1024 5148 75.2 11720 18.5 3707 11.2 6357 92.3 7558 9.7 106.0 3.7
So unfortunately, it looks like my software RAID-1 setup is just as slow
with multiple simultaneous access as with single access. This puzzles
me greatly.
Do other people actually get performance boosts from Linux software
RAID-1? Or even performance equivalent to non-RAID filesystems? I'm
beginning to suspect that I'm chasing something that doesn't exist.
Thanks again for the help,
William