139

Starting Visual Studio 2015 also launches two other executables:

VsHub.exe

and

Microsoft.VsHub.Server.HttpHost.exe

Both of these take a considerable space in the task manager.

How can I delete this "Visual Studio Hub" option? I don't use any of Visual Studio 'top-notch' features, including the Visual Studio Hub one.

12
  • 15
    Well I really don't use Visual Studio for something other than code editing. I use Unity and compiling is done by the built-in compiler, so all I want to see in VS is a fancy text-editor. Also, I don't want to use VS Code since it lacks auto-completion for Unity and you can't make your own custom themes. Commented Jul 17, 2015 at 16:47
  • 2
    @RedaLahdili What did you end up doing? Both files are running even when I'm not running VS2015.
    – prettyvoid
    Commented Aug 9, 2015 at 15:33
  • 2
    Your case seems worse than mine! I unfortunately haven't found any solution. They really need to do something about this. Sometimes VSHub takes more memory than VS itself. uggh... Keep us updated guys if you find any solution. Commented Aug 10, 2015 at 17:46
  • 1
    Another solution is: stackoverflow.com/questions/31904929/…
    – oguzh4n
    Commented Dec 25, 2015 at 12:14
  • 1
    Microsoft.VsHub.Server.HttpHostx64.exe has a memory leak that causes my windows 10 to shut down. See: connect.microsoft.com/VisualStudio/feedback/details/1610160/… Commented Jan 20, 2016 at 17:37

10 Answers 10

131

I thought I’d try to shed some light on the VS Hub and what it’s intended for. I work for Microsoft.

As sraboy mentions, the VS Hub is an out-of-proc services host that Visual Studio (and other VS shell-based products such as Blend) use in order to support multi-tool communication, better responsiveness within devenv (VS), and enable certain services to extend past the lifetime of the spawning process. The set of services currently hosted in the VS Hub includes many of the items called out in the other answers, such as roaming settings, processing of large swaths of ETL data that is rendered in the diagnostics tooling, some telemetry reporting, and extension auto update and notifications. That set of services is very likely to grow in the future though, so even if none of those services seem necessary at the moment, additional services will be hosted there in the future (i.e. it’s a pretty big hammer to disable the vshub.exe through the renaming recommendation :-).

In terms of lifetime, the vshub and host processes (i.e. Microsoft.VsHub.Server.HttpHost(64).exe) can stay running after devenv.exe closes. However, they should not keep running indefinitely. In most cases these processes will terminate within ~5 minutes of the last instance of a VS-based shell closing. So if you have an instance of VS running (devenv.exe) and an instance of Blend running (blend.exe), and you shut down devenv.exe, vshub and the associated host processes will keep running. If you then shut down blend.exe, vshub and the associated host process will still be running. After about 5 minutes from then, however, those additional processes will shut down. If you start another instance of devenv.exe within that 5 minute window, then vshub and the associated host processes will not terminate, and will keep running (basically the host processes terminate whenever they don’t receive any requests within 5 minutes, and after all of the host processes terminate, the vshub.exe process itself terminates).

Resource-wise, the vshub.exe process itself should always be relatively lithe. If it ever gets large, then that’s a bug and I’d love to know about it so we can fix it :-) The host processes, on the other hand, may get very large depending on the service that is being hosted. In particular, the diagnostics tooling works by processing ETL. ETL can be very, very, large, and as such, the host may use a lot of resources. The diagnostics team is looking at ways to reduce that, but for the moment, closing the diagnostics tool window when you don’t need it should help mitigate the problem.

In terms of online connectivity, there are three main sources in the current set of hosted services at the moment (note, this will change over time). First, as user3345048 mentions, the service that detects and auto-updates extensions runs in that process. The options that control that communication are in Tools | Options | Environment | Extensions and Updates (see the first two checkboxes). Second, roaming settings runs as a service in the VS Hub. The setting that controls this behavior is in Tools | Options | Environment | Synchronized settings (or more holistically, if you do not sign into the personalization account in the upper right hand corner of VS). Finally, the VS Hub does report telemetry. The volume of this data can be significantly reduced via the Help | Customer Feedback Options | Settings… menu item. You can also read about the kind of telemetry that Microsoft collects and how it’s used in that location.

34
  • 40
    Anson - I have Visual Studio 2015 with the RTM release 1 on Windows 7. If I open up Fiddler4, I see hundreds or more calls a second to localhost/vshub/sameGuidHereOverAndOver. This is completely unacceptable - I don't know what vshost.exe thinks it is doing, but it is completely gone nuts. I can kill the process and it still happens. May have to go back to 2013...
    – Mario
    Commented Oct 16, 2015 at 15:41
  • 4
    @Mario - as you've seen vshub often acts as a local http server, so it's expected you would see some traffic whenever it's running (http is acting as the IPC). 100s of requests per second for any sustained period of time is definitely a bug. You could check logs in %temp%\VsHub which should indicate if there are any exceptions being thrown, and obviously you've already figured out how to inspect the traffic. The best thing to do would be to report this as an issue through connect.microsoft.com since it'll give us a channel to collect the logs and such and try to make sure it gets fixed Commented Oct 18, 2015 at 6:26
  • 28
    Here is Microsoft.VsHub.Server.HttpHost64.exe being "lithe" on my machine - imgur.com/DKvSNqf - that's 1GB of RAM it peaked out at. Nice.
    – sh1rts
    Commented Nov 1, 2015 at 23:04
  • 7
    @sh1rts - I understand your frustration. The "lithe" comment I made above was targeted at vshub.exe. Microsoft.VsHub.Server.HttpHost64.exe is the host process that runs various services, including some that can be very memory intensive (e.g. the diagnostic tooling that starts when you use F5, or if you explicitly choose to do memory or ui responsiveness analysis). You can try some of the toggles I mention above to disable some of those services to see if that helps - but generally we'll be working to reduce the overall memory overhead in future versions. Commented Nov 4, 2015 at 2:51
  • 17
    So what is the way to stop seeing hundreds of /vshub/GUID requests in Fiddler. This is making it impossible to debug any HTTP client in Visual Studio, because for every step while debugging I see 10+ requests in fiddler and the request I'm interested in is lost :-(. Besides it's seriously inefficient way of inter-process communication to make HTTP requests on localhost.
    – Đonny
    Commented Jan 8, 2016 at 15:18
81

Something no one's mentioned above...

According to my firewall log, VsHub.exe, Microsoft.VsHub.Server.HttpHost.exe, and Microsoft.VsHub.Server.HttpHostx64.exe all try to communicate online.

Addresses I saw to which there were outgoing connection attempts included 191.236.194.164 (Microsoft Azure, Wichita Kansas) and 23.102.160.172 (Microsoft Azure, Redmond Washington).

I realize "modern" software is supposed to be cloud-integrated, but...

As one who does not require anything from Microsoft Azure servers, and who is legitimately concerned with privacy and not leaking any part of what I'm working on to the outside world, I'd really like A) to have a way to choose not to run these programs, or B) be provided with settings to limit their chattiness online. Yes, the firewall blocks the connections, but that's a last resort.

Just a simple checkbox, "[ ] Contact Microsoft Azure Servers" would be nice. Whether that would mean not running the programs in question or just having them not make the online connections isn't of consequence to me. I guess from a resource perspective the former would be better as it would use fewer resources.

As a rule I wouldn't propose to change the files in an installed application's suite of files, but as I have a virtual machine environment within which I can test changes to Visual Studio 2015 without much consequence (snapshots are wonderful), I tried altering the permissions (to remove inheritance then disallow Read and Execute for Users) on these three files.

Voila, no more VsHub applications running, trying to contact remote systems.

Visual Studio comes right up. I'm not seeing a downside here.

-Noel

5
  • Downside: You yourself cannot modify these files any more.
    – harrymc
    Commented Apr 5, 2016 at 9:19
  • Not sure what you mean, harrymc. Can you please be more specific? Are you speaking of problems accessing the permissions? As an administrator you are still master over every file on your computer, though Microsoft throws monkey wrenches in the way sometimes. But if you understand how permissions works you can do anything you want. The files are on YOUR computer after all. If you mean that you've removed your own permissions, I worded it badly. I meant that I REMOVED permissions, not added a Deny setting. I should have used the word "Disallow".
    – NoelC
    Commented Apr 6, 2016 at 20:41
  • Once deny is set, to re-access the permissions one has to first set himself as owner of the files.
    – harrymc
    Commented Apr 7, 2016 at 5:15
  • Right. DO NOT check a box in the "Deny" column. Rather, UNCHECK "Read & execute" under the Allow column.
    – NoelC
    Commented Jun 4, 2016 at 16:18
  • 2
    Based on my post-Update 3 experience, just changing the permissions on vshub.exe to remove execute access appears to be enough.
    – NoelC
    Commented Jul 14, 2016 at 16:39
62

I am using Windows 7 x64 with Visual Studio Express 2015. I have terminated annoying processes with Task Manager. Then I have deleted the C:\Program Files (x86)\Common Files\microsoft shared\VsHub folder. This operation solves the problem, but requires administrator rights.

11
  • 38
    Upvote from me, because the DevTools Team really needs to stop running all this annoying bullshit in the background all the time. Also following the advice to delete the VsHub folder because MS won't give me a clean way to uninstall this crap.
    – jerhewet
    Commented Aug 26, 2015 at 18:25
  • 2
    This worked for me, I deleted that folder and VsHub doesn't run in the task manager anymore. Though I won't flag this as solution for this question, I'm sure there is a cleaner way to disable VsHub. Commented Aug 30, 2015 at 5:26
  • 18
    I've found more loyal solution. Rename VsHub folder to _VsHub, instead of deleting. This has an advantage of rolling back, if you're really scared :)
    – xakepp35
    Commented Sep 2, 2015 at 18:12
  • 4
    During debugging, the diagnostic tools that show a live view of CPU & memory usage of the process being don't work.
    – Frederik
    Commented Sep 12, 2015 at 18:41
  • 4
    I ran into trouble with VsHub and HttpHostx64 when I was trying to alter an old linq to sql designer file in an old project. After opening the designer, VS would lock up and be unresponsive. Procmon showed lots of activity from HttpHostx64.exe. I've renamed the c:\Program Files (x86)\Common Files\Microsoft Shared\VsHub\ folder to "VsHub(bullshit)". My linq-to-sql designer now loads as normal. :)
    – Nick
    Commented Nov 4, 2015 at 20:57
30

As xakepp35 mentioned, you can delete the C:\Program Files (x86)\Common Files\microsoft shared\VsHub folder. However, I suspect that updates or other installers will likely try to re-create it.

What I did was shut down all the VS processes. Take ownership of the folder (as admin) and then RAR (ZIP) up the folder and finally delete it (RAR as a backup if I need the files back). Mine is on an SSD so I want to conserve space. Otherwise you could simply rename it and leave it in place.

Then to prevent it being created again, I used an old Win 3.1 trick. Create a text file named VsHub.txt in the C:\Program Files (x86)\Common Files\microsoft shared folder. Then rename the text file and take off the .txt extension leaving a file named VsHub. Since the OS can't create a folder and a file of the same name in the same location, poof, its inaccessible as a folder to VS and its inaccessible and future installers/updaters as a folder either. Then if you need to allow access again in the future, simply add the .txt back on the file and away you go.

3
  • 8
    This proposed solution worked perfectly for me. It eliminated the flood of vshub requests in Fiddler and overall performance of VS is substantially improved. Microsoft, if you are reading: less is more -- bloatware is the worst thing that you can let happen to productivity software.
    – Shaun
    Commented Dec 9, 2015 at 2:56
  • Just to make sure that nobody gets any wild ideas about removing that file to allow creation of the directory, you can add an ACL to it from the right-click / properties / security tab that does nothing other than deny everyone delete privileges on the file.
    – dgnuff
    Commented Jan 19, 2016 at 2:25
  • I followed this tip and I got incredible speed pickup. My computer is susceptible to disk queuing which sometimes means Visual Studio splash screen is there for 5 minutes (no exaggeration). Thanks so much for this.
    – S Meaden
    Commented Nov 24, 2016 at 11:36
22

This seems to be a communication Swiss Army knife for visual studio as per @sraboy's answer. It is used during debugging to display performance information about the running process, but also to send telemetry to Microsoft about the project you're working on. You can build and step through code fine with it disabled (at first glance).

Removing, renaming or blocking the vshub process creation with AV will break the performance tracing I mentioned. Losing vshub improves privacy while using Visual Studio as it communicates with vortex.data.microsoft.com, passing information such as solution & project GUIDs along with your account id. Below is a screenshot from fiddler intercepting the HTTPS data.

Blocking access at network level helps with privacy, but it will not address your resource usage issue. I would consider the latter as a normal overhead of running Visual Studio.

For your use case, you can probably get away with some form of disabling (blocking instantiation with your antivirus software is probably the cleanest approach), but it may support additional functionality I haven't figured out yet.

Data communicated to Microsoft, via vshub

8

For those of you who want to preserve VSHub and still be able to use Fiddler you can setup a Filter in Fiddler with the following setting:

Request Headers > Hide if URL contains =
REGEX:localhost:\d+\/vshub\/

EDIT - you probably want to add this too:

Hosts > Show only the following Hosts: =
localhost;

in order to omit vortex.data.microsoft.com etc.. requests

vshub filter in Fiddler

4

According to a Microsoft Program Manager commenting on the Visual Studio Blog commenting on the Visual Studio Blog, it's used to support multi-tool communication across the VS suite. Given how complicated Visual Studio is, I wouldn't recommend anything as harsh as xakepp35's answer (deleting it).

On my Win10 x64 with VS2015 running, while debugging, there's three processes and the total RAM usage is less than 150MB total. Unless you're page-thrashing on a machine with minimal RAM that's not much to be concerned about. Given that you're running VS2015, I'd guess you have 150MB to spare.

Until or unless you find documentation showing explicitly what the Hub is supporting, I'd recommend leaving it be. In my experience, Visual Studio installs are far too easy to break.

3
  • 3
    On my machine after a day of work this program take 580MB. Even after I closed VS2015, This program does not stop. I thinks this is quite a lot of RAM for a program that supports features (cloud, udpates) I don't use.
    – 0xBADF00D
    Commented Oct 8, 2015 at 16:16
  • This also seems to be dependent on the size of your solution as well.
    – Ed DeGagne
    Commented May 13, 2016 at 15:00
  • 1
    Well, the problem is that it just grows unbounded. I only installed 2015 yesterday and this morning had a 7GB mystery to investigate. Just silly. Disabled diagnostic tools. Commented Oct 12, 2016 at 22:32
3

One of the reasons why Visual Studio tries to connect online seems also that, by default, search online for updates for both Visual Studio and its extensions.

Also, Visual Studio includes a version of Internet Explorer within its core so that webpage (and extension) can be downloaded live. In other words, it acts as a browser as well and as we all know... Microsoft is pretty keen on checking its users' data and usage of its software.

There are plenty of online functions in the menu ToolsOptions. (To be honest, I do prefer MonoDevelop even with its flaws.)

2
  • 2
    I recently switched to Sublime Text, can't keep up with VS slowing my machine. Commented Sep 25, 2015 at 18:58
  • 1
    We are about to convert all our .NET based web services into Java because the Microsoft tooling is just god awful.
    – crush
    Commented Nov 19, 2015 at 0:15
2

It's needed for BrowserLink, the Diagnostics window, Intellitrace.

I sometimes need these features, but only have 8 GB of RAM. I'm usually at 90-95% usage so I created a batch file to toggle VSHub on and off by renaming the folder and creating a symlink to an empty folder with dummy files.

Shutdown Visual Studio before running.

@echo off
goto CheckVsHubRunning

:KillVsHub
    echo Killing VsHub Process
    taskkill /IM VsHub.exe /T /F
    TIMEOUT /T 3 /NOBREAK
:CheckVsHubRunning
    ver > nul
    tasklist /FI "IMAGENAME eq VsHub.exe" | find /I /N "VsHub.exe"
    if "%ERRORLEVEL%"=="0" goto KillVsHub
    if "%ERRORLEVEL%"=="1" echo VsHub is not running.
    echo.

PUSHD "C:\Program Files (x86)\Common Files\microsoft shared"
    IF NOT EXIST "VsHub.original" (
        echo Renaming Original VsHub folder.
        RENAME "VsHub" "VsHub.original"
    )
    IF NOT EXIST "VsHub.dummy" (
        echo Creating Dummy Folder and Contents
        mkdir       "VsHub.dummy"
        copy NUL >  "VsHub.dummy\1.0.0.0"
        copy NUL >  "VsHub.dummy\ServiceModules"
        mkdir       "VsHub.dummy\dummy"
    )

    IF EXIST "VsHub\dummy" (
        echo ENABLING VsHub
        echo.
        rmdir       VsHub
        mklink /d   VsHub   VsHub.original

    ) ELSE (
        echo DISABLING VsHub
        echo.
        rmdir       VsHub
        mklink /d   VsHub   VsHub.dummy
    )
echo.
pause

On my machine VSHub and its cronies usually use:

  • VsHub.exe: 50 MB initially. 250-350 MB after 2+ hrs
  • Microsoft.VsHub.Server.HttpHost.exe: 200 MB initially. 350+MB after 1+ hrs
  • Microsoft.VsHub.Server.HttpHostx64.exe: 320 MB initially. 550+MB after 1+ hrs

This frees up over a 1 GB of RAM with hardly any functionality lost.

0

"VsHub" should be renamed to "SmartMobileCloud"; that's how stupidTrendy it is. I dumped it; my VisualC editing/debugging wasn't harmed.

After installing VisualStudio, remove unUsed extensions, do the "C:\Program Files (x86)\Common Files\Microsoft Shared\ - Deleted - VsHub" fix... and put a "VsHub" text file there ( no ".TXT" ), so nothing can recreate the folder.

Not the answer you're looking for? Browse other questions tagged or ask your own question.