Using a RAM drive to compile Visual Studio .NET projects

Posted in .NET 2.0 | Performance | Productivity | Visual Studio 2005 | RAM disk at Saturday, December 15, 2007 10:18 AM UTC
(updated 22 dec 07)

After reading some blog posts like this I decide to test on my computers how important is hard disk speed in order to increase your productivity when compiling Visual Studio solutions with more than a few project.

I also wanted to see the gain if I placed my solution (more than 25 projects) in a RAM drive disk instead of the hard disk (be sure you backup frecuently if you do that, or get one of this things to avoid data lost).

In order to create a RAM drive, I download the trial version of Virtual Hard Drive Pro
 from FarStone.

There are the results:

1. Environment hardware information

My desktop:
  1. CPU: AMD Sempron, 1800 MHz
  2. RAM: 2 x (1 Gb Kingston)
  3. Hard disks (2):
    1. System: ATA-100 40 Gb Barracuda 7200 rpm. Average seek: 8.5 ms. Buffer size: 2Mb. Average read speed: 40 Mb/second (*).
    2. Data and code: SATA 200 Gb Barracuda 7200 rpm. Average seek: 8.5 ms. Buffer size: 8 Mb. Average read speed: 50 Mb/second (*).
  4. RAM drive speed (read): 900 Mb/sec
My laptop (Toshiba Satellite Pro M70):
  1. CPU: Intel Pentium Celeron 1.73 Ghz
  2. RAM: 2 x (512 Mb Toshiba)
  3. Hard disk (1) : Toshiba 5400 rpm. Average read speed: 30 Mb/second (*)
  4. RAM drive speed (read): 1500 Mb/sec
* (Hard disk speed tests have been done with HD_Speed from www.steelbytes.com)

2. The Microsoft Visual Studio solution

A Microsoft Visual Studio .NET 2005 solution with 26 projects (Windows Forms and Windows library projects mainly), in C#.

3. Results

Compilation:

Desktop machine:

a) Compilation on hard disk (no RAM Drive installed yet): 72 seconds*
b) Compilation on a 500 MB RAM Drive : 71 seconds*

Laptop machine:

a) Compilation on hard disk (no RAM Drive installed yet): 65 seconds*
b) Compilation on a 400 MB RAM Drive : 32 seconds*

*(average of three compilations)

4. Conclusions:

Seems like my desktop doesn't have much processor power, and the bottleneck is mainly on the CPU, since there is not much different results on readig from a 50 Mb/seconds hard disk or from a 900 MB/second one (the RAM Drive)

My laptop, instead has a slower disk drive but more processor power, so there is a lot of difference between compiling from hard disk and RAM drive. (it took half the time on the RAM disk - also RAM disk read speed is higher than in the desktop)

I still will do more tests with some other combinations of CPU and hard disk..

Feel free to do the above tests yourself and share the results.

Updated:
  • 22 dic 07: Added test with laptop. Desktop tests done again.

kick it on DotNetKicks.com AddThis Social Bookmark Button

Tuesday, April 15, 2008 6:07:40 AM UTC
I've got a much larger C++ project, which takes about an hour to compile on a typical dual core machine and SATA drives. I tried a 4.7GB RAM drive under 64-bit Vista, and so far I'm not impressed. The entire source code is about 2GB, and expands to about 4.3GB when built (object files, .libs, etc). I'm new to 64-bit and Vista, so I don't know if it's a configuration problem on my end. I'm trying both SuperSpeed Ram Drive and QSoft RamDrive. During the build, there still seems to be a lot of hard drive activity. I wish I could lock my C: drive during the build, to prevent Vista from doing anything else during the compile. I assume Visual Studio is creaing bunches of "scratch files" as it goes through the stages of compilation.
Any suggestions here?
voidstar
Tuesday, April 15, 2008 7:33:55 AM UTC
I would try to buy the largest ammount of RAM your machine can support (I am sure you already thought about this) and a "really" fast hard disk (10k rpm with low latency, like the Raptor WD1500AHFD). I would also try to disable the SO SWAP file (you can do that if you have enough RAM).

You can also go for a Intel Quad CPU. Visual Studio 2008 has improved a lot build times when usin a multi-core CPU.

Hope it helps, let me know how it went!

ivan
Name
E-mail
(will show your gravatar icon)
Home page

Comment (Some html is allowed: a@href@title, b, em, i, strike, strong) where the @ means "attribute." For example, you can use <a href="" title=""> or <blockquote cite="Scott">.  

Enter the code shown (prevents robots):

Live Comment Preview

On this page...

Tags

Calendar

<December 2007>
SunMonTueWedThuFriSat
2526272829301
2345678
9101112131415
16171819202122
23242526272829
303112345

Navigation

Archives

Recommended .NET blogs

The author

Iván Loire
Iván Loire (Zaragoza, Spain)

View Ivan Loire's profile on LinkedIn
Microsoft Certified Trainer
Send mail to the author(s) E-mail

Syndication

Feed Icon