Russell Coker: Software vs Hardware RAID
Should you use software or hardware RAID? Many people claim that Hardware RAID is needed for performance (which can be true) but then claim that it’s because of the CPU use of the RAID calculations.
Here is the data logged by the Linux kernel then the RAID-5 and RAID-6 drivers are loaded on a 1GHz Pentium-3 system:
raid5: automatically using best checksumming function: pIII_sse
pIII_sse : 2044.000 MB/sec
raid5: using function: pIII_sse (2044.000 MB/sec)
raid6: int32×1 269 MB/s
raid6: int32×2 316 MB/s
raid6: int32×4 308 MB/s
raid6: int32×8 281 MB/s
raid6: mmxx1 914 MB/s
raid6: mmxx2 1000 MB/s
raid6: sse1×1 800 MB/s
raid6: sse1×2 1046 MB/s
raid6: using algorithm sse1×2 (1046 MB/s) There are few P3 systems that have enough IO capacity to support anywhere near 2000MB/s of disk IO and modern systems give even better CPU performance. The fastest disks available can sustain about 80MB/s when performing contiguous disk IO (which incidentally is a fairly rare operation). So if you had ten fast disks performing contiguous IO then you might be using 800MB/s of disk IO bandwidth, but that would hardly stretch your CPU performance. It’s obvious that CPU performance of the XOR calculations for RAID-5 (and the slightly more complex calculations for RAID-6) is not a bottleneck. Hardware RAID-5 often significantly outperforms software RAID-5 (in fact it should always outperform software RAID-5) even though in almost every case the RAID processor has significantly less CPU power than the main CPU. The benefit for hardware RAID-5 is in caching. A standard feature in a hardware RAID controller is a write-back disk cache in non-volatile RAM (RAM that has a battery backup and can typically keep it’s data for more than 24 hours without power). All RAID levels benefit from this but RAID-5 and RAID-6 gain particular benefits. In RAID-5 a small write (less than the stripe size) requires either that all the blocks other than the ones to be written are read or that the original content of the block to be written and the parity block are read - in either case writing less than a full stripe to a RAID-5 requires some reads. If the write-back cache can store the data for long enough that a second write is performed to the same stripe (EG to files being created in the same Inode block) then performance may double. There is one situation where software RAID will give better performance (often significantly better performance), that is for low-end hardware RAID devices. I suspect that some hardware RAID vendors deliberately cripple the performance of low-end RAID devices (by using an extremely under-powered CPU among other things) to drive sales of the more expensive devices. In 2001 I benchmarked one hardware RAID controller as being able to only sustain 10MB/s for contiguous read and write operations (software RAID on lesser hardware would deliver 100MB/s or more). But for random synchronous writes the performance was great and that’s what mattered for the application in question. Also there are reliability issues related to write-back caching. In a well designed system an update of an entire RAID-5 stripe (one block to each disk including the parity block) will first be performed to the cache and then the cache will be written back. If the power fails while the write is in progress then it will be attempted again when power is restored thus ensuring that all disks have the same data. With any RAID implementation without such a NVRAM cache a write to the entire stripe could be partially successful. This means that the parity block would not match the data! In such a situation the machine would probably work well (fsck would ensure that the filesystem state was consistent) until a disk failed. When the RAID-5 recovery procedure is used after a disk is failed it uses the parity block to re-generate the missing data, but if the parity doesn’t match then the re-generated data will be different. A disk failure may happen while the machine is online and this could potentially result in filesystem and/or database meta-data changing on a running system - this is a bad situation that most filesystems and databases will not handle well. A further benefit of a well designed NVRAM cache is that it can be used on multiple systems. For their servers HP makes some guarantees about which replacement machines will accept the NVRAM module. So if you have a HP server running RAID-5 with an NVRAM cache then you could have the entire motherboard die, have HP support provide a replacement server, then when the replacement machine is booted with the old hard drives and NVRAM module installed the data in the write-back cache will be written! This is a significant feature for improving reliability in bad corner cases. NB I’m not saying that HP is better than all other RAID vendors in this regard, merely that I know what HP equipment will do and don’t know about the rest. It would be good if there was a commodity standard for NVRAM on a PC motherboard. Perhaps a standard socket design that Intel could specify and that every motherboard manufacturer would eventually support. Then to implement such things on a typical PC all that would be required would be the NVRAM module, which while still being expensive would be significantly cheaper than current prices due to the increase in volume. If there was a significant quantity of PCs with such NVRAM (or which could be upgraded to it without excessive cost) then there would be an incentive for people to modify the Linux sotware RAID code to use it and thus give benefits for performance and reliability. Then it could be possible to install a NVRAM module and drives in a replacement server with Linux software RAID and have the data integrity preserved. But unless/until such things happen write-back caching that preserves the data integrity requires hardware RAID. Another limitation of Linux software RAID is expanding RAID groups. A HP server that I work on had two disks in a RAID-1 array, one of my colleagues added an extra disk and made it a RAID-5, the hardware RAID device moved the data around as appropriate while the machine was running and the disk space was expanded without any down-time. Some similar things can be done with Linux, for example here is documentation on converting RAID-1 to RAID-5 with Linux software RAID [1]. But that conversion operation requires some down-time and is not something that’s officially supported, while converting RAID-1 to RAID-5 with HP hardware RAID is a standard supported feature.
pIII_sse : 2044.000 MB/sec
raid5: using function: pIII_sse (2044.000 MB/sec)
raid6: int32×1 269 MB/s
raid6: int32×2 316 MB/s
raid6: int32×4 308 MB/s
raid6: int32×8 281 MB/s
raid6: mmxx1 914 MB/s
raid6: mmxx2 1000 MB/s
raid6: sse1×1 800 MB/s
raid6: sse1×2 1046 MB/s
raid6: using algorithm sse1×2 (1046 MB/s) There are few P3 systems that have enough IO capacity to support anywhere near 2000MB/s of disk IO and modern systems give even better CPU performance. The fastest disks available can sustain about 80MB/s when performing contiguous disk IO (which incidentally is a fairly rare operation). So if you had ten fast disks performing contiguous IO then you might be using 800MB/s of disk IO bandwidth, but that would hardly stretch your CPU performance. It’s obvious that CPU performance of the XOR calculations for RAID-5 (and the slightly more complex calculations for RAID-6) is not a bottleneck. Hardware RAID-5 often significantly outperforms software RAID-5 (in fact it should always outperform software RAID-5) even though in almost every case the RAID processor has significantly less CPU power than the main CPU. The benefit for hardware RAID-5 is in caching. A standard feature in a hardware RAID controller is a write-back disk cache in non-volatile RAM (RAM that has a battery backup and can typically keep it’s data for more than 24 hours without power). All RAID levels benefit from this but RAID-5 and RAID-6 gain particular benefits. In RAID-5 a small write (less than the stripe size) requires either that all the blocks other than the ones to be written are read or that the original content of the block to be written and the parity block are read - in either case writing less than a full stripe to a RAID-5 requires some reads. If the write-back cache can store the data for long enough that a second write is performed to the same stripe (EG to files being created in the same Inode block) then performance may double. There is one situation where software RAID will give better performance (often significantly better performance), that is for low-end hardware RAID devices. I suspect that some hardware RAID vendors deliberately cripple the performance of low-end RAID devices (by using an extremely under-powered CPU among other things) to drive sales of the more expensive devices. In 2001 I benchmarked one hardware RAID controller as being able to only sustain 10MB/s for contiguous read and write operations (software RAID on lesser hardware would deliver 100MB/s or more). But for random synchronous writes the performance was great and that’s what mattered for the application in question. Also there are reliability issues related to write-back caching. In a well designed system an update of an entire RAID-5 stripe (one block to each disk including the parity block) will first be performed to the cache and then the cache will be written back. If the power fails while the write is in progress then it will be attempted again when power is restored thus ensuring that all disks have the same data. With any RAID implementation without such a NVRAM cache a write to the entire stripe could be partially successful. This means that the parity block would not match the data! In such a situation the machine would probably work well (fsck would ensure that the filesystem state was consistent) until a disk failed. When the RAID-5 recovery procedure is used after a disk is failed it uses the parity block to re-generate the missing data, but if the parity doesn’t match then the re-generated data will be different. A disk failure may happen while the machine is online and this could potentially result in filesystem and/or database meta-data changing on a running system - this is a bad situation that most filesystems and databases will not handle well. A further benefit of a well designed NVRAM cache is that it can be used on multiple systems. For their servers HP makes some guarantees about which replacement machines will accept the NVRAM module. So if you have a HP server running RAID-5 with an NVRAM cache then you could have the entire motherboard die, have HP support provide a replacement server, then when the replacement machine is booted with the old hard drives and NVRAM module installed the data in the write-back cache will be written! This is a significant feature for improving reliability in bad corner cases. NB I’m not saying that HP is better than all other RAID vendors in this regard, merely that I know what HP equipment will do and don’t know about the rest. It would be good if there was a commodity standard for NVRAM on a PC motherboard. Perhaps a standard socket design that Intel could specify and that every motherboard manufacturer would eventually support. Then to implement such things on a typical PC all that would be required would be the NVRAM module, which while still being expensive would be significantly cheaper than current prices due to the increase in volume. If there was a significant quantity of PCs with such NVRAM (or which could be upgraded to it without excessive cost) then there would be an incentive for people to modify the Linux sotware RAID code to use it and thus give benefits for performance and reliability. Then it could be possible to install a NVRAM module and drives in a replacement server with Linux software RAID and have the data integrity preserved. But unless/until such things happen write-back caching that preserves the data integrity requires hardware RAID. Another limitation of Linux software RAID is expanding RAID groups. A HP server that I work on had two disks in a RAID-1 array, one of my colleagues added an extra disk and made it a RAID-5, the hardware RAID device moved the data around as appropriate while the machine was running and the disk space was expanded without any down-time. Some similar things can be done with Linux, for example here is documentation on converting RAID-1 to RAID-5 with Linux software RAID [1]. But that conversion operation requires some down-time and is not something that’s officially supported, while converting RAID-1 to RAID-5 with HP hardware RAID is a standard supported feature.
Fixing bugs in code and committing it to VCS usually also means that you need
to interact somehow with BTS you use to let it know that the bug has been
fixed. This is manual work which could be done by some clever commit scripts,
right? All what is needed is just spend some time to set it up.
Most of my development currently goes to
For a while I’ve been trying to find some easy way to keep a few
machines I admin behaving the way I want them too with minimal effort.
They don’t really need much maintenance – but I would like something
to help keep them all in sync. Basically, something like FAI, but much,
much simpler – ideally something that takes five minutes to understand,
and another five minutes to deploy; and leave the more complicated and
powerful tools for when they’re actually needed.
I figured what I really want was just a simple way to make a
meta-package – one that doesn’t really provide any functionality,
just tells apt/dpkg what I want installed (via Depends), and what I
don’t want installed (via Conflicts) and adds any extra configuration
stuff or local scripts that I decide I want.
But doing that with a real Debian package is harder than I’m really
comfortable with – I don’t want to have to worry about potential lintian
errors, or rules files and debhelper commands, or writing a Makefile
to get my files installed or whatever, I want something more trivial
than that. Looking for meta-package creators, the only one I spotted
that I thought looked likely was cdd-dev, described as “Custom Debian
Distributions common files for developing meta packages”. Unfortunately
it seems to just provide templates, which makes things quicker, but no
less complex.
Fortunately equivs (“Circumvent Debian package dependencies”) is
actually used for metapackages these days, according to its maintainer
on IRC and its long description:
I was viewing one of my most favorite speakers today, Lawrence Lessig, talk about copyright, giving a speech that is very similar to one that I have heard a few times online, but Lessig presents it so well that I end up watching it over and over again. This particular speech was 
Recently spent three days playing poker, watching movies and drinking beer
(we call that military service in Switzerland.)
Today I have been to the "
Yesterday, my laptop locked up hard. So hard, it wouldn't turn on afterwards,
but flash an error code. Unfortunately, Dell hides the relevant information
very well - it took me some time to find in the forums that the error code
means bad memory.After removing the memory module from slot B, I could turn my computer back on
again. So either the module is dead or the mainboard part related to it.I bought my laptop second-hand in the US last year, and warranty probably is
just over. Still I wanted to make sure that this isn't covered by warranty
anymore, so I tried contacting Dell support.What a pain. No reply yet to my mail inquiry; and the "support chat" doesn't
work right. Their support agent always asks for my phone number (WTF?) and
then after some minutes says he's going to disconnect because I don't reply.I wonder if they ever tested their support chat with Gecko-based browsers.0 out of 5 stars for Dell support so far. Important information is inaccessible
and the support doesn't reply in either email nor chat. It's not even giving
bad replies.


This is another case of a udev rule that took over an hour to figure out,
and now seems very clear and obvious. Which probably means it won't next
time I need it.
I have a bunch of USB to serial adapters, all using pl2303, all so cheap
that there's no product ID or any way to tell them apart. This is cheaper
than buying actual console server hardware nowadays. So how to know which
ttyUSB* device is hooked up to what? The solution is to use the USB bus ID,
which corresponds to the usb port the device is plugged into. My
I've just uploaded the first release of libcwidget to Alioth and NEW. libcwidget is a high-level C++ library for developing user interfaces that run in a terminal using curses as the display and input layer. It uses widget abstractions similar (but of course not identical) to those found in GTK+ and Qt, with signals and slots provided by
Thursday evening, when I came from work I found my nslu2 not working. It is/was a router and a local mirror. I tried to understand what's going on, but I couldn't. Everything looked fine, except that it did not resolve any addresses and the ping to my provider was not giving any results.
The most common (and, in fact, visible) complaint concerning the New Maintainer process is the time it takes for the DAM to approve the applicant and, after that, create her account. No need to rehash over that.
Another very common problem seems to lie at the AM level, with a number of AMs being mostly inactive, as far as the NM process is concerned, for long periods of time. I know a number of NMs who are waiting for their AM to, basically, come back to life.
It’s not OK for an NM to have to wait for months for her AM at whatever step of the procedure without any reply whatsoever to her mails/IRC pings. It’s even less OK to have NMs wait for months for their final AM report to be posted on -newmaint.
The problem is not with the time taken by the whole procedure (though that can be improved too), the problem is with unresponsive AMs. If you can’t keep up, give up. Don’t let your NMs wait for you indefinitely.
It’s even worse when the AM wants to be the exclusive sponsor for her NM. That means the NM cannot properly take care of her packages in Debian. That’s not acceptable. That practice should be discouraged.
And, oh, this works both ways: if you’re in the NM queue and have time constraints impacting your application, please tell so to your AM and ask to be put on hold until you can find enough time to resume your application. You’ll help everybody by doing so.
Only an outline so far but most of this code already exists in Emdebian SVN.
I don't have the BTS handy right now, but bug #450000 was reported this week. At the current rate, it means that bug #500000 should come out around Oct 21st 2008. So,