LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 12-02-2012, 10:11 AM   #1
nrs
LQ Newbie
 
Registered: Dec 2012
Posts: 2

Rep: Reputation: Disabled
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.
 
Old 12-03-2012, 01:48 PM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,140

Rep: Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263
To check if the partition 1 of /dev/sdb is aligned:
Code:
sudo parted /dev/sdb align-check optimal 1
1 aligned
This post says you are most likely already aligned:

If you have performance issues check CPU utilization while disk I/O is running. I'd be concerned about doing software encryption and RAID on that Turion processor. Most likely that will limit the max data rate you can achieve.
 
Old 12-03-2012, 03:36 PM   #3
nrs
LQ Newbie
 
Registered: Dec 2012
Posts: 2

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by smallpond View Post
To check if the partition 1 of /dev/sdb is aligned:
Code:
sudo parted /dev/sdb align-check optimal 1
1 aligned
This post says you are most likely already aligned:

If you have performance issues check CPU utilization while disk I/O is running. I'd be concerned about doing software encryption and RAID on that Turion processor. Most likely that will limit the max data rate you can achieve.
I was concerned with it too but it looks like CPU utilization isn't the issue here.

I checked the alignment with parted and it tells me i'm misaligned.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Extending LUKS encrypted RAID5 array GasPipe Slackware 4 10-28-2012 01:45 AM
LUKS on LVM musiqdefunk Linux - Newbie 3 08-11-2012 05:07 AM
Optimize filesystem performance on top of mdadm raid5 + LUKS wallbunny Linux - Software 0 11-22-2010 02:22 PM
Upgrade to OpenSuSE 11.1 GM from RC1 killed RAID5 (mdraid) XFS array Marshalle Linux - Server 14 12-25-2008 08:33 PM
cryptsetup won't open crypted fs on raid5 with known luks passphrase luboss Linux - Security 3 11-13-2008 01:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 02:37 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration