February 17th, 2010 by Melaneum
With all the recent multicore CPU, the bottleneck of processing is increasingly the IO from the disk. When compiling a bit project (especially linking), when processing gigabyte of data (now that loading up 4 GB in RAM is not a problem)…
Of course, some (expensive) solutions exist: SCSI disks, SAS, and now SSD. But before going into that, just standard hard drives and a software raid can increase significantly the output. Using software raid 0 with two disks, you double the output and don’t loose any capacity. Well of course, there is a price, you increase the failure probability: if only one disk fails, that’s it, your data are gone. Don’t use that to store your precious data, just as an additional processing space for data that you can regenerate in case something goes wrong. Don’t use that for the system, don’t use that for /home, etc… Additionally to a heavy processing place, you can also use that for the swap.
The setup is quite easy using mdadm. First, partition the first disk as you need, then copy the partition table to the other disk
sfdisk -d /dev/sde | sfdisk /dev/sdf
Create the software raid:
mdadm -C /dev/md0 -l0 -n2 /dev/sde1 /dev/sdf1
Add the configuration to the mdadm config file:
mdadm --detail --scan >> /etc/mdadm/mdadm.conf
Configure the mounting point in /etc/fstab as if /dev/md0 was a normal partition and that’s it, you’re done.
You should be able to reach 200MB/s effectively with this if you’re using some recent hard drives that are going for less than USD100/TB.
This entry was posted on Wednesday, February 17th, 2010 at 13:58 UTC and is filed under Linux. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.