Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

High CPU load on single-CPU VM #17097

Closed
hgotur opened this issue Dec 13, 2016 · 25 comments
Closed

High CPU load on single-CPU VM #17097

hgotur opened this issue Dec 13, 2016 · 25 comments
Assignees
Labels
freeze-slow-crash-leak VS Code crashing, performance, freeze and memory leak issues perf *question Issue represents a question, should be posted to StackOverflow (VS Code)
Milestone

Comments

@hgotur
Copy link

hgotur commented Dec 13, 2016

  • VSCode Version: 1.7.2
  • OS Version: Windows Server 2012 R2

Steps to Reproduce:

  1. Install VS Code
  2. Launch VS Code

I tried uninstall and reinstall and it still happens. I open VS Code, and the CPU usage goes up. It goes back down after a few seconds, but shoots back up again. This is despite not opening any files or doing anything on VS Code.

@kieferrm
Copy link
Member

@hgotur Do you see any errors in the dev console? Command Palette > Developer: Toggle Developer Tools. Also, can you pls go to Command Palette > Help: Report Issue and copy the list of extensions in the pre-populated issue into this one?

@kieferrm kieferrm added freeze-slow-crash-leak VS Code crashing, performance, freeze and memory leak issues perf info-needed Issue requires more information from poster labels Dec 13, 2016
@jrieken
Copy link
Member

jrieken commented Dec 13, 2016

Also, please use process explorer and provide the full list of arguments of the process going crazy

@bpasero bpasero added this to the Backlog milestone Dec 13, 2016
@alexdresko
Copy link

Exact same problem here. Basically a brand new 2012 R2 VM install on VMWare. 2GB RAM. Brand new install of vscode, with no plugins.

It's practically impossible to use. It takes 30+ seconds for the window to even appear after clicking the icon to launch the application. Don't know if it'll ever come up enough for me to get to the command palette.

I am using the latest insiders build. "code - insiders.exe" is consuming the CPU.

image

image

Hope that helps.

@bpasero
Copy link
Member

bpasero commented Dec 17, 2016

We have heard reports and can reproduce of VS Code running very slow on VMs when they are configured with 1 CPU.

@alexdresko
Copy link

@bpasero It does only have one CPU. I'll fiddle some knobs when I get back from vacation and see if it fixes the problem.

@hgotur
Copy link
Author

hgotur commented Dec 19, 2016

  • Extensions:
Extension Author Version
cpptools ms-vscode 0.8.1
csharp ms-vscode 1.3.0

These are the extensions. There were no errors in the dev console. My configuration is also a VM with one CPU.

@bpasero bpasero changed the title Visual Studio Code takes up > 95% of the CPU when opened despite being idle and not loading any files High CPU load on single-CPU VM Dec 20, 2016
@amitmittal
Copy link

I am also facing the exact same issue on a vm with single core cpu and 2 gb ram. Works pretty cool on my local dual core pc.
Fresh install of VS, No extensions installed.

capture

@mguinness
Copy link

mguinness commented Jan 4, 2017

Same issue here with version 1.8, single core CPU is maxed out. Fresh install, no extensions.

Any known workarounds? Would using an earlier version help? Is this a VS Code issue or Electron?

Update: Found the following issue on SO which could indicate OS ver could be an issue. I'm also using Windows Server 2012 R2 which should be the same codebase as Windows 8.1 which is noted as not affected.

Also see electron/electron#7839. Should this be mentioned in release notes as a known issue?

@vov32
Copy link

vov32 commented Mar 2, 2017

I have same issue on core i7. It is not VM.

  • VSCode Version: Code 1.10.1 (653f8733dd5a5c43d66d7168b4701f94d72b62e5, 2017-03-02T00:47:58.633Z)
  • OS Version: Linux x64 4.9.9-1-MANJARO
  • CPUs: Intel(R) Core(TM) i7-2630QM CPU @ 2.00GHz (8 x 2599)
  • Memory (System): 9.63GB (6.10GB free)
  • Memory (Process): 173.82MB working set (211.97MB peak, 99.30MB private, 74.53MB shared)
  • Load (avg): 2, 1, 1
  • VM: 0%
  • Initial Startup: yes
  • Screen Reader: no
  • Empty Workspace: no
  • Timings:
Component Task Time (ms)
main start => app.isReady 58
main app.isReady => window.loadUrl() 408
renderer window.loadUrl() => begin to require(workbench.main.js) 313
renderer require(workbench.main.js) 1660
renderer create extension host => extensions onReady() 783
renderer restore viewlet 1084
renderer restore editor view state 1
renderer overall workbench load 1399
main + renderer start => extensions ready 3347
main + renderer start => workbench ready 3875

@ShayneSmyth
Copy link

Same here. 100% cpu just from opening vscode. no extensions,
Brand new Azure Windows Server 2012 R2 - 1 cpu
Fresh install of vscode 1.10.1

@BSykesUSCG
Copy link

CONFIRMED SOLUTION -- We added another core to our existing VM and the CPU issues disappeared for both Visual Studio Code and Atom (Both of which rely on Electron). At this point I believe this is actually electron issue electron/electron#7839.

@jrieken jrieken added *question Issue represents a question, should be posted to StackOverflow (VS Code) and removed info-needed Issue requires more information from poster labels Apr 5, 2017
@jrieken
Copy link
Member

jrieken commented Apr 5, 2017

Closing this as question. Our application model highly depends on multiple process. This isn't fit single core machines well but we also believe that's a problem of VMs. Single core hardware should be very rare these days.

@jrieken jrieken closed this as completed Apr 5, 2017
@alexdresko
Copy link

Rare, like my brand new Raspberry PI Zero W? Sorry, I get it. But it's frustrating. I love VS Code.

@mguinness
Copy link

@jrieken How about adding the need for multiple cores in release notes and VS Code requirements?

@jrieken
Copy link
Member

jrieken commented Apr 10, 2017

cc @gregvanl for the comment above

@lasrol
Copy link

lasrol commented May 2, 2017

IMHO this should be fix/improved. Code is a good tool to edit files on the fly and should be a proper lightweight alternative to the big IDE's. For me this is the exact solution where i would use Code instead of any other IDE/Editor, systems with low resources and I don't want to install VS(or any other IDE), code is fast and easy to install and gives me just what i need for debugging and some quick editing of my source files.

@knocte
Copy link

knocte commented May 9, 2017

IMNSHO at the very least, VisualStudioCode should detect that it's running on a single-core and give an error to the user at launch time, informing him about this limitation, otherwise the UX is quite ludicrous.

@Coresi7
Copy link
Contributor

Coresi7 commented Jun 13, 2017

@jrieken Problem still reproduced on version 1.13
For client, yes, for server and VM, no. More cores means more money and waste of computing resources.
So you may think it wont be used on server or VMs?

@JackUkleja
Copy link

I am getting this issue on Hyper-V single CPU VM.

CPU is pegged at 100% just starting up Code and stays pegged. The OS is unusable.

I do not understand how this issue is closed. This is not a case of "VS Code is a resource intensive app, you can't expect it to run well on a single core VM!!".

There appears to be some horrible degenerate bug here.

@bmisiak
Copy link

bmisiak commented Jul 22, 2017

Version 1.5.2 takes a minute to launch but otherwise works well on single core machines.

@mguinness
Copy link

@m-brian Thanks, confirmed that version from August 2016 works. Also, there is now an insiders build for a new 64 bit version which might be worth trying.

@javp0103
Copy link

Version 1.15.1, clean installation without extensions in a single hyper-v VM Windows Server 2012 R2 (6.3.9600) 100% cpu. Upgraded to 2 cpu and VS Code starts up without any problem

@costica-moldovanu
Copy link

Same problem as today September 13, 2017. Just installed latest version and never have been able to start it. The VM CPU goes to 99% and becomes unresponsive. Fresh install, no extensions..
image
And is starting 4 different threads. Does not make sense. I have installed it just to use it for getting source code from TFS without installing a full VS . Thx, but NO thx.

@mguinness
Copy link

@costica-moldovanu AFAIK the single core CPU issue isn't VS Code per se, but rather the underlying use of Electron. As for TFS, you can also use the TFS CLI.

@costica-moldovanu
Copy link

Thx

@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 17, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
freeze-slow-crash-leak VS Code crashing, performance, freeze and memory leak issues perf *question Issue represents a question, should be posted to StackOverflow (VS Code)
Projects
None yet
Development

No branches or pull requests