Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I will be upgrading my system to use 16GB of DDR3 RAM in a Windows 7 64 bit and Visual Studio 2010 Ultimate. CPU will be 6 cores 3.2Ghz. I do lots of compiles/day and my goal for VS is to show a web page within seconds after making a change in the code behind.

I noticed Visual Studio does a lot of I/O operations (from HD led) with the drive during its work. I would like to put everything VS needs in memory including the temporary folders, system files, my code, .. whatever. I just want VS to be blazing fast. My primary drive is an SSD, which is fast, and I even want VS to not use it. RAM is super fast compared with anything else.

I know VS 2010 is still 32bit so it will use max of 4GB however all the other opened apps (browser, Outlook, File Explorer..etc) can use whatever remains from the 12GB and let VS roam freely in its dedicated 4GB memory space.

My question: What settings and tweaks can I perform to Windows 7 and VS 2010 so that VS 2010 dedicates and uses as much memory as it can and block that away and so that it uses the hard drive as little as possible? Is Windows 7 64 & VS already optimized for that and not much else can be done. Would a RAM disk help? Think of this as if I am trying to eliminate the drive.

I am aware of higher probably of data loss with power loss but that's not a concern right now. Assume no external dependencies are present (database, network speed ...) which might slow VS. Disk defragmentation doesn't help much.

share|improve this question

migrated from Jun 23 '10 at 5:22

This question came from our site for professional and enthusiast programmers.

As this relates more to how to set up RAM disks and executable memory usage than to programming, voting to move to superuser. – jball Jun 22 '10 at 19:19
@jball I disagree, its related to programming enough to warrent sticking around, IMHO, since many VS devs could benifit from such a configuration. – Nate Bross Jun 22 '10 at 19:22
I put the question here because I need people who know how Visual Studio works intimately. If it's in serverfault only, I will probably get generic optimization tips about Windows (still good tips). I don't mind putting it in both sites however. – Tony_Henrich Jun 22 '10 at 19:28
I have a related question in serverfault.… – Tony_Henrich Jun 22 '10 at 19:33… – jball Jun 22 '10 at 19:36

You already got what you are asking for. With that much RAM, you'll have a really big file system cache. Visible from Taskmgr.exe, Performance tab, Cached. Any disk writes that Visual Studio performs will completely instantaneously as data gets written to RAM. The cache manager will then lazily write it to disk, making your drive access light blink in the process of course.

Similarly, disk reads will speed up. It still has to come off the disk but it will read an entire track instead of just the file sector that Visual Studio asks for. Making it very likely that the next read will come out of RAM instead of having to be retrieved from the disk.

This works so well (and is secure) that RAM disks are no longer used.

share|improve this answer
I have also seen VS making the disk write and I have 6 GB that isn't full. I think VS may be using the flags that force data to disk storage. It must think the output files are valuable stuff! – Zan Lynx Jun 22 '10 at 20:18
Hmm, what kind of project generates 6 gigabytes of executable code? – Hans Passant Jun 22 '10 at 20:22
@Hans: To rephrase. My system has 6 GB of RAM that is not entirely used up and should be available as disk write cache for the 100 MB of output files being generated by the project build. – Zan Lynx Jun 5 '11 at 7:40
@zan - use SysInternals' ProcMon to find out what the disk is doing. – Hans Passant Jun 5 '11 at 14:05

It sounds like you need to first create a RAM disk. Not sure of tools to do this in Windows 7; maybe someone else will have an idea. But this should handle all the tweaking necessary on the Windows side, as far as the disk goes. The only thing I would add is setting your temporary directory onto the RAM disk. This is stored in environment variables as TMP and TEMP. It is also usually in both system and user variables; be sure to change both.

Within Visual Studio, you then need to make sure that everything you can set as path options in Visual Studio points to the RAM disk. This includes the project input and output directories, and any temporary directories it might need, though theoretically these should all be keyed off of the TMP/TEMP environment variables.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .