Visual Studio often consumes all memory & 100% of disk for up to an hour

I’m working on a plugin using a very simple project based on the First Person template. In most cases building & running takes less than a minute. From time to time however (usually after computer restart or re-launching Visual Studio) Visual Studio will completely take over my system, using up all available memory and shooting disk usage to 100%. This can last for over an hour.

I’ve tried cleaning everything I can find, but it’s had no real impact. VS is largely frozen while this is happening and there are no logs I can find to suggest what it’s doing. If I wait long enough it eventually settles back in, but during this time I can’t make any progress.

Is this expected behaviour? Is there any way to diagnose what it’s doing or options people have used to mitigate this?

Again most of the time the building is very efficient and I can go back and forth from VS to Unreal without issue. This issue shows up somewhat randomly and unexpectedly.

My system has 32G RAM, RTX 3070 GPU, and an i9 processor.

Very strange behavior. Could some other process be competing for your drive at the same time?
Is your antivirus maybe doing a real-time scan of each newly compiled file through some sort of real-time protection? If so try excluding your project from the real-time scan path.

You can also run “Resource Manager” and go to the disk tab and see what process is using the disk during the 100%.

UE5 does list an SSD as a minimum requirement so if you have a spinning hard drive it could be the problem.

Definitely not expected behavior.

You have all SSD drives? Not any hybrid or disk drives? We have a few legacy machines with disk drives and Visual Studio and Unreal pretty sluggish on those. Though not as bad as you describe.

Yes it’s an SSD - if I’m guessing correctly I think this is just the system using the swap because it’s maxed out the RAM. So VS itself is not likely using the disk. I’ll try to verify in Resource Manager next time this happens though.

Ok it’s actually very reassuring to know this isn’t something we should just deal with. :grin:

1 Like

My bad, we’ve been testing Copilot. Uninstalling it has sped everything up dramatically.

1 Like