Optimizing RAID5+LUKS+LVM+XFS settings for better performance?
Hi! This is my first post.
I recently acquired a HP Microserver N40L in hopes that it would make an ideal NAS fileserver. Per my requirements, I needed something that would permit encrypted block devices, so a regular NAS wasn't really in the cards for me.
Right now I've got it working for me with Debian Wheezy but the performance isn't great. I'm thinking this is related to my choice of Advanced Format drives (WD Red 3TB) that use a 4K physical sector. The logical sectors are still reported as 512B.
SO...I could really use some help here. If I'm going to have to rebuild/reinstall the OS, I'd like to make sure that I'm getting the right settings for RAID/LUKS/XFS so that everything is optimized before I go through the effort of doing the re-install.
AFAIK, I'm going to need to recreate the partitions so they're aligned on a 4K boundary.
Next, I'm going to need to create the RAID device (md0) and make sure the RAID-5 stripe size is set properly. I could use some help here. I've got 4 drives (3+1) and I'm not sure how the number of drives affects the math.
Then, I've got to setup LUKS on that device (md0 -> md0_crypt) to use the correct "align-payload" value. Again, I could use some help here. I'm not sure what wold be the correct value to use.
Once that's done, I need to make md0_crypt a PV for LVM2. I'll create my logical volumes over that. I'm not sure if I even need to optimize any values here.
I'll then install XFS on the logical volumes I created just now.
I guess I'm missing two things really: 1. What should my values be? 2. How do I make sure these values are used during the Wheezy install process. The installer is pretty automatic but the defaults seem to be wrong for my setup.
Thanks in advance for any help you can offer. I know this is a somewhat big "ask" but I'm wondering if anyone can offer guidance/pointers so I can avoid making all the same mistakes everyone else has made before me.
|