Visual Studio 100% disk usage
Asked Answered
C

8

39

I have VS 2013 and Microsoft Windows 8.1 The issue appeared at the ending of last week. Without any updating or important changing, when I do somethings in VS, disk usage reaches 100%. For example, when I click on "Check In" button in the "Team Explorer" window, disk usage raises up to 100%. Sometimes by a simple right-click in text editor this problems happens. I googled about 100% disk usage problem but there are some things about this problem on windows 8.1 but on my computer, all applications are running without any problem, just VS2013 has a "full disk usage" problem.

Some information about my system:

OS Name: Microsoft Windows 8.1 Pro

OS Version: 6.3.9600 N/A Build 9600

System Type: x64-based PC

Processor(s): 1 Processor(s) Installed. Intel64 Family 6 Model 60 Stepping 3GenuineIntel ~3500 Mhz

Total Physical Memory: 8,131 MB

Available Physical Memory: 3,836 MB

Virtual Memory: Max Size: 10,947 MB

Virtual Memory: Available: 5,275 MB

Virtual Memory: In Use: 5,672 MB

Page File Location(s): C:\pagefile.sys

Counterpressure answered 25/1, 2015 at 6:6 Comment(24)
Did you manage to fix that @Merta? I'm having the same issue.Gourd
same problem here, with same OS, VS 2013 c++ community. I was developing an app and my laptop finally broke down because of disk usage at 100% all the time. Now i'm using a new laptop with the same setup and i'm beginning to experience the same disk usage.Rebato
I have been having this issue for a few years now, with other version of VS. Only thing I can see is that it is related to a very old legacy Web Site Application (not a Web Application, a Web Site with code)Cedeno
I didn't find any way to solve the problem, But after some days, the problem resolved automatically!!Counterpressure
Perhaps a rogue extension in VS? Try disabling them all, see if things go back to normalFeudist
Same issue here. same os and VS version.What Fix did you do @CounterpressureMetalepsis
@EduCielo as I mentioned above, I didn't find any way to solve the problem, But after some days, the problem resolved automatically!!Counterpressure
updates might resolved it. in my case i defragment my HD and the problem goes away..Metalepsis
I examined defragmentation but the problem didn't solved after defragmentation!!Counterpressure
For me it happens sometimes when i reach a breakpoint, but almost always the first time i reach one after opening VS 15Evergreen
Were you using any PCI device at that time?Clyte
My guess would be that you've created a TFVC local workspace with a very large scope. When that's the case Visual Studio will create a 'current workspace version' copy of all files in the workspace. These folders can become huge. Limiting the scope of the workspace or switching to a server workspace will fix that.Start
Since the problem solved automatically I can't test your approach @StartCounterpressure
People having this issue could try running Resource monitor (from Task manager) to see which files are being most read or written to.Guesswork
You might even try using an older version of visual studio. I use visual studio 2010, which works pretty well on my windows 8.1.Edelman
I have VS 2015!Counterpressure
I had the same thing. Was causing the keyboard to go realllly slow in VS2017 tracked it down to sqllite journaling in the .vs folder. I don't know what VS is doing, but it is terrible.Alanalana
Same issue here in 2019 with VS2017 and Win10. Going to try defragging my HDD tonight and see if that helps or not...Faucet
@Faucet tell us about your situationCounterpressure
I don't want to be spiteful, but you provided details about everything in your system, except your hard drive. That way we surely can't help you. However your problem may still be to case-specific to fix it without touching your PC. As you may note most people are able to use visual studio so that's not a general issue.Road
If this is happening on your machine, run FileMon to see what activity is taking place on disk. If you don't want to diagnose the problem yourself, use the Report a Problem feature in more modern versions of VS to submit an activity trace to Microsoft who will be able to diagnose the issue.Lawmaker
Since the problem solved automatically I can't test your approach @DrewNoakesCounterpressure
Seeing as this is a very active question, my comment applies equally to others who land on this page trying to diagnose the same issue on a different PC.Lawmaker
Ok you right @DrewNoakesCounterpressure
L
2

(Comment for others landing here as @Marta explains that the problem no longer persists on their machine.)

In general, any performance issue in Visual Studio should be reported to Microsoft. It's easy to do this directly from VS using the Report a Problem tool. That feature will automatically attach logs/traces which are shared privately with Microsoft. Internally, tooling will analyse those attachments to assign a ticket to the relevant team. With such attachments, there is a high likelihood that the problem can be diagnosed and fixed in a future release of Visual Studio.

Instructions on the Report a Problem tool:

https://learn.microsoft.com/en-us/visualstudio/ide/how-to-report-a-problem-with-visual-studio?view=vs-2019

If you prefer to diagnose high disk IO yourself, FileMon can be a useful tool:

https://learn.microsoft.com/en-us/sysinternals/downloads/filemon

Lawmaker answered 7/2, 2021 at 7:25 Comment(0)
F
1

I am using Visual Code 1.71.2 as well as Visual Studio 2022 (Community Edition) on Windows 10. I am also facing the same issue.

After lot of checking, found disabling superfetch mitigates this issue. But again, Windows, applications startup take lot of time.

As a workaround, I found that by clearing %temp% folder after using visual studio or code eliminates this issue and disk activity is normal.

But every time, I may not remember this cleanup and hate it for forgetting :(

Hope this helps someone in similar situation.

Fleda answered 27/9, 2022 at 1:47 Comment(0)
S
0

It could be related to Visual Studio updates - which would show under C:\ProgramData\Package Cache.

A disk space management tool like TreeSize Pro will help figure it out though ... it will show which directory is using the most space. You can then target what aspect of Visual Studio is eating up your drive space.

There is a free trial at https://www.jam-software.com/treesize/

You can also use this tool to export and post a screenshot / export of the usage here and it may help identify what is going on.

Sandisandidge answered 6/2, 2017 at 15:47 Comment(2)
My problem is NOT that all disk space is full, the problem another thing.Counterpressure
The problem is this: 100% potentiality of read/write used by VS.Counterpressure
L
0

I had a similar issue that turned out to be the built-in git provider having issues with large codebases containing a moderate-to-large amount of changes before a commit.

Changing to a third-party one fixed the issue.

Lacour answered 13/3, 2017 at 23:47 Comment(1)
I don't use git at all.Counterpressure
A
0

The operating system manages the resources (CPU cores, disk drives, GPU) to deliver what you have asked of it.

Ideally (what the OS designers are hoping for), when you perform an action, all the resources spin up into action and due to a well balanced system, they all go to 100% utilization, for a brief length of time, then go back to idle.

This form of utilization is, in practice impossible to achieve, as the PC builders would have to know what your system is going to be used for.

When the task manager describes the CPU as 100% utilized, it means that all the cores on the box, are busy running code, and are the bottleneck.

When the task manager describes the disk as 100% utilized, it (as far as I can tell), means that there is always a queue of items to be read, or written to/from the disk. Even with 100% utilization, it may be that the metric is the only reason you are concerned, and the system is otherwise responsive.

In either of these cases, it shows that for a given workload, the CPU or the disk drive has become the rate determining step.

In practice, it should not matter, unless the length of time the system is at 100% is longer than a few minutes, or that your machine feels otherwise sluggish.

Further diagnosis can be performed by using the tool Sys internals : procmon, or the Microsoft : ADK

I would look using the procmon, at what files are being accessed during the 100%disk usage period, and decide whether

  1. The behavior is sensible (if not raise a bug with Microsoft)
  2. The machine is working usably (if not consider a hybrid or ssd disk)
Astilbe answered 4/5, 2017 at 19:28 Comment(1)
I bought SSD disk so I can't collect diagnostic data. Would anyone do this?Counterpressure
B
0

I've had some exasperating problems with disk usage and source control explorer.

What fixed the issue for me was making sure that I never opened Source Control Explorer in more than one project at a time, keep it closed when I could and limit the amount of VS instances you have open.

Bleacher answered 4/5, 2017 at 19:41 Comment(1)
The problem occurs when only one instance of visual studio is open. Also when no Source Control Explorer is open.Counterpressure
A
-1

An SSD may can solve this... Are you sure this is caused by visual studio? when I was using Windows 8.1, the Windows Defender get to 100% disk usage from time to time. If you're sure it occurs when you use Visual Studio, you can try to repair it using the installer. Hope these would help you.

Araujo answered 26/1, 2017 at 5:20 Comment(3)
I don't want to bye SSD. I tried re-install windows and VS but unfortunately problems occurred again.Counterpressure
You can turn on the Task Manager to check if it's caused by Windows Defender. If so, you can try to change your anti-virus software.Araujo
I have no anti-virus at all :)Counterpressure
S
-5

Try moving the source code to SSD drive.

HDDs have much slower disk I/O performance compared to SSD drives. Generally in windows C drive comes as SSD drive.

Subversion answered 18/4, 2016 at 6:56 Comment(2)
I have no SSD drive.Counterpressure
Honestly for such case I have not found any general solution anywhere. You can try tweaking several configurations at OS, IDE and at application level. Task/Activity Manager is helpful here. For my non-SSD laptop I tried increasing virtual memory, no success. I reduced several accessories from visual studio like IntelliSense etc. For bigger projects, I unload unused project and keep only which I need. But later what I observed it was my anti-virus which consumed most disk. But I could not afford to switch off my anti-virus or any of its components. Best wishes :)Subversion

© 2022 - 2024 — McMap. All rights reserved.