RAID-1 performance with Sun v40z
We are using Sun v40z machines with built in LSI RAID controller (RAID level 1). I was wondering about the performance of RAID on these machines. Our application does a lot of I/O (mainly random and sequential reads). Since we are using a RAID-1 system with two disks, I expect the performance to be good, but it is not, and it seems that all read requests are served from one disk. We are running RedHat Linux 4.
For investigating, I used dd to read a large file and write it to /dev/null. During this operation, iostat showed around 400-500 transactions per second with 100K blocks read per second. When I instead run two parallel dd command to read from two different files, number of transactions per second drop dramatically to 100-120, with just 30-40K blocks read per second. This is _very_ bad given that we have two disks mirrored using RAID-1 and both should be readable in parallel.
I have conducted the same experiment on a different machine (Linux desktop, non-Sun, without-RAID), and I was able to read 75-80K blocks per second with two parallel read processes.
I am using:
time dd of=/dev/null count=5000000 bs=16k if=file1.txt
time dd of=/dev/null count=5000000 bs=16k if=file2.txt
I haven't configured much with the RAID controller, it is as it came with the machine. Infact, I was not able to find any documentation or support about the RAID hardware on these machines from Sun's v40z site. If you know of location of documentation, please point me to it.
Any help about how to improve the performance will be appreciated.
thanks in advace,
Nilesh
# 1
There will (most likely) be additional responses to your question.
RAID-1 doesn't necessarily give you any improved performance,
it's primary benefit and its "raison d'etre" is to give you data integrity.
Here is a link to the Technopaedia at the Ars Technica web site.
http://arstechnica.com/paedia/r/raid-1.html
It is a multi-page online article from May 2000 that attempts to define
the various sorts of RAID configurations that could exist,
and tries to describe the features and benefits of each RAID configuration.
(I've kept it as a bookmark in my web browser.)
# 2
RAID-1 should perform *at least* as well as single disk, but in my case is isn't even doing that. The overall performance goes down significantly when there are two simultaneous read operations.
Infact, when I am doing two long sequential reads, I expect twice the performance unless 1. the controller is configured to read from only one disk, or 2. when it checks error by comparing reads from both disks OR if 3. the controller is really crappy. I am not sure which one is the case with v40z.
# 3
Most controllers will simply round-robin between the two disks, so you shoudl not expect any performance improvements between a single disk and RAID1. SVM has a "geometric" read option which theoretically can help large sequential reads, but it defaults to round robin, and my guess is that most embedded controllers do as well.
Most likely read performance falls off as you try two file copies because you are trying to copy the same file. The two processes are trying to read the same disk sectors, so one of them is going to have to wait for the disk to spin around to the same sector the other process just read. There are lots of other reasons why this could happen. You should see the same effect with a single disk.
# 4
I am trying to copy two _different_ files to /dev/null. I am not sure what prevents the controller to read from two disks, two files, in parallel. In any case the performance should not decrease. I tried the same experiment of reading two files on a different machine with single disk, and performance was *better* than RAID-1's.
I couldn't get what do you mean by SVM. Also, it will be helpful if someone can point me to documentation of this raid controller (sun's site does not even mention the model number).