# LSI MegaRaid 150-6 (intel SRCS16) performance issues

## darkeye

I just got an intel SRCS16 SATA RAID card (it's basically the LSI MegaRAID 150-6 in intel clothing), and I set up a RAID 5 array with it. just started to play around the thing, when I immediately noticed that this thing is slow...

to test the speed, I've written out a 2GB file with dd from /dev/zero to the RAID array, and to a raw disk on the same system. there's a huge difference in performance, both reading and writing:

```

# time dd bs=536870912 count=4 if=/dev/zero of=/mnt/raid/ize

4+0 records in

4+0 records out

real    5m57.467s

user    0m0.000s

sys     0m4.256s

# time dd bs=536870912 count=4 if=/dev/zero of=/tmp/ize

4+0 records in

4+0 records out

real    0m37.214s

user    0m0.000s

sys     0m4.636s

# time dd bs=536870912 count=4 if=/mnt/raid/ize of=/dev/null

4+0 records in

4+0 records out

real    0m50.663s

user    0m0.008s

sys     0m5.104s

# time dd bs=536870912 count=4 if=/tmp/ize of=/dev/null

4+0 records in

4+0 records out

real    0m38.716s

user    0m0.004s

sys     0m4.816s

```

as you see, /tmp is the raw dist, and is way way faster for writing (OK, RAID 5 is supposed to be slower, but this much slower?), and also in reading.

am I doing something wrong?

I'm trying all this on an AMD 64 bit system, 1GB of RAM, and a 3x400GB RAID 5 array, using kernel 2.6.15-gentoo-r3, and the megaraid_mbox module.

----------

## kamina

I'm having the exact same problem on a handfull of servers using this controller... IO wait is really high (up to 100% at moments) while just copying a file from one place to another!

----------

## Dieter@be

did you guys use the NEW lsi megaraid driver in the kernel config? or the legacy one?

----------

## Priyantha Bleeker

I've got the same problems  :Sad: 

And I am using the "new MegaRaid" driver.

----------

## Jkay

I am completely sure that you guys are pros and know what you are doing, but Im gonna throw this out there just in case ... RAID5 writes a lot slower than it reads. My 6-disk dual channel SCSI array can indefinitely sustain 50M/sec reads using 4-yr-old surplus hard drives but the writes have to be passed thru the RAID processor and divided up and checksummed and things and stuff. So it's slower.

----------

## Dieter@be

how are your caching options configured? (both the card's caching (write back/write through, io caching,..) and the hard drives caching)

because i've read something about that, i believe it was that if you write trough (without caching) and have no disk caching (this is the default for lsi controllers) then the disks really have to do lots of operations for some simple writing

----------

## adelante

This may help:

 *Quote:*   

> 
> 
> After upgrading Intel® RAID Controller SRCS16 firmware from 713H to 713K or 713N, it may cause poor I/O performance.
> 
> 

 

http://www.intel.com/support/motherboards/server/srcs16/sb/cs-020502.htm

----------

## ktsaou

This is an old post, but I would like to give the solution for completeness (I lost several days to figure it out).

I have an Intel SRCS28X (which is the same with LSI Megaraid SATA 300-8) and I had the same very poor performance under RAID-5 (4x 500GB HDs). RAID 10 was better, but RAID-5 was not only slow but was also causing short Xorg lockups, etc.

The trick it to enable Write-Back (instead of Write Through) in the logical array. This change made my poor 8MB/s write performance go to the amazing 110MB/s.

My kernel is 2.6.22-gentoo-r5.

Of course, make sure you have a UPS, otherwise you may loose data and/or corrupt the filesystem on power loss (or just buy the battery backup unit).

Costa

----------

## drogatoo

I have the same problem with a MegaRAID controller on a production machine and I would like to know if there is a problem when enabling write-back mode . Is there a chance for data loss or the raid becoming unusable?

----------

## ktsaou

No, there is not any problem, but make sure you have the battery backup unit, or a UPS (with configuration to shutdown the server properly when there is a long power outage).

Because I don't have the battery, I have preferred to have a cron job doing sync once every minute (so even if the server crashes, I will loose 1 minute of data max).

I have installed the Intel RAID Web Console. It offers a web tool to manage the array while being live (no reboots required for configuration changes). I managed to expand by raid-5 array with one additional disk without a reboot. I suggest to use it - it is really good.

Also I have installed megamon (from LSI), which continiously monitors the card and the arrays, performs consistency checks periodicaly and informs you about current status and all changes via e-mail.

Overall, I am very happy with it so far.

Costa

----------

## drogatoo

Thanks for the quick reply and for the useful information.

I have other questions now.You've mentioned something about Intel RAID Web Console.I've googled around and I understand that you need to have a desktop environment to make it work.Do you have one installed or can it be done without one.

And also the megamon as I've searched its only a rpm. How did you manage to install it on gentoo?

----------

## ktsaou

The Intel thing is a standalone web application (written in java I believe - no apache required). I don't know if it requires X (my server had it already installed), although the only use of it is via web.

The LSI stuff is available in zip format (at least the one I downloaded several months ago).

If you can't find the zips, you can download the rpms and unrpm them (with rpm2tar or similar).

If I recall correctly, I had to emerge lib-compat to make them work.

I start both of them via /etc/conf.d/local.start

----------

## ktsaou

For the Intel RAID web console:

Its installer installs it in /opt/SVR and places a few binaries in /usr/sbin.

I wrote a small script to start it from /etc/conf.d/local.start:

```
#!/bin/sh

cd /opt/SVR || exit 1

/usr/sbin/RegSvr

sleep 1

/usr/sbin/RSLinux

sleep 1

/usr/local/bin/java-1.4.2.sh ./startup.sh

exit 0

```

Since it requires java 1.4.2 I wrote this one too (/usr/local/bin/java-1.4.2.sh):

```
#!/bin/sh

CLASSPATH="/opt/blackdown-jre-1.4.2.03/lib/rt.jar:/opt/blackdown-jre-1.4.2.03/lib/i18n.jar:/opt/blackdown-jre-1.4.2.03/lib/sunrsasign.jar:/opt/blackdown-jre-1.4.2.03/lib/jsse.jar:/opt/blackdown-jre-1.4.2.03/lib/jce.jar:/opt/blackdown-jre-1.4.2.03/lib/charsets.jar:."

JDK_HOME="/opt/blackdown-jre-1.4.2.03"

JRE_HOME="/opt/blackdown-jre-1.4.2.03"

PATH="${JRE_HOME}/bin:$PATH"

export CLASSPATH JDK_HOME JRE_HOME PATH

if [ ! -z "$1" ]

then

        exec "${@}"

fi

```

I hope these help.

----------

## drogatoo

Thank again for the help but I couldn't test your scripts because i couldn't enable write-back yet. In fact I didn't have that option in the raid configuration utility (I have only write through). My controller is Intel RAID Controller SRCS16. I remember I have read somewhere that if you don't have a battery backup unit you can't enable this on some firmware versions (mine is 713R). Do you have any idea about this?

----------

## ktsaou

I suggest to install the Intel RAID Web Console.

This has the option (mine has it) and allows you to update the firmware while the system is running (after which you have to schedule a reboot, of course).

----------

## drogatoo

I can't install the Intel RAID console because I'm using the new megaraid driver from the kernel who doesn't generate /proc/megaraid.And with the legacy driver the system doesn't boot.

I have checked the BIOS raid utility again and i cannot enable write-back(the option is not there it's only write-through). The Intel documentation doesn't say that you MUST have a battery backup unit so that you can enable write-back(it's only recommended).Must I enable something else so that I have that option? Or (stupid guess?) maybe I should have enabled it when I have created the array and now I can't change it anymore (only if I delete and create a new array) ?

----------

## ktsaou

I am using the new megaraid with Intel Raid Web Console.

Anyway, did you try to update to the latest firmware?

----------

## drogatoo

I've upgraded to the latest firmware which is 713S and I still can't switch to write-back. I've read somewhere that you can only enable write-back (when you don't have a BBU) from  the RAID console.But I can't install it , to be more precise I can't install RAID Server (Registration server and RAID Web Server installs just fine). Here is a quote from a pdf from the Intel site:

 *Quote:*   

> RAID server and its sub features can be installed only if the Intel RAID Controller driver is loaded.
> 
> This is checked by checking if the directory /proc/megaraid exists and is
> 
> readable.
> ...

 

----------

## ktsaou

If I recall correctly, the program required megaraid to be compiled as module.

I did this trick to fool it:

1. mv /sbin/lsmod /sbin/lsmod.bin

2. create /sbin/lsmod with this:

```
#!/bin/sh

/sbin/lsmod.bin

cat <<EOF

megaraid                   1  1

megaraid_mbox              1  1

EOF

```

The above, just makes lsmod to report there is module named megaraid and another one named megaraid_mbox.

3. chmod 755 /sbin/lsmod

Now you can run /sbin/lsmod to check it runs correctly and it reports the megaraid modules.

4. Install RAID Server

5. mv /sbin/lsmod.bin /sbin/lsmod

For me this did the trick (I don't have /proc/megaraid).

----------

## Woldo

I have been in the game for 30 years and been doing RAID since it came out of nappies.

I have the Intel SRCS16 version of this RAID adapter and running RAID 10 the only real RAID solution.

In the past I have had a direct multiple result from adding more drives.

4 Disks get 4 times the the disk speed  in read and 2 times on write

this is normal and what is expected.

However I am finding on a number of the servers in my care with this type of controller I am losing speed down from the single disk speed.

My servers disks are rated at 78MB/s each and when you connect them directly to the mother board thats what you get.  

So when I put 4 in an Array set I would expect 312MB/s disk read and 156MB/s disk write.  Normaly the read ahead and cache improve the performance along with the scatter gather so full disk speed is normaly very likely.

I also have a SRCSAS144E unit which is in the sdame family doing exactly the same thing on 8 disks that do 125MB/s each.  this should shoot along at 500MB/s read and 250MB Write but is is slapping around at between 10 and 20MB/s aswell.

I have tried updating Bios and firmware, changing mother boards tried every operating system under the sun and nothing sorts out the issue.

I did find a Registry hack were you find the MERAID miniport and add a device single device key for each physical disk in the array.  You then have to add some buffer items and it actualy speeds it up by the number of drives.  This pushed my disk IO up from 10MB/s to 40MB/s .  I dont remember were I found that info on the net but it was good.  However you still are missing a lot of lost DISK IO and I only acheived half the speed of a single disk.

I have been chasing Intel and getting past the front desk and getting to some real high level support takes months.

So I logged on to LSI and tried their drivers and still the same issue.

If any one wants the Reg hack contact me and I will dig it out

Woldo

----------

