Hardware Tuning
From SQLServerPedia
|
As the database platform grows more and more attention needs to be paid to the hardware configuration of the SQL Server. This includes making sure that you have enough CPU Cores, enough RAM, and that your hard drives are laid out correctly.
StorageIncorrectly designed storage is one of the places where you will instantly see a performance issue show up. If your storage is to slow, your database will slow down, processes will be blocked, CPU utilization will go up, and RAM usage will go up. There is no right answer as to what kind of storage you should be using. Direct Attached Storage (DAS) or Storage Area Network (SAN) will work fine, provided that it is setup correctly. 99% of databases should be using RAID5 or RAID10 arrays for their storage. If you have mostly reads from your disk then you should be using RAID 5. If you are mostly writes to your disk then you should be using RAID 10. However if you are in a SAN environment the RAID level for your database becomes less important for higher write databases. This is because of the way that the SAN systems are designed. SANs have a huge amount of RAM in them which is used as a giant write cache. When you write data to a SAN, that data is actually written to the cache. So if your databases does a lot of writing, then stops writing, you may still be able to use RAID5 for the data files. This is because the writes are made to the cache, which accepts the write operations much faster than any disk could, then as the SAN is able to it will write the data from cache to disk. CPUThese days the speed of the CPUs isn't the most important number to look at. You also want to look at the number of cores that each CPU has. Fast CPUs are great for gaming because they do one thing at a time, but they do it very quickly. Slower multi-core CPUs are better for databases because databases are multi-threaded which means that you can do lots of stuff at the same time very quickly. There isn't any real hard set calculator that you can use to figure out how many cores you need. The more users you will have on the system to more cores you will need. The other advantage to multi-core CPUs is that you can get more CPU cores and pay for less CPU licenses as you only license the physical CPU. RAMFiguring out how much RAM to get is much easier than figuring out how many CPU cores to get. Start by figuring out how much data will be in your database, and of that data how much of that data will need to be accessed quickly and on a regular basis. Take that amount add a Gig for the SQL Server, then add another couple of Gigs for Windows, your backup software, etc and that's how much RAM you should be putting in your servers. These days RAM is cheap, there isn't any reason to not have enough. NetworkMore Reading on Hardware TuningKendal Van Dyke did a blog post series on Disk Performance and specifically on RAID5 vs RAID10. |