Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are all these background processes related to VS2015 and which can I disable?

My daily workload requires me to have Outlook, Excel, Firefox & IE (for different web apps that are not compatible with all browsers), Skype, and a few other programs running pretty much all the time. All of these programs are ruthless memory/thread hogs and some of them are 32-bit versions, which makes things worse.

Aside from that, I also use VS2015 a lot, which spawns background processes like there's no tomorrow.

Here are the processes currently listed in Task Manager that are VS2015-related:

  • conhost.exe - Several instances of this are always running. If I kill these, two will always come back, but they don't consume a lot of resources
  • devenv.exe - I know this is the main IDE process, but why does it idle at 700MB of RAM and 45 threads.
  • Microsoft.VsHub.Server.HttpHost.exe and Microsoft.VsHub.Server.HttpHost64.exe - No idea what these are doing and they take each average about 100MB RAM and a few dozen threads to idle. If I kill them, they come back.
  • msvsmon.exe - Based on its location its something to do with the debugger, but why is it running when I'm not in debug mode? If I kill it I get an error message and it comes back immediately.
  • VsHub.exe - Not really sure what it is, and not too resource intensive. If I kill it, it takes the two "Microsfot.VsHub..." process with it, but they all come back in a minute.
  • MSBuild.exe - I know this is the build engine. When I run a build, up to 4 of these processes start and they stay alive, idling with about 40MB of RAM a piece.
  • ScriptedSandbox64.exe - Not sure what this is, but it I kill it it stays dead until I run a build, then it keeps idling with 40MB of RAM.
  • VBCSCompiler.exe - I believe this is Roslyn. If I kill it it stays dead until I build, then it idles with about 100MB of RAM.

Questions

  • What are all these processes?
  • Can I avoid running any of these?
  • Which can I prevent from staying alive when they are not in use?
  • How?
like image 549
JamesFaix Avatar asked Jun 07 '16 21:06

JamesFaix


1 Answers

this post should answer all your questions...

What are all these processes?

  1. conhost.exe - according to howtogeek conhost.exe achieves the following:

The conhost.exe process fixes a fundamental problem in the way previous versions of Windows handled console windows, which broke drag & drop in Vista.

  1. devenv.exe - according to MSDN:

Devenv lets you set various options for the integrated development environment (IDE), and also build, debug, and deploy projects, from the command line. Use these switches to run the IDE from a script or a .bat file, for example, a nightly build script, or to start the IDE in a particular configuration.

as to why it uses a lot of memory? It is a large process as it allows

  1. The Microsoft.VsHub.Server.HttpHost.exe & Microsoft.VsHub.Server.HttpHost64.exe are similar to Devenv you can read about it in another stackoverflow post answer here.

  2. msvsmon.exe - you are correct, it is related to debugging, you can read about it on MSDN:

The Remote Debugging Monitor (msvsmon.exe) is a small application that Visual Studio connects to for remote debugging. During remote debugging, Visual Studio runs on one computer (the debugger host) and the Remote Debugging Monitor runs on the remote computer together with the applications that you are debugging.

  1. VsHub.exe is very much related to Microsoft.VsHub.Server.HttpHost.exe & Microsoft.VsHub.Server.HttpHost64.exe so I would again advice you to reference the post I mentioned before here.

  2. MSBuild.exe as you stated it is indeed the build engine, as for the multiple processes, depends on what you are compiling. Say if you are compiling a solution with multiple projects included within that solution you could see the memory problems you speak of. See this ticket here.

  3. ScriptedSandbox64.exe This is related to debugging performance tool which can be disabled see this forum post for more info. Also as the post states you can disable this by disabling the End Diagnostics Tool While Debugging checkbox under TOOLS->Options->Debugging.

  4. VBCSCompiler.exe - You are correct (about it being Roslyn), and there are reports of it using a lot of memory. See this bug report.

Can I avoid running any of these?

I would say no you probably can not prevent these from running. There is of course the exception of ScriptedSandbox64.exe however if you use the memory diagnostic tools then you can not even turn this process off. Keep in mind that each process has it purpose and if you take away one process it can cause other problems.

Which can I prevent from staying alive when they are not in use?

If you want you could just exit Visual Studio, it should not take very long to start back up. Visual Studio is a very large application and as you have discovered uses a lot of memory, therefore I would close it if you are not actively using it (as in you are on Skype and it is running in the background). Yes this is a hassle if you use it a lot but its better than using up all your memory.

How?

Close Visual Studio while you are not using it.

like image 164
Daniel Burkhart Avatar answered Sep 16 '22 17:09

Daniel Burkhart