RAID Stripe Size and Total Blocks Written for Databases
-
Scott, thank you for your topic. I am planning new installation and comparing between RAID 10 and RAID 5 on ssd drives. What do you think about stripe size and TBW for two types of raid? Do you know what size of blocks will be written on disks if service (sql for example) writes 8Kb on volume. For raid10 I think it will be two 8K blocks on mirror disks. But for RAID 5 it will be two blocks with size=stripe size and may be 32 or 64K. And in raid5 configuration TBW limit will be reached faster.
-
RAID 5 will most certainly experience "write expansion" and this will cause more blocks to be written to disk per operation than with RAID 10. That is the harsh reality of parity RAID systems. So you will have more Total Block Written than with a mirrored array for sure. However, some things to consider:
- With modern SSDs, TBW is rarely a major concern. The number that you can write is huge.
- RAID cache systems can offset this reducing the concern, a large Write Cache on the RAID controller will reduce this.
- Good memory systems for your database can do wonders for making almost nothing get written to disk unnecessarily.
-
Just as an example, if we were to look at MS SQL Server...
If you give the system enough memory you can assign the TempDB into a RAM disk and eliminate its writes from the disk array completely. You can also provide enough memory for all transactions to happen in memory for the main database transforms. This allows the system to only go to disk when a new record is committed, not for other interactions.
A few changes like that not only speed up your database dramatically but they do so by shifting transactions from SSD to memory which lowers the SSD TBW while improving speed.
-
@alvama said:
Scott, thank you for your topic. I am planning new installation and comparing between RAID 10 and RAID 5 on ssd drives. What do you think about stripe size and TBW for two types of raid? Do you know what size of blocks will be written on disks if service (sql for example) writes 8Kb on volume. For raid10 I think it will be two 8K blocks on mirror disks. But for RAID 5 it will be two blocks with size=stripe size and may be 32 or 64K. And in raid5 configuration TBW limit will be reached faster.
I'm not Scott but in your context RAID5 seems to be preferred. Because 1) Flash and not spinning disk used so typical parity RAID issues associated with high-capacity spinners are gone (see URL below) 2) Database logs are sequential writes of a big sizes so should "touch" maximum amount of spinners possible and because of sequential nature read-modify-write is not going to happen and 3) RAID5 gives you write performance of (N-1) and RAID10 does (N/2) (where N = amount of spinners).
Good luck