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 got a dedicated server (running Windows 2008 Standard Edtion) with two hard drives. I have a web app (written in ASP.NET) that should be running on this server, the web app uses MySQL which should also be running on the same server. Also there will be the user photos which reside in the same folder as the app folder. Most access will be to MySQL and the user photos.

So, is it better to use the second drive for both the app and MySQL data files so that I leave the first drive for the OS

OR

Use the first drive (which also has the OS files) for the web app and the second drive for MySQL so that I lower the access time.

Which approach should yield better performance?

Many Thanks

share|improve this question
    
Do you mean two redundant arrays or just two single drives? (If only two drives then first mirror them and then all options on where to put stuff are simply gone unless you add more drives for additional redundant arrays ^^) –  Oskar Duveborn Sep 13 '09 at 16:11
    
No, actually two single drives. I'm considering a RAID 1 setup but I'm a little worried about implementing it using the built-in software in Windows 2008. A hardware solution should be better but I can't afford this right now. –  Mee Sep 14 '09 at 0:47
add comment

5 Answers

Unless you have a small amount of RAM or the web server hosted parts of your application are very memory intensive (or you expect many concurrent connections so the small web server processes will multiply up to something large) then the only thing in that arrangement that will be imposing significant I/O load is the database.

Giving it its own drive may improve performance of the overall arrangement a bit, but you might also consider instead using the two drives as a RAID1 array to improve fault tolerance and therefore availability (this doesn't remove the need for backups though).

If you have stay with two separate drives though there are a couple of things that can improve database server performance:

  1. If you do regular backups (if you don't, then why not?!), backup to the drive that the database is not on. This will speed up the backup process and minimise the performance difference it makes to the running app
  2. If mysql allows you to separate its transaction logs from the data files as MSSQL and others do, then keeping the logs and data on separate drives can give a good performance boost if your database sees many write operations
share|improve this answer
    
+1 for RAID1 array suggestion. –  sybreon Sep 13 '09 at 15:31
add comment

I'd suggest that you go with the tried-and-true configuration of:

  • one partition for the OS
  • a second partition for the DB, application, user images, etc.

Here's why:

  • your OS can go belly up, but your data would theoretically be separated from any OS disaster.
  • You can backup each partition on a separate schedule as you see fit.
  • Your RESTORE time for one partition would be quicker than having all your eggs on one disk/partition.
  • in case of a single disk failure, you'll see no downtime.

DB access wouldn't necessarily be more performant, but the heart of this is the classic performance v. reliability trade-off with 2 disks.

It wasn't clear whether your disks were of the same capacity. Consider a RAID 1 configuration where the disk is partitioned with those 2 partitions on it.

For other performance measures:

  • consider ASP.NET and IIS kernel mode caching strategies
share|improve this answer
    
Yes, the hard drives are of same capacity. Thanks for pointing out the RAID 1 configuration, I see many others recommend it too and I'm leaning towards this direction. –  Mee Sep 14 '09 at 1:13
    
The reason I didn't consider a RAID 1 configuration before is that I can't currently afford a hardware solution for this, but I did a little research and it seems the software RAID in Windows 2008 is reliable enough (some suggest it affects the performance slightly but not too much), it has some problems, like that it's not easy to know when a drive fails, but considering that you get it with the OS and you don't pay extra money, then well, you can't really complain :) –  Mee Sep 14 '09 at 1:14
add comment

There's always a debate with this type of question as to which is the preferred way to go, but my suggestion would be to move the app and MySQL to the second hard drive.

share|improve this answer
add comment

I would go with 2nd Option too, but we had a bad experience with such option once, because when we had to change our ISP, the new ISP didnt provide us two drives, they only had single drive machines, so we were in trouble reorganizing everything. However most of machines are now available with SATA multiple connetors so now its no longer problem, but yes migration plan and growth plan must be considered before making difference. Our problem is now 7 years old, but yes we do plan.

share|improve this answer
add comment

Since the cost of a hardware RAID controller is too high for this project, I think it would be a fair guess that it is not mission critical. In that case, the load on the server probably isn't going to be high enough to justify obsessing over performance.

How many page hits are you expecting per day? Have you actually measured the performance characteristics yet? The golden rule of optimization is "Measure, then do".

I would use your second drive as a RAID-1 mirror before worrying about performance issues.

share|improve this answer
add comment

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.