2

I'll be running ubuntu server on a 3 disks server (450 GB each) and 16 GBs of RAM.

My target at the moment isn't configuting MySQL itself, but what could be the best RAID configuration for my case here (Top priority is for system availability\data-protection and then comes performance, the disks are pretty fast anyway).

I've been reading for a while about partitioning and I'm thinking about doing the following:

  • I'll have different partitions for /boot, /, swap, /home and /db (holding all mysql files). This schema is for no particular reason other than separating each aspect of the OS from the other so no partition would steal space from other critical partitions.

But I have no idea what file system should I use for each partition ? Is it ok to have different file systems for each partition ? Are their recommended ones for /boot, / ? For MySQL, I'm not sure yet, it's debates everywhere ! I only need something stable and easy to handle. I'm pretty sure these disks speed will do just fine for our needs and the partition size will hardly be an issue

EDIT: Will use RAID 0 for swap partitions, RAID 1 for the /boot partition and RAID 10 for the rest. I only have 3 disks and my main concern is the reading throughput (database reports), not the writing throughput, and of course system availability.Use RAID 5 because I only have 3 disks and my main concern is the reading throughput (reports), not the writing throughput.

But I'm not sure how to configure a RAID array. I've followed ubuntu's server partitioning guide and I was confused by only having 2 partitions, one for swap and one for /. While the one for swap is bootable and used as "physical volume for RAID", why is that ? And what does "physical volume for RAID" mean ?

EDIT: What would be a recommended swap space if the RAM is 16 GB ? I say 4 GB, just to reduce the I/O blocking. What do you think ?

Any suggestions are mostly welcomed.

Muhammad Gelbana
  • 197
  • 2
  • 11
  • RAID5 is no longer a good choice... since about 10 years. Neither for speed, nor for security. Use 2 disks in mirror and you'll get a better throughput (except for a straight continuous read, nearly never seen in real life). – Gregory MOUSSAT Jul 29 '12 at 17:15
  • @GregoryMOUSSAT, Thanks. But I still need the system available in case of a disk failure. Is their a better way to achieve that using 3 disks or may be 2 ?! – Muhammad Gelbana Jul 29 '12 at 17:19
  • There is also raid 10 on 3 disks...but I don't know if it's available on hw raid controllers. – Jure1873 Jul 29 '12 at 18:41
  • @Jure1873, with one as a spare ? – Muhammad Gelbana Jul 29 '12 at 19:09
  • No, Raid 10 means raid 1 + 0 = mirroring + striping. With linux sw raid you can also create raid 10 with 3 disks. See Raid10,f2 on 3 disks: http://en.wikipedia.org/wiki/Non-standard_RAID_levels#Linux_MD_RAID_10 – Jure1873 Jul 29 '12 at 20:44
  • @Jure1873, thanks a lot, that was really helpful !! So in my case (3 drives) I'll be actually using the en.wikipedia.org/wiki/Non-standard_RAID_levels#RAID_1E schema. After a test on the virtual machine, disk utilization should be 50%. That would make an argument with my manager and finally use RAID1E for the database partition. Another question, I'm thinking to use RAID0 (Mirroring) for the SWAP partition, is that efficient ? Is it even reasonable to use different RAID schemas for different partitions ? – Muhammad Gelbana Jul 29 '12 at 23:31
  • Yes. If you can get 4 disks it would be better, but this is still better than raid 5. And I would not worry so much about the swap partition as it will be used only as a last resort so I would just have it as everything else (but not raid 0 as a failed drive could make it unusable). – Jure1873 Jul 30 '12 at 15:40
  • @Jure1873, so you're saying that with RAID0, swapping would be completely disabled ?! If I understood you correctly, I guess I'll have to use RAID10 for swapping too ! – Muhammad Gelbana Jul 30 '12 at 16:05
  • It wouldn't be disabled, but if you loose on drive in a raid 0 then the whole array fails so for the 8gb of swap I think you can just put it near the OS partition (on raid10 or raid1). I wouldn't complicate too much, the important part is reliability (that you should be able to keep it running if you loose 1 drive) and have enough speed for the db disk. If you have only 3 drives just put everything on raid1e. – Jure1873 Jul 30 '12 at 16:10

1 Answers1

3

If you have an option of going the a fourth disk, four disks in a RAID 1+0 will be an all-around better solution than the RAID 5 arrangement you're speaking of.

See our canonical answer about this here.

Other considerations are your hardware RAID controller... Will you have a solution with read and write caching (battery or flash-backed cached solutions will help write-speed)? Filesystems make a bit of a difference as well. XFS is well-regarded in this space, but it requires some tuning to work well.

As far as swap space, I rarely allocate more than 8GB of swap. Maybe 12GB or 16GB in certain cases...

ewwhite
  • 194,921
  • 91
  • 434
  • 799
  • If the RAID array was my decision I would've gone for RAID 10 but it isn't and I still don't know the full specs of the disks yet. So far I'm trying to decide whether to use XFS or JFS for MySQL's partition. – Muhammad Gelbana Jul 29 '12 at 17:41
  • The disks are 450GB enterprise SAS disks in either 10k or 15k RPM. That's fairly clear. I don't know that JFS is as widely used as XFS. But either way, the RAID 5 is a bit of an issue. – ewwhite Jul 29 '12 at 17:44
  • JFS is the worst i've tested when faced with hardware failure (http://serverfault.com/a/206837/6125). Go with Ext3/4 if you don't need more than 8TB, XFS if you do. – Javier Jul 30 '12 at 02:46