One thing that really bothers me is a slow compile time. A slow compile time causes me to do other things when compiling, which in turn causes a loss of focus. Basically a context switch I wish to avoid. So the other day I decided to try out an SSD drive to see if I could get an improvement, because I thought that my hard drive was the bottleneck. My results were rather interesting.
First I would like to say that I work on a very large solution with a very large (7000+ files) ASP.NET website. A few months ago I converted our IIS website project to a Web Application Project. That caused our build time to go from about 5 minutes to around a minute or so. That was a huge improvement, but we still had issues with that one minute. The reason was because in addition to the one minute lag time caused by the build, when you went to any page for the first time you got a hesitation while the page was being compiled. The reason this happens is the Web Application Project doesn’t fully compile the pages using the aspnet_compiler. So for us the bottleneck is the execution of the aspnet_compiler. For this reason I chose to use our build script as the benchmark test. The build script spends about 80% of its time fully compiling our website using the aspnet_compiler. All of the results are given using this benchmark.
The result before I decided to start my testing varied between programmers, but the general case outside myself was the build took about 400-500 seconds. My machine was taking about 320s. The main reason for that was my machine had 4 250G 7400 rpm drives in a RAID 0 with an Adaptec RAID card. With this in mind I thought for sure the bottleneck was hard drive, but that wasn’t necessarily the case.
Here are my results:
The first two machines were brand new reasonably priced and powerful machines with a 7200 RPM hard drive.
Core 2 Quad 2.53 (350s) with SSD (270s)
Core 2 Quad 2.83 (280s) with SSD (230s)
This made me realize that the combination of CPU and Hard Drive made a difference, so I took this to the next level. I ordered an i7 960 and I already had 2 10,000 rpm raptors so I threw those into the mix as well.
i7 960 Raptor (180s) with Raptor RAID 0 (160s) with SSD (190s)
As you can see the raptor appeared to be beating my SSD drive and was really screaming in RAID 0. The strange thing though was that the OS didn’t feel as good with the Raptors as with the SSD even when they were in a RAID 0. The other thing that didn’t make sense was that the windows experience index on the drives didn’t seem to match the performance I was getting.
Raptor RAID 0 (5.9)
SSD (7.1)
That made me wonder if there was something going on when I used the onboard Intel ICH controller vs the standard IDE interface with the SSD drive, so I decided to turn on the RAID but use the SSD drive as a non-RAID disk. This yielded much better results.
i7 960 SSD using ICH controller (155s)
Much better. The windows experience nudged up a bit to 7.4 as well. It appears that the standard ide controller had a bottleneck that wasn’t allowing me to take full advantage of the SSD drive. I also tried two SSD drives in a RAID 0 and ended up with 150s and the windows experience index ticked up to 7.7, so not much of an improvement for the price.
The moral of the story is that the combination of CPU and Hard Drive are key to getting your compile times down, and the best part is that this modification costs less than $1500 from newegg.
Below I have listed the links to the hardware I used. Hopefully this post has been useful.
CPU - http://www.newegg.com/Product/Product.aspx?Item=N82E16819115216
CPU Cooler - http://www.newegg.com/Product/Product.aspx?Item=N82E16835103055
RAM - http://www.newegg.com/Product/Product.aspx?Item=N82E16820104132
Motherboard - http://www.newegg.com/Product/Product.aspx?Item=N82E16813131365
HD - http://www.newegg.com/Product/Product.aspx?Item=N82E16820227469
NOTE: I had a 550W power supply and for now this seems to work. It does run a little warm so it wouldn’t hurt to have a better one, but I wouldn’t recommend anything less than 550W.
NOTE2: The selection of SSD drive is very important. I chose the OCZ Vertex Turbo, because it had sustained writes of 100 MB/s as opposed to the normal drive at 70 MB/s. The Intel drive also rates at 70 MS/s, so be careful. The bigger drives are more expensive, but they seem to perform even better according to the specs so if you can get a bigger drive go for it. I would recommend going with one bigger drive as opposed to 2 smaller ones in a RAID 0, because I saw almost no improvement in RAID 0 with the SSDs.