I have a database running on a RAID5 array of SSDs. Could this be killing its performance? When I do many inserts in a row, the entire computer starts blocking up. Even things like firefox start glitching. On my much less powerful computer with a traditional hard drive, the inserts w/ the same database version, schema, and data run smoothly. Could this be the reason, or might it be some other factor?
-
17What are you doing running firefox on a database server?– Matt SimmonsJun 30, 2010 at 1:49
-
@Matt I wish i could upvote that more than once.– Tom O'ConnorJun 30, 2010 at 8:45
-
2ah you assume it is a database server, but it's just the machine I'm coding on. not the best environment we have set up here..– ClaudiuJun 30, 2010 at 15:49
4 Answers
Hmm.
1) RAID5 might not be the best bet for a database. You might try mirroring + striping for redundancy and small file performance.
2) You could be bottlenecking something other than the drives with the SSDs, when the rotational media would bottleneck at the drive. This bottleneck could be resulting in the performance difference. E.g. network bottlenecks can affect the strangest things, especially when you add NFS or the like. If you're tooling the RAID card, maybe it just flakes.
3) You might want to check the I/O scheduler, to make sure they match between the two machines, as they can affect performance.
4) Is the SSD database system performing database queries on par with the other, rotational media system, or better, or worse?
5) To get a good idea of where the bottleneck is happening, you might try dstat
or iostat
SSDs begin to falter with high write duty cycles. RAID5 by it's nature (lots of parity rewrite) has lots of write cycles.
You don't mention which SSD you're using, but you should look at wiping the drives' wear tables to start over from scratch. You should also consider rebuilding at RAID10.
Take a look at BAARF http://www.miracleas.com/BAARF/BAARF2.html for some solid rethinking about RAID5 in general.
Take a look at your SSD's recommendations for performance tuning. Many suggest you only allocate 80% of the drive for filesystem blocks. (more unused blocks means better wear leveling over time)
Best of luck.
-
-
Agreed... unless your SSD is designed specifically for RAID usage, you're going to have problems. Example: eshop.macsales.com/shop/internal_storage/…. One is "RAID Enhanced".– churndJun 30, 2010 at 13:36
-
hmm interesting. i thought SSDs were supposed to be great at lots of little writes, considering they have no moving parts?– ClaudiuJun 30, 2010 at 15:50
-
The problem is you are using yours in RAID, which your SSD's are probably not designed for. You didn't give the model, so I can't say for sure.– churndJul 6, 2010 at 10:41
RAID 5 isn't exactly known for its performance enhancing properties, but it's unlikely that the RAID level is causing problems like what you're experiencing.
Tell us some more. First, how big and how many (and how new) are the SSDs? Are they the only drives in the machine, or do you have a system disk, and your RAID array is separate?
I'm guessing they're SATA...attached to an add-in card, or to the motherboard itself?
To me this sounds like CPU spikes - are you using software raid?
If not (you have a hardware raid controller), do you have a battery backup installed and write cache enabled?