Tip/Trick: Hard Drive Speed and Visual Studio Performance

People often ask me at conferences for PC hardware recommendations.  Specifically - "what type of machine do you recommend I get for doing development with Visual Studio?" and/or "your laptop seems really fast, what type is it?"

Some of my recommendations on this topic are fairly standard and obvious: Ideally you want to get a duel core or better CPU.  I also always recommend getting at least 2GB or more of RAM. 

The recommendation I make that often seems to take people a little by surprise is to make sure you always get the fastest possible hard-drive when buying a new machine - and where necessary trade off purchasing additional CPU processor speed in favor of investing in a faster disk instead.

Why does hard drive speed matter?

Multi-core CPUs on machines have gotten fast enough over the past few years that in most common application scenarios you don't usually end up blocking on available processor capacity in your machine.

What you are much more likely to block on is the Seek and I/O speed capacity with which your computer accesses your hard drive.  If you are using an application that needs to read/write a lot of files, it is not atypical for your CPU processor utilization to be really low - since the application might be spending most of its time just waiting for the disk operations to complete.

When you are doing development with Visual Studio you end up reading/writing a lot of files, and spend a large amount of time doing disk I/O activity.  Large projects and solutions might have hundreds (or thousands) of source files (including images, css, pages, user controls, etc).  When you open a project Visual Studio needs to read and parse all source files in it so as to provide intellisense.  When you are enlisted in source control and check out a file you are updating files and timestamps on disk.  When you do a compilation of a solution, Visual Studio will check for updated assemblies from multiple disk path locations, write out multiple new assemblies to disk when the compilation is done, as well as persist .pdb debugger symbol files on disk with them (all as separate file save operations).  When you attach a debugger to a process (the default behavior when you press F5 to run an application), Visual Studio then needs to search and load the debugger symbols of all assemblies and DLLs for the application so as to setup breakpoints.

If you have a slow hard-drive, Visual Studio will end up being blocked as it waits for it to complete these read/write operations - which can really slow down your overall development experience. 

Some laptop hard drive recommendations

The default hard drive speed for most PC laptops is typically 5400rpm - which is a pretty slow drive.  If you are getting a new laptop and plan to use Visual Studio on it, I highly recommend making sure you get a 7200rpm drive instead.  You will realize a significant performance benefit by doing this.

You might assume if you are buying a top of the line laptop that "of course" it won't have a slow drive.  Don't assume this!  Check out the default configuration of this high-end Thinkpad (which is the brand I use), or the default configuration of the high-end Dell XPS laptop (whose list price starts at $3,343), or the default configuration of the 17" Apple MacBook Pro laptop ($2,799).  Notice that by default all three of these premium laptop lines have 5400rpm drives.

For an additional $55 (Lenovo), $93 (Dell) or $200 (Apple) you can upgrade the hard drive to be a 7200rpm disk instead.  Putting this small amount of extra money in the faster disk can really make a big performance difference and is an absolutely worthwhile investment.

Some desktop machine hard drive recommendations

Two hard drive performance considerations to consider with desktop configurations:

1) Consider getting a 10,000rpm hard drive.  These are lightening fast and can make a big difference over the default 7,200rpm drives that typically come with desktops (Jeff Atwood has a good blog post recommending one of these). 

2) Consider buying a second physical hard drive and setup your operating system and OS virtual memory swap file to use one of the physical drives, and then store all your data (images, documents and Visual Studio projects) on the second physical drive.  The benefit of an approach like this is that your read/write data operations won't be competing for disk I/O activity with the operating system updating the virtual memory file.

Other Visual Studio Performance Recommendations

While on the topic of improving Visual Studio performance, you might want to also check out the blog posts and articles below for some good recommendations: 

One other performance gotcha I've heard about recently is an issue that a few people have reported running into with the Google Toolbar add-in.  For some reason this can sometimes cause long delays when attaching the Visual Studio debugger to the browser.  If you are seeing long delays with your web application loading, and have the Google Toolbar (or other toolbars) installed, you might want to try uninstalling them to see if that is the cause of the issue.

Hope this helps,

Scott

P.S. For more of my tip/trick posts, please check out my ASP.NET Tips, Tricks and Tutorials page.

Published Thursday, November 1, 2007 2:24 AM by ScottGu

Comments

# re: Tip/Trick: Hard Drive Speed and Visual Studio Performance

Thursday, November 1, 2007 5:41 AM by Klaus Even Enevoldsen

Hi Scott,

My desktop has two 15.000 rpm disks in a RAID 0 configuration. The performance is very good in VS2005 and even better in VS2008 Beta 2. One thing that improves performance with source control is a fast network (gigabit). Going from 100Mbit to Gigabit is a big difference.

When did you say that the final version of VS2008 will be available on MSDN subscribers download? :-) In days, weeks or months?

# re: Tip/Trick: Hard Drive Speed and Visual Studio Performance

Thursday, November 1, 2007 5:46 AM by Ariel

Desiring your MVC Framework post ;-)

# re: Tip/Trick: Hard Drive Speed and Visual Studio Performance

Thursday, November 1, 2007 6:19 AM by James

Can't agree more. I don't know what Dell are putting into their desktops these days, but my MacBook Pro with 2GB of memory, Core2Duo, outperforms my Dell desktop with 2GB of memory, Core2Duo.

# re: Tip/Trick: Hard Drive Speed and Visual Studio Performance

Thursday, November 1, 2007 6:20 AM by Anders Haahr

Do not forget to recommend ReadyBoost if you're running on Vista.

# re: Tip/Trick: Hard Drive Speed and Visual Studio Performance

Thursday, November 1, 2007 6:31 AM by Andy

Concerning your advice to get a second hard drive and using this to store visual studio projects etc, how should I connect it to the laptop? I would think that a USB2 external hard drive would be so much slower than the internal interface that it would outweigh any performance advantage from having less disk contention.

# re: Tip/Trick: Hard Drive Speed and Visual Studio Performance

Thursday, November 1, 2007 6:35 AM by Kris Kilowatt

I can confirm: upgrading my box with an Raptor disk running at 10000 rpm makes developping (and other things) a lot faster! A little bit more noise, but that's worth it. For webdevelopping, VS 2005 comes with a build-in "file system" server. But a "real localhost" is somewhat faster on my system (in the dialog box for a new site, choose "HTTP instead of "file system", but you must run IIS on your box). Further I noticed a perfomance gain when excluding the localhost from being scanned by antivirus software.

# re: Tip/Trick: Hard Drive Speed and Visual Studio Performance

Thursday, November 1, 2007 6:51 AM by Marsel Sayfullin

What are you thinking about RAID volumes?

I think it is faster (and sometimes cheaper) than buying one 10 000 rpm

I mean by now, when 10 000 rpm drives are only available from WD

# re: Tip/Trick: Hard Drive Speed and Visual Studio Performance

Thursday, November 1, 2007 6:56 AM by Marsel Sayfullin

And also about swap file.

With memory amounts above 2Gb you can make it smaller (let's say aprox. 500 Mb) and place it in additional virtual disk placed in memory.

This will really boost the system :)

# re: Tip/Trick: Hard Drive Speed and Visual Studio Performance

Thursday, November 1, 2007 7:33 AM by David Taylor

So true Scott.  I have found with many project that a large proportion of time is spent on disk IO operations to such an extent I end up doing things that are *very* CPU expensive to save on disk IO.

Funnily enough, I have sometimes got a real speed up by enabling Windows filesystem compression when reading and writing large text files.  Or rather than windows filesystem compression, I have also sometimes added a 'zip' layer such that all my temporary reads and writes during processing are done to a 'zipped' file rather reading/writing the raw uncompressed data.  In other words, sometimes it is worth a 10x hit in CPU performance to get a 2-3x increase in disk IO operations.

I made sure I purchased a 7200 RPM drive with the last laptop I purchased (Dell D620) for this reason.  In fact the D620 has a second drive bay (if I remove the 2nd battery), so I could even try your desktop trick of having VS projects on a separate drive on my laptop ;-)

PS: Your team is just about to say a whole lot about Parallel FX and PLINQ me thinks ;-)

Best wishes,

David

# re: Tip/Trick: Hard Drive Speed and Visual Studio Performance

Thursday, November 1, 2007 7:35 AM by Mehfuz Hossain

Nice post!, also i think using a 4GB readyboost drive with vista does give some performance boost, in addition to the hard drive speed :-).

# re: Tip/Trick: Hard Drive Speed and Visual Studio Performance

Thursday, November 1, 2007 7:38 AM by John Chapman

I can't agree enough with Scott's comments regarding the hard drive performance.  On my current project we used to be forced to deal with 15+ minute builds in Visual Studio.  We were using P3 2.8 Ghz machines with 1 GB of RAM and 7200 RPM hard drives.  We now have Core 2 Duos with 2 GB of RAM but most importantly 2 15,000 RPM SCSI drives.  We now can expect builds to be done closer to 2 minutes than 15.  Buying 15K drives is expensive, but it has worked out well for us.

# re: Tip/Trick: Hard Drive Speed and Visual Studio Performance

Thursday, November 1, 2007 7:49 AM by DaveZ

Scott, what about the O/S to go along with the hardware?  Do you recommend users using XP or Windows 2003?  I use XP now but I've started to do SharePoint development; and it appears that the WebPart templates are only for Windows 2003.  Any word about them being released for XP?  

Thanks for the great advice.

# re: Tip/Trick: Hard Drive Speed and Visual Studio Performance

Thursday, November 1, 2007 7:50 AM by Pavel Stary

I'm developing small ASP.NET applications (20forms or so) with VS2005, VS2008b2 and SQL2005 Developer on my relatively slow laptop (Core Duo T2300, 1.5GB RAM, 5400rpm hdd).

From time to time I'm running BOINC client to help with distributed scientific computing and I never noticed any slowndown, when CPU is 100% crunching. However it was a pain, when I had only 512MB RAM in the beginning.

I'm generally content with my setup, but I wonder if anyone tried SSD disk on development machine? Theoreticaly it should make wonders, as web benchmarks show 30x faster performance due to almost zero latency.

Which resolution would you recomend on (now standard) 15,4" display? This also infulences developer's productivity. High resolution vs. small letters?

# re: Tip/Trick: Hard Drive Speed and Visual Studio Performance

Thursday, November 1, 2007 8:02 AM by Sean Feldman

Thanks for the good tip(s). Are there any benchmarks results available to see the difference?

# re: Tip/Trick: Hard Drive Speed and Visual Studio Performance

Thursday, November 1, 2007 8:09 AM by Anders Ljusberg

Would keeping your workspace folders/Visual Studio projects etc on something like a USB-memory or CF card help performance? I think I have an old 2Gb CF memory I don't use anymore, maybe I should try.. Not sure about seek and I/O speed, but I guess it should be better than my 5200rpm drive..?

# re: Tip/Trick: Hard Drive Speed and Visual Studio Performance

Thursday, November 1, 2007 8:13 AM by Justin Etheredge

For work I bought a dell workstation and they now offer 15,000 RPM hard drives, since the workstations use SAS. It wasn't really expensive at all either. It only cost about 200 dollars more to get the 15k drive versus the 7200 rpm drive. Over all the machine was less than 2000 dollars and it has a Core 2 Duo and 4 gigs of RAM.

# re: Tip/Trick: Hard Drive Speed and Visual Studio Performance

Thursday, November 1, 2007 8:23 AM by jayson knight

I can attest to just how much faster a 10k RPM desktop drive really is. I have a ~500 class solution that I'm working on right now. VS loads up from a cold start in 20 seconds, and compile times are about 7-8 seconds. This same solution on my 5400 RPM laptop takes over a minute to load up, with 40 second compile times.

Do yourself a favor and invest in the fastest drive you can afford.

# re: Tip/Trick: Hard Drive Speed and Visual Studio Performance

Thursday, November 1, 2007 8:24 AM by Wyatt

Do you recommend using a flash drive to build your projects on?  Since the seektime on a flash drive is so fast it seems like a good idea to use one.  Would this make a difference instead of compiling on the same drive as the OS in your opinion.

# re: Tip/Trick: Hard Drive Speed and Visual Studio Performance

Thursday, November 1, 2007 8:32 AM by FransBouma

Scott, if HDD speed is so important, why hasn't the VS.NET team put in more efforts to streamline disk IO initiated from threads owned by the IDE?

I mean: if multiple threads in the IDE start an I/O session for a file or files, you can be sure the HDD heads will be stepping a lot, no matter how defragmented your drive is. If this kind of IO is streamlined (e.g. in a prioritized FIFO queue), the disk IO initiated from VS.NET would have been much more time-efficient, and therefore less a burden for hardware. A proper fast HDD would still be a recommendation, but it wouldn't be so significant.

What I'd like to see is that in VS.NET vNext, Microsoft will take this proper step and streamline the IO processes inside VS.NET in such a way that the HDDs will step way less than they're doing now. It might be this is never going to be implemented because the vs.net team will say "that's something windows should be optimize for us", but IMHO that's just trying to put the blame on some other team: windows can't optimize this properly because it then has to prioritize the I/O requests sequentially and it can't do that. The IDE on the other hand can, as all IO from the IDE is indirectly owned by the IDE and therefore owned by a single application. Because face it: the IDE might have a lot of threads running, it's not an application which can do much things started by the user in parallel (e.g. compiling, editing at the same time), which means that the user 's experience is that of a single application. Make the IO therefore also behave as the IO of a single application, which wouldn't make a difference, feature wise, for the user, but it will safe performance.

# re: Tip/Trick: Hard Drive Speed and Visual Studio Performance

Thursday, November 1, 2007 9:04 AM by Brendan

Yes, I've been telling people for years about the importance of the speed of their HDD. Most people seem to just think oh I need a faster CPU. For years Dell didn't even list hard drive speed on their web site. I consequently never bought from Dell. It is somewhat recent that that spec has even been listed. When I was buying my laptop two years ago an "expert" told me that laptops didn't come with 7200 RPM drives, and that was only in desktops. I bought one from someone else.

I am not sure how much of an extra boost you can get from them, but if you've got the money for it there are 15,000 RPM drives. They tend to be pretty expensive and don't have a lot of storage space, but I would bet they're nice and quick.

Far too many people assume that the defaults are good. Thanks for setting people straight on that one.

# re: Tip/Trick: Hard Drive Speed and Visual Studio Performance

Thursday, November 1, 2007 9:20 AM by Eric

There's also now the option of Solid State Drives on Serial ATA.  That's what my next laptop will have.  It's not a huge drive at 64GB, but I'm also having a 200GB SATA 7,200RPM drive on the machine.  That plus 4GB Dual Channel DDR2 SO-DIMM at 667MHz as well as an Intel Core 2 Duo Processor T7600 2.33GHz 4MB Cache 667MHz FSB, I'm hoping to see some improvement in speed.

# re: Tip/Trick: Hard Drive Speed and Visual Studio Performance

Thursday, November 1, 2007 9:34 AM by James McKee

How about commenting on new hybrid drives?

Where do they fall in this assessment?

# re: Tip/Trick: Hard Drive Speed and Visual Studio Performance

Thursday, November 1, 2007 9:37 AM by lonechicken

I guess this isn't really within the scope of just VS, but the whole 32-bit 4GB RAM (not even that much usable) limit is starting to kill me. At least at the home office. My options are either to have a separate "development only" computer to go 64-bit on, or go 64-bit on my one computer and hope that all the other non-work stuff and drivers work.

It doesn't seem like 3GB of usable RAM is enough these days for VS 2008, SQL Server, IIS, and a virtual machine running whatever else I'm testing.

# re: Tip/Trick: Hard Drive Speed and Visual Studio Performance

Thursday, November 1, 2007 10:08 AM by Bob Archer

Scott,

Two questions...

1. Will a Hybrid hard drive help? You know those ones that have a RAM disk built in? I think you need Vista to support this. Are there any 10k RPM hybrid drives out there?

2. What about video? I never get the enhanced video options when I buy a dev machine, cause I don't play games. But, I am thinking with all the windows, pop-ups, code rush that maybe that is a mistake.

Thanks,

BOb

# re: Tip/Trick: Hard Drive Speed and Visual Studio Performance

Thursday, November 1, 2007 10:38 AM by David James

Another tip might be to try turning on NTFS compression on the disks, or at least on the folders containing the files that VS will be using frequently. This can seem counter-intuitive, because we often think of filesystem compression as a space vs time trade-off, but really it's more like spending money on a faster hard drive instead of a faster CPU.

Compression can be particularly helpful with small files like source files or intermediate files used during compilation, because the compression on a small file can mean the difference between it taking one block on disk or two - for such files there's a 50% saving in IO.

I did some informal benchmarks on a continuous integration server for a large application I worked on (few million lines of C# code in tens of thousands of source files), and builds were 20% faster with NTFS compression on. So at least in that case, the difference was measurable (the build process took several minutes) and quite substantial.

NTFS compression is not compatible with everything though, for example SQL Server won't allow compressed database files. In those cases you can go in to the folder's properties and disable compression for that folder and its children only. Or, for a safer option, only turn it on for folders VS is using.

# re: Tip/Trick: Hard Drive Speed and Visual Studio Performance

Thursday, November 1, 2007 10:51 AM by Adam

I long ago realized this when I would compile a medium solution (10-15 projects of 2000-25000 LOC each) my HDD would churn and make a ton of noise. The only tool necessary to prove the HDD as a choke point was Task Manager. Just turn on the IO Read Bytes and IO Write Bytes and watch them jump as you compile. The aforementioned solution can easily get up into the billions of read bytes during a day of use.

# re: Tip/Trick: Hard Drive Speed and Visual Studio Performance

Thursday, November 1, 2007 10:52 AM by ScottGu

Hi Andy,

>>>>>> Concerning your advice to get a second hard drive and using this to store visual studio projects etc, how should I connect it to the laptop? I would think that a USB2 external hard drive would be so much slower than the internal interface that it would outweigh any performance advantage from having less disk contention.

In my post above I was recommending a second hard drive for desktop situations.  With laptops you typically don't have a way to plug in a super fast second drive - in which case I'm not really sure whether you'd see performance improvements wiht it there.  There might still be some advantages - but I unfortunately don't have experience with that particular approach to say for sure.

Hope this helps,

Scott

# re: Tip/Trick: Hard Drive Speed and Visual Studio Performance

Thursday, November 1, 2007 10:54 AM by ScottGu

Hi Marsel,

>>>>>> What are you thinking about RAID volumes?  I think it is faster (and sometimes cheaper) than buying one 10 000 rpm

I think certain RAID configurations should help.  I don't have specific experience in measuring them though - I'd be very interested in hearing other people's comments who have tried and found benefits.  What RAID options were you using?

Thanks,

Scott

# re: Tip/Trick: Hard Drive Speed and Visual Studio Performance

Thursday, November 1, 2007 10:57 AM by ScottGu

Hi DaveZ,

>>>>>>> Scott, what about the O/S to go along with the hardware?  Do you recommend users using XP or Windows 2003?  I use XP now but I've started to do SharePoint development; and it appears that the WebPart templates are only for Windows 2003.  Any word about them being released for XP?  

I'd generally recommend Windows Server 2003 over XP if you have enough RAM in your system.  I find it works a little faster, and it enables to use both IIS6 and SharePoint - neither of which is on a 32-bit XP installation.

I'm using Vista today, but will be upgrading my system to Windows Server 2008 shortly.

Hope this helps,

Scott

# re: Tip/Trick: Hard Drive Speed and Visual Studio Performance

Thursday, November 1, 2007 10:59 AM by ScottGu

Hi Pavel,

>>>>>> I'm generally content with my setup, but I wonder if anyone tried SSD disk on development machine? Theoreticaly it should make wonders, as web benchmarks show 30x faster performance due to almost zero latency.

SSD disks should in theory be a huge help.  The challange right now is that they are expensive (and tend to be smaller) - but the latency wins should make a huge difference.

>>>>>> Which resolution would you recomend on (now standard) 15,4" display? This also infulences developer's productivity. High resolution vs. small letters?

I typically recommend running at the highest resolution you can (I run at 1600x1200 on my laptop).  I then increase the VS font-size to compensate if the text is too small.  That way the menus and overall layout is still small, but the code is easy to read.

Hope this helps,

Scott

# re: Tip/Trick: Hard Drive Speed and Visual Studio Performance

Thursday, November 1, 2007 11:01 AM by ScottGu

Hi Sean,

>>>>>> Are there any benchmarks results available to see the difference?

Unfortunately I don't have any raw benchmark results.  I'd love to link to some if people have any other there.

Thanks,

Scott

# re: Tip/Trick: Hard Drive Speed and Visual Studio Performance

Thursday, November 1, 2007 11:04 AM by ScottGu

Hi Anders,

>>>>>>> Would keeping your workspace folders/Visual Studio projects etc on something like a USB-memory or CF card help performance? I think I have an old 2Gb CF memory I don't use anymore, maybe I should try.. Not sure about seek and I/O speed, but I guess it should be better than my 5200rpm drive..?

It might make some difference.  One thing to watch out for, though, is what type of USB key it is.  If it is an older USB interface format you might find the disk speeds slower than a harddrive.  Recent ones would probably be significantly faster if your machine supports UBS2.

Hope this helps,

Scott

# re: Tip/Trick: Hard Drive Speed and Visual Studio Performance

Thursday, November 1, 2007 11:12 AM by ScottGu

Hi Mark,

>>>>>> btw, the hotfix for VS 2005 debugging has been down for more than a week.

That is weird - it is working fine for me.  If you are still having problems, send me email and I can help get you access to it.

Thanks,

Scott

# re: Tip/Trick: Hard Drive Speed and Visual Studio Performance

Thursday, November 1, 2007 11:14 AM by Aaron Fischer

Trying to get two 10k rpm hard drives can be quite hard when you don't work for Microsoft.  So is 4+gigs of ram for that matter.

# re: Tip/Trick: Hard Drive Speed and Visual Studio Performance

Thursday, November 1, 2007 11:16 AM by ScottGu

Hi Bob,

>>>>>> 1. Will a Hybrid hard drive help? You know those ones that have a RAM disk built in? I think you need Vista to support this. Are there any 10k RPM hybrid drives out there?

That is a good question - I haven't ever tried one of those out.  I'd be interested if anyone has any experience using those to share.

>>>>>> 2. What about video? I never get the enhanced video options when I buy a dev machine, cause I don't play games. But, I am thinking with all the windows, pop-ups, code rush that maybe that is a mistake.

In general I'd recommend getting at least a decent card.  While this probably won't make a difference when doing standard text editing, it will make a difference once you start using/building WPF and Silverlight applications.  WPF application in particular by default use hardware based video acceleration - so will automatically get better if you have a faster card.

Hope this helps,

Scott

# re: Tip/Trick: Hard Drive Speed and Visual Studio Performance

Thursday, November 1, 2007 11:18 AM by ScottGu

Hi Rich, Steve, and Eric,

>>>>>>> Solid state drives are worth mentioning for any laptop configuration.  The high price of these drives will likely turn away most consumers, but the speed and power consumption benefits can't be overlooked.  Their storage space is limited, but external storage capacities keep rising as their prices fall.

Yes - solid state drives definitely seem like a great way to improve performance.  The issue I often have is that they tend to be small today (32GB or 64GB) - and on my laptop I need more.  But the trend is definitely going to be for these to get bigger - and where necessary we'll just use external USB hard drives for large storage and use SSD for core things.

I'd be very interested in hearing people's experience with SSD (especially with VS) if they've tried that.

Thanks,

Scott

# re: Tip/Trick: Hard Drive Speed and Visual Studio Performance

Thursday, November 1, 2007 11:24 AM by ScottGu

Hi Aaron,

>>>>>>> Trying to get two 10k rpm hard drives can be quite hard when you don't work for Microsoft. So is 4+gigs of ram for that matter.

It is actually hard (and not the default) to-do when you work for Microsoft too. <g>

I don't think you necessarily need duel 10k rpm drives for desktop machines - although that obviously would be ideal.  In my post above I was suggesting either a single 10krpm drive, or if you already have a 7200rpm drive consider getting a second 7200rpm drive (or have that one be a 10k one).  Often drives can be had for less than $200 now.  When you add up the developer productivity savings over the course of a year this is often a worthwhile investment.

My point at the beginning of my post "where necessary trade off purchasing additional CPU processor speed in favor of investing in a faster disk instead" was also meant to mean that if you have a fixed budget, consider lowering your CPU choice (or avoid paying an extra $200 for a faster one) and instead invest in spending more on the hard-drive.  What I too often see is that people use their budgets on the CPU and don't internalize how much the hard drive performance matters.

Hope this helps,

Scott

# re: Tip/Trick: Hard Drive Speed and Visual Studio Performance

Thursday, November 1, 2007 11:31 AM by Marsel Sayfullin

Hi, Scott!

I am using RAID capabilities of ICH8R from Intel.

It is faster than 10 000 rpm HDD from WD ;)

And anytime I can add third HDD (and fourth, and fifth :) ) and get further acceleration

# re: Tip/Trick: Hard Drive Speed and Visual Studio Performance

Thursday, November 1, 2007 12:13 PM by Mark Wisecarver

Thanks Scott...I went back and tried with Firefox and it worked.

I'm not having any other issues with IE7, maybe it's my XP Cardspace?

# re: Tip/Trick: Hard Drive Speed and Visual Studio Performance

Thursday, November 1, 2007 12:20 PM by Johan

2gb ram is usually enought, but if you run 1+ virtual pc then you might find 2gb ram to be quite low as a matter of fact. If you run sql tests you might also see sql eating up as much memory as it can that it has use for.

Harddrives are deffinately also an issue as has been pointed out, always asume the seller is trying to ripp you off and check expert reviews and forum to know what you actually should by and where ;)

# re: Tip/Trick: Hard Drive Speed and Visual Studio Performance

Thursday, November 1, 2007 12:27 PM by Mike Brown

I want to split my (Vista) partitions so that C:\Windows is on my first drive (actually a physical striped raid across two raptors) C:\Users is on my second drive,  and C:\Program Files and all the other folders are on a third drive.

How would I go about doing this?

# re: Tip/Trick: Hard Drive Speed and Visual Studio Performance

Thursday, November 1, 2007 12:31 PM by Klaus Graefensteiner

And of course what good is a blazing fast harddrive, if your virus scanner slows disk access down by a factor of 200 or more. My recommendation is to get a fast virus scanner e.g. from Nod32. Besides your CPU(s) will thank you too.

Klaus

# re: Tip/Trick: Hard Drive Speed and Visual Studio Performance

Thursday, November 1, 2007 1:05 PM by Pavel Stary

as for another hdd for laptop.

Some recent notebooks have an eSATA interface, which enables you to attach externel hdd, even fast desktop one, at full SATA speed. It is even hotplug, however, you have to carry it around then, which defeats purpose of ntb mobility a bit.

# re: Tip/Trick: Hard Drive Speed and Visual Studio Performance

Thursday, November 1, 2007 1:11 PM by Richard Ponton

In my experience, I've also found that you shouldn't let your hard drive get full when using VS.NET (and probably any compiler).  Normally, fragmented hard drives aren't that much of a problem on modern NTFS.  However, if you have a nearly full hard drive and you do a lot of compiling, your drive will quickly get heavily fragmented (and slow).

# re: Tip/Trick: Hard Drive Speed and Visual Studio Performance

Thursday, November 1, 2007 1:13 PM by Jacob

While it's funny to think of processors fighting each other, I'm sure you mean dual.

# re: Tip/Trick: Hard Drive Speed and Visual Studio Performance

Thursday, November 1, 2007 1:19 PM by Sahil Malik

Hey Scott -

I've been using a SSD for all my VMs now, and that seems to have made an immense difference.

SM

# re: Tip/Trick: Hard Drive Speed and Visual Studio Performance

Thursday, November 1, 2007 1:49 PM by Eber Irigoyen

very true, that's the bottleneck in today's hardware

# re: Tip/Trick: Hard Drive Speed and Visual Studio Performance

Thursday, November 1, 2007 3:15 PM by ScottGu

Hi Sahil,

>>>>> I've been using a SSD for all my VMs now, and that seems to have made an immense difference.

Are you using the SSD drives for your laptop or desktop machine?  Do you have a particular brand you recommend?

Thanks,

Scott

# re: Tip/Trick: Hard Drive Speed and Visual Studio Performance

Thursday, November 1, 2007 3:16 PM by ScottGu

Hi Yaip,

>>>>>> You recommended to have a second hard drive for DT. Do I also install VS on it or just the project files? Apart from VS, I have SS (and many other products). Do you recommend installing them on a separate HD than the OS or just the data? Also, do you find a situation where one encounters problems in installing products on different HDs other than C:? With registry, etc. being on C:

I'd probably recommend installing VS on the second drive (and not install it on the same drive as your OS).  

Hope this helps,

Scott

# re: Tip/Trick: Hard Drive Speed and Visual Studio Performance

Thursday, November 1, 2007 3:17 PM by ScottGu

Brennan posted a good follow-up to my post here that folks might want to also check out: brennan.offwhite.net/.../improving-visual-studio-performance-additional-tips

Hope this helps,

Scott

# re: Tip/Trick: Hard Drive Speed and Visual Studio Performance

Thursday, November 1, 2007 6:55 PM by Dave

I second Klaus on using NOD32 for virus scanning. You can't _NOT_ run a virus scanner, so getting a fast one that does a great job is the only sane option :-)

# re: Tip/Trick: Hard Drive Speed and Visual Studio Performance

Thursday, November 1, 2007 9:03 PM by Caleb

I always recommend this: good disk over RAM, I used 2 notebooks, XPS Dell 2.5 RAM 1.8 Ghz, but the disk its the difference 7200 rpm, good machine.  Recently I'm using MacBook Pro with 2.2 Gzh 3 RAM and 5400 rpm, but I have like 60% better performance over the Dell XPS, I highly recommend MacBook Pro, good machine, and sometimes I boot on Mac OS, good OS.

For the OS I use Vista for both machines, and when I need to program like Sharepoint, CRM I use VMs over external drives and I get good performance (iOmega 7200 rpm).

Sometimes it's good to know what kind of boxes people like Scott uses, thanks Scott for sharing.

# re: Tip/Trick: Hard Drive Speed and Visual Studio Performance

Friday, November 2, 2007 10:19 AM by Mark

Another thing you can use is a Virtual Hard Drive (virtual disk in the RAM memory), I can now compile twice as fast than running on a RAID 0 - 7200RPM configuration.

Ofcoarse you need to back your data etc, because it is gone when your system crashes..

# re: Tip/Trick: Hard Drive Speed and Visual Studio Performance

Friday, November 2, 2007 11:20 AM by Christopher Grow

Drive performance is an obvious performance issue with ANY compiler and development environment.  I run an Intel 6600 CPU with a Raid 10 array on a promise TX4310 controller card.  My disk array benchmarks out at 118.5 MB/s from HD Tach version 3.0.1.0.  Additionally, I have 4GB of ram and 4 monitors.  I compile a Visual Studio solution with 75 projects which are made up of C# and managed C++.  One thing we have experimented with is compiling directly from RAM.  This seems to be a mixed bag because it reduces the total available memory for Cache.  As a result, one of the things we do is create small 4GB partitions for compiling, which contain only code.  This forces the cache to focus on code because that drive has only code.  When I compile our product, I rarely hear the disks working because most IO operations are cache based.  Please note: my solution is roughly 1Gb before compiling and 2.5GB when complete.  Because we have used RAM to avoid the disk bottle neck, multi core CPUs can now be leveraged.  When we were using AMD Athalon X2 CPUs we could set Visual Studio to compile 3 simultaneous projects.  With the new Intel 6600 CPU's we get some speed improvement by running 4 simultaneous compiles.  Look under Tools->Options->Projects and Solutions->Build and Run there you will find a setting called maximum number of parallel project builds.  You should experiment with this number!  Keep making it bigger until your builds slow down.  The moral of the story is disk speed is important but lots of memory is even better.  Ohh, if it matter my 75 solutions and 1.5 GB of compiler output (EXE’s Assemblies and debug) completes in roughly 2 minutes.

# re: Tip/Trick: Hard Drive Speed and Visual Studio Performance

Friday, November 2, 2007 11:32 AM by Christopher Grow

Virus Scanners...

Always disable them on the folder with you're code!..

They only slow things down and do abosultely no good unless your writting a virus and want to catch yourself.

Most virus scanner can be configured to ignore folders.  Simply add your code folder this this ignore path and enjoy the speedup.

Christopher

# re: Tip/Trick: Hard Drive Speed and Visual Studio Performance

Friday, November 2, 2007 11:46 AM by Chris

Scott -

Do you (or Microsoft) have any best practice or recommendation for living with a virus scanner?

Our current corp. policy doesn't allow any exclusions, which makes things a bit slow.  Couple that with standard laptops which come with 5400 RPM drives, and it can take a couple minutes to build/start a project.

# re: Tip/Trick: Hard Drive Speed and Visual Studio Performance

Friday, November 2, 2007 2:01 PM by Jozef Sevcik

>>I'm using Vista today, but will be upgrading my system to Windows Server 2008 >>shortly.

Hi Scott,

a little offtoopic question,

as you mentioned, you're planning to use Windows Server 2k8 over Vista.

I'm using Vista x64 for development now, what are the benefits of

Windows Server over Vista ? What has changed and improved in new Server ?

Thanks for your answer.

# re: Tip/Trick: Hard Drive Speed and Visual Studio Performance

Friday, November 2, 2007 4:23 PM by Chad Myers

Scott, other IDE's and tools seem to have no problem on slower machines processing the same (or more) number of files.

In my experience, VS.NET has horrible handling of its own files (CSPROJ, SLN, CSPROJ.USER, and *ESPECIALLY* VDPROJ [Setup] files).  VS.NET seems to handle C#, VB.NET, etc files pretty well (probably because it's not -- the C# and VB compilers are doing it!)

Fire up a FileMon and watch the horrible I/O requests when you click 'Save All' on a rather large Solution or even a single project.

Once VS.NEt is up and running on my slower machine, it runs great, compiles fast... it's the initial load and when I'm saving the CSPROJ/SLN files that it kills my machine.

# re: Tip/Trick: Hard Drive Speed and Visual Studio Performance

Saturday, November 3, 2007 2:43 AM by Abdullah BaMusa

Hi Scott

thank you for every thing you do in this blog, it is really nice of you to give us some of your Busy time.

Maybe I miss somthing here! I get new HD 10000 rpm besid the old 7200 rpm and istall only OS on HD 10000 rpm and install Visual Studio and other programs on the second HD, is this the idea. thank you

# re: Tip/Trick: Hard Drive Speed and Visual Studio Performance

Saturday, November 3, 2007 5:57 PM by Krischan

One should mention that a faster drive nearly always is louder and draws more power/gets warmer. Both facts rarely agree with every notebook.

# re: Tip/Trick: Hard Drive Speed and Visual Studio Performance

Monday, November 5, 2007 2:45 AM by Richard P

RE: 10,000 RPM hard drives

Don't assume 10,000 RPM hard drives are faster than 7200 RPM hard drives.  If they're a generation behind, they won't be faster, just noisier and more power hungry.  For example, I think the 750GB 7200 RPM drives with 16MB caches are faster than the 10K RPM drives that are currently available.  The 10K line doesn't get refreshed as often.

# re: Tip/Trick: Hard Drive Speed and Visual Studio Performance

Monday, November 5, 2007 4:25 AM by Johan

Abdullah BaMusa, if you will be using 2 harddrives, I would recomend that you use raid on them (not sure if you can use raid on harddrives with different size/speed thou). You see the problem is that usually harddrives has 33-66mb/s in transfer speed, depending on if the harddrive reads/writes on the edge of the harddrives or in the center, thus very much lower then what ide(100mb/s)/sata(sata 1 = 150mb/s, sata 2 = 300mb/s, I seam to recall)  allows the harddrivs to use. Setting it up with raid 0, that is 0 security if one harddrive dies, but that will however give you a much nicer performence since then you can perhaps not double the speed but it gets seriusly higher and that's what I use on my computer.

# re: Tip/Trick: Hard Drive Speed and Visual Studio Performance

Monday, November 5, 2007 4:12 PM by John McMillion

I think one of the reasons getting rid of some toolbars helps, is some of them had little banner ads, and it seemed like the browser had to wait and complete those http requests before you could load localhost.

# re: Tip/Trick: Hard Drive Speed and Visual Studio Performance

Monday, November 5, 2007 6:24 PM by patbob

I've only clocked a few notebook drives, both 5400 RPM & 7200 RPM, but the fastest ones typically topped out at around 20-22MB/sec sustained.  Look for one that does better than that (the 10kRPM ones should).  USB 2.0 is only slightly faster than that, so you'll want a connect faster than USB 2.0 if you choose the external drive route.  If decide on 1394b, and are using XP SP2, make sure you get the hotfix from MS that allows those devices to actually get 800Mbps.  I've clocked a 3.5" desktop drive at ~40MB/sec sustained (read or write only, not both), but it dropped to only ~4MB/sec when doing interleaved reads and writes.  Skipping IDE altogether might be a win since its kind of a slowish interface to begin with, but I've not tried that yet.

Precompiled header files more than a few MB in size are a performance loser -- its faster to reread and reparse the header files than use a PCH.

May not matter with VS 2005 or later anymore, but older versions used to write a lot of temporary files onto the temp directory on the disk.  Relocating that to a RAM disk would have been a significant win.  I haven't checked if modern versions of the compiler still do this.

Hope that helps someone.

# re: Tip/Trick: Hard Drive Speed and Visual Studio Performance

Tuesday, November 6, 2007 5:21 AM by Howard

The drives are indeed important but don't forget the controller as well! Your motherboard SATA connectors might seem ok when you run a single drive but when you start doing RAID configurations.

I use an Areca 1120 controller which can do various RAID setups, including Raid 6. With four 74Gb raptors attached I get good performance AND fault tolerance.. two of those drives can die at the same time and it still works.

# re: Tip/Trick: Hard Drive Speed and Visual Studio Performance

Wednesday, November 7, 2007 3:10 PM by Alexei Govorine

There are some additional settings under Hardware Device Manager that may improve HDD performance in Windows by enabling 'advance performance option'.  You can get to the setting by going to: Device Manager, expanding Disk Drives, selecting properties of one of the listed HDD, click on Policies and select 'Optimize for Performance'.  For IDE and SATA drives you may find additional checkboxes: 'Enable write caching on the disk' and 'Enable advanced performance'.

# re: Tip/Trick: Hard Drive Speed and Visual Studio Performance

Monday, November 12, 2007 8:32 AM by Russell Kurtis

Oooh yeah 2008 as your OS instead of Vista, that is some good advice!  Running W2003 here and it feels way smoother than vista for a development platform.

# re: Tip/Trick: Hard Drive Speed and Visual Studio Performance

Monday, November 12, 2007 4:34 PM by James

This is unacceptable, 12 days since your last post?

# re: Tip/Trick: Hard Drive Speed and Visual Studio Performance

Tuesday, November 20, 2007 12:45 AM by PK

Scott, quick question mate. If i make a ramdisk and throw my projects/solutions in there ... are there any other settings i can set in VS2005 or VS2008 to say 'use the RAM DISK' for stuff. Alternatively, are there any other parts of VS2005 or VS2008 i could copy/move over, to the RAM DISK to help performance?

thanks kindly :)

-PK-

# re: Tip/Trick: Hard Drive Speed and Visual Studio Performance

Monday, December 17, 2007 3:11 PM by Paulo

Set affinity to only one processor , this will increase the vs2005/vs2008 performance.

go to task manager right click desenv.exe task ande set affinity

# re: Tip/Trick: Hard Drive Speed and Visual Studio Performance

Monday, December 17, 2007 9:49 PM by Manmit

Hi Scott,

Quick Question: When closing down my VS2005 IDE, it takes about 2-5 mins to close down depending on how many other windows I have open. Any idea what would be causing the delay and is there I can do to speed up the closing of the IDE?

Thanks again for all that you and your team do.