Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I've had no luck searching how to setup writeback cache on a RAID10 setup using mdadm software RAID. I'm trying to set this up for a 4x256Gb Samsung 830 SSD setup which only has 400Mb/s write speed... CentOS6

share|improve this question

1 Answer 1

If you are using those 4 to cache for a large rotational disk (or other slow disk), look into dm-cache, bcache, and friends. They're not built into mdadm but can be used on top of raid devices.

If you're only able to write 400MB/sec to those four SSDs, you should check what the bottleneck is; I doubt it's io speed, unless you're using a crappy controller. Check your iowait%, if that is high, try moving one or more of the disks to a different controller (like a PCIe sata adapter). If it is low and the cpu usage is 100%, your raid might be CPU-bound.

Most common filesystems will automatically detect optimal tuning parameters of linux softraid when you create them on md devices.

share|improve this answer
    
The server is completely empty and fresh. CPU is all idle. I'm not trying to cache for rotational disks, but is there a way to setup writeback cache for software RAID? –  Richard Sep 20 '13 at 17:17
    
Short answer is yes, but I highly doubt that is what you want in your setup. Could you edit your question to say what your end goal is (more write speed or tiered storage or something?). It might be easier to answer your question if I knew why you wanted writeback (aka write-behind) cache. –  Andrew Domaszek Sep 20 '13 at 17:22
    
I have done so. I also found ' tune2fs -E stride=n,stripe-width=m /dev/mdx' recommended. But how do I determine the optimal stride value and stripe-width value? –  Richard Sep 20 '13 at 17:27
    
This is a different question entirely, but for software raid, mkfs.ext4 will automatically detect the optimal values. –  Andrew Domaszek Sep 20 '13 at 17:37
    
Could you elaborate on how to setup software writeback cache and why it's a bad idea? –  Richard Sep 20 '13 at 20:04

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.