Link to home
Start Free TrialLog in
Avatar of Thomas
ThomasFlag for Malaysia

asked on

CentOS Webserver Harddrives

Hi,
I am setting up a new web server and have a relative small budget.
The server comes with a 500GB SATA and a 64GB SSD.
Originally, I thought to use the SSD only for MySQL but the host suggested to actually install the OS on it too.

My question would be what you opinion is on this.
Will the OS fit and will it really be a benefit, since the websites are way bigger than the 64GB space so the public websites as well as the Webmail would be mapped to the SATA drives because of their size.
So is it still very beneficial to have the base Cent OS 64bit LAMP installation on the SSD and map selected directories that are not accessed to often to the SATA. I currently have SAS 15k drives and because of budget scale down to SATA 7.5k so I am exploring the options to keep performance up as much as possible.

I would love to hear some opinions and also if the OS over time might get to big.
Also what files and directories should really be on the SSD. Maybe it is better to do it the other way around to install the OS on the SATA and only map certain directories to the SSD.

I do not have anyone with me to discuss this and the host obviously is advising me into whatever makes more money for them. So a neutral opinion from a expert in web sever set-up would be what I need.

Thank you for your opinions.

Best wishes,
Tom
Avatar of David
David
Flag of United States of America image

Neither.  100% of drives fail.  See if you can exchange the SSD for the SATA drive, and use host-based software RAID via the md driver.

You'll get read load balancing, and protection against bad blocks and HDD failures.
Dlethe who's very knowedgeable covered the why redundancy is better than a single device that is claimed to have a long life.

The installation of the OS would fit on a  a few GB.
Have not tried it recently so I might be off.
Avatar of Thomas

ASKER

Hi and Thank you for taking the time to respond,

I think I forgot to mention some details.
The set-up of the server would be 2x 500GB RAID 1 SATA plus 1x 64GB SSD
I guess I could create a 64G partition on the SATA and simply do a backup or sync of some kind.

My worries are more in terms of performance. Does an OS install really take advantage of an SSD drive when we speak about a Apache Web Server, PHP, Postfix, etc. or is it more the Dadabases that would benefit.

So the question is to install the OS on the SSD or on the SATA and if this would be a worth wile performance change either way.

Best wishes,
Tom
SOLUTION
Avatar of arnold
arnold
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Note: I recommended mdadm (software RAID) specifically to avoid dropping out of AHCI mode in your BIOS, which should remain enabled to keep up the SSD's speed.

If you have a hardware RAID controller (not FakeRAID) for the SATAs that's an option as well. Basically that translates to "avoid dmraid".
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
After some retrospection (and a small DB hiccup of my own) this morning, it occurred to me that, if I only had one server to work with, I would rather my site go down than risk losing any customer data.

Assuming you don't have a standby database mirroring your primary, you'd probably be better off moving /var/lib/www onto the SATA RAID in the configuration I posted above. The RAID1 setup ought to provide you sufficient read speeds and provides coverage in case of disk failure. Stick with an LVM partitioned logical volume for it, though, so you can take live backups (RAID is not a backup).

That leaves you an empty 64GB SSD to use for /var/www, or at least part of it, which will retain great response times (albeit slightly slower than ramdisks).

I can't imagine your web content is actually greater than 64GB unless you're either hosting hundreds of sites or storing user-uploaded files. If the latter is the case, keep the user files on the SATA array, along with a mirror / fallback of the web content and mount /var/www to the SSD. If the SSD fails you can just switch the mount over to the SATA array until you get the drive replaced.
But still, considering the cost and aggravation of downtime and data loss, it is difficult IMO to rationalize not mirroring data by buying another HDD.

I couldn't agree more, but assuming a hard-set financial limitation (and as long as the server itself doesn't have a hardware failure) I think a viable short-to-mid-term solution can be built with the provided hardware specs.

If it were my build-out, I'd probably scrap the SSD in favor of doubling the RAM and adding another SATA or two in there -- use ramdisks for the commonly accessed content, and mirror the rest... but it's not my built-out =)
Note: I meant to say move /var/lib/mysql to the SATA RAID two comments up ;)
Avatar of Thomas

ASKER

Thank you all for the info, it was very help full.
I not negotiated a RAID1 SSD 125GB plus a RAID1 250GB SATA set. So I will install all on the SSD and use the SATA for mailboxes and non essential files.
In addition I added another singe 500GB drive to backup the whole thing. Unfortunately the provider does not offer an off site backup but I will see to download the whole thing to my local pc and set-up differentials.

Thank you all for the effort, especially GhostInTheMacheen for the helpful details