0

I have a Dell Inspiron 15 laptop with a Core i5 7th Generation along with 4GB DDR4 2400MHz. The OS is Windows 10 Home Single x64 (Build 15063). Most of the tasks being performed on that laptop are coding with Visual Studio Code, running MySQL server and some Java programming. It was working perfectly until the day before yesterday.

Starting from yesterday, the Visual Studio Code program has started consuming all my RAM and freezes my laptop. Both HDD and RAM status in Task Manager went up to 100%. I always have to hard reset the laptop.

The PC was operating normally until I opened the Visual Studio Code. I found out the Visual Studio is the cause of the problem. I uninstalled and reinstalled the program but that didn't work for me. Also updating to the latest version didn't work. I was just doing coding just like every day and didn't install any plugins.

Edit: I got the problem fixed. But I don't know how the solution and this problem relates with.

After upgrading to Fall Creators Update (1709), I could see all the details and sub tasks the VS Code is performing in the task manager. I found out more than 2000 Git for Windows processes were running under Visual Studio Code and consuming all my RAM. Those Git for Windows processes were increasing infinitely. Each process uses 2MB RAM.

So, I uninstalled the Git (2.6.0) and reinstall with the latest version (2.15.2). That fixed my problem but I am not really satisfied with that.

It would be very nice and appreciated if someone explains me how the Git gives trouble to the Visual Studio Code.

dandan78
  • 171
  • 1
  • 12
Aung Myat
  • 99
  • 2
  • 3
  • 12
  • i would recomend you to uninstall your visual studio using RevoUninstaller, then reboot and try again. Link on how to do this can be found in this topic: https://superuser.com/a/1270795/441304 – user1448914 Nov 29 '17 at 07:06
  • I tried with IOBit uninstaller but the problem still persists. Will there be any difference? – Aung Myat Nov 29 '17 at 08:20
  • I don't think the laptop hard freezing like that has anything to do with RAM usage. How big is your paging file? – David Schwartz Nov 29 '17 at 09:09
  • Minimum 6144 MB (4096 MB * 1.5), Maximum 8192 MB (4096 MB * 2) – Aung Myat Nov 29 '17 at 10:39
  • 1
    32 or 64-bit OS? 4GB RAM & 8GB swap is really quite tiny these days. – Tetsujin Nov 29 '17 at 19:39
  • It's 64 bit. I forgot to mention that. My bad. @Tetsujin By the way, for how many Megabytes should I set the page file size for the best performance? Most of the forum says 1.5 * Physical RAM for minimum and Double the Physical RAM for maximum. Is this good enough? – Aung Myat Nov 30 '17 at 02:05
  • I tested the Visual Studio Code on a Celeron PC with 4GB DDR3 RAM which has installed Windows 8.1 x64. The program ran very smooth with less than 2% of RAM usage. – Aung Myat Nov 30 '17 at 02:22
  • @AungMyat You shouldn’t set it, you should allow Windows to manage it, and allow it to increase or decrease based on your actual needs of the system – Ramhound Nov 30 '17 at 03:45
  • @Ramhound I have noted your advice. But both automatic or manual page file sizes still don't solve my Visual Studio problem. :( – Aung Myat Nov 30 '17 at 04:17
  • Guys, the problem got resolved. I edited my question. But I don't know how the solution and the problem are related. – Aung Myat Dec 05 '17 at 04:58
  • @AungMyat Please post your solution as an answer. This is a Q/A site, not a forum. – dandan78 Jan 14 '19 at 13:23
  • @dandan78 The OP has not been seen for more than a year - perhaps you would like to do the honours? – Andrew Morton Nov 14 '19 at 16:13

3 Answers3

0

I had the same problem and it turned out it was Git for Windows that was causing it. If you locate Vscode on your task manager and view its subprocesses, you may see several rows of git.exe, each consuming about 300MB of RAM.

Uninstalling Git for windows (version 2.16 at the time) and installing the latest version solved the memory-hogging issue for me.

Nick
  • 171
  • 1
  • 1
  • 6
-1

In windows, you can set priorities for each application for how much Memory and possibly CPU they can use. If you set the application that is taking to much ram to a low priority, it will not use much RAM. There are 5 options that distinguish the level of priority! For decreasing priority, there is Below Normal and Low.

A simple tutorial can be found here how to set priorities. https://youtu.be/niNc4Xr46xk?t=32

In Task Manager you can also monitor how much Memory/RAM apps are using!

vanilla
  • 27
  • 5
-1

If you've got resharper installed that can use a bit. If so try updating it.