Constant high CPU usage with clean install


#1

I am running in Windows 10 Pro (1709, 16299.192) in Parallels Desktop 12 (12.2.1) on macOS Sierra (10.12.6).

In trying to figure out why Atom always has high CPU usage, I uninstalled it and deleted these directories entirely:
C:\Users\<user name>\.atom
C:\Users\<user name>\AppData\Local\atom
C:\Users\<user name>\AppData\Roaming\Atom folder

I then installed a fresh copy of Atom 1.23.3.

I start up my clean copy of Atom, close the various welcome windows, and let it sit with only an empty untitled window.

In this state, Atom constantly takes ~40% CPU usage according to Resource Monitor. It fluctuates wildly at times (while sitting empty in the background), but settles back to around ~40%.

If I run atom --safe, atom --disable-gpu, or even atom --safe --disable-gpu I see the same thing.

I collected a JavaScript CPU Profile for 3 minutes and it shows 169.7 seconds of (idle) and 10.4 seconds of (program), and yet, it was still showing ~40 CPU usage this entire time.

At this point, I guess I should ask: Is this normal?

If not, any recommendations about how to further debug?

Thanks,
Adam


#2

I don’t use Mac, but I’m aware of Parallels as being a virtual machine environment. Do you have a way to figure out how much processor capacity is allocated for the VM to use?

Not for a normal desktop.


#3

Short answer: I don’t know how to define normal but I would say that type of resource hogging is not going be practical. Most likely scenario would be your Mac, Parallels, and Windows are in a struggle to manage limited resources. I can see why anyone would expect that problem to at least chill out while atom is doing nothing but once in awhile a combination of factors will get into a round robin circle jerk inside a computer and thrash all day long doing nothing except moving things in and out of a swap file. I would say the presence of Parallels and Windows is a big multiplier of the likelihood of that scenario. The mac can get that way too, but Windows and Parallels, sounds satanic to me.

Something you definitely should do. Regardless of your service agreement status with Apple, contact apple support. For problems like this, you will get tremendous assistance 24x7 to at least find out what is happening on your computer and a clear direction on how you can solve it. The best way to do it by a mile is to get them to call you. They will call you immediately. The trick is to answer the questions on the support site the right way. I can guarantee you that whoever calls will be delighted to help you get to the bottom of what is happening even if you have no service agreement. Where they have to draw the line is if you need parts or work done on your computer. Short of that, they will give you all the time you need and thank you for the chance to help.

Here is how to get them to call you:

  • Go to this link and signin. If you don’t have an account, just takes a minute to make one.

  • When you first signin, you will be prompted to tell them something they can answer by bringing up a page with info on it. You want to get by that (they really do not mind when you have a good reason as you do here).

  • Instead of typing your question into the little box, scroll down a little and click on Mac OS System and Software

BACKGROUND CONSIDERATIONS AND GUESSES

Are the VMs files stored and operating on an SSD or HDD? Does your Mac have at least 16G of RAM? If the answer to either of those is no, that is where I would look for the problem and if that is where the problem is you are going to need turn those answers to yes to solve the problem. I should stop here, because if the answer to both of those is yes, that would be shocking.

I do not see that type of activity from Atom, running it in macOS. I am sure you have your reasons for running it in a VM instead of letting it run in macOS. The problem you are seeing I think is going to be caused by the way Windows and Parallels work. I would think the Windows VM would need at least 8G of RAM the macOS leaves alone. The mac needs 8G for itself, so your mac hopefully has 16G or more RAM.

That CPU usage would be expected if you have a lot less than that, especially if you have the Windows VM running I would expect the thrashing to slow down after awhile, but it is very possible for a machine to get into constant grind mode as it tries managing tight resources even when nothing obvious is going on the foreground… Say something runs every minute or so, looking for memory to clean up or for a better wifi connection, who knows. That job needs RAM for itself and it sends Atom and Windows to the swap file. When that job is finished, macOS maybe puts Windows and Atom back into memory, but then that overriding job, or another one comes on and there you go back and forth between swap and memory. I am running Atom on macOS 1.13.2. Windows 10 runs as a VM in VMWare Fusion 10.1. Atom is installed both on macOS and Windows. I use Atom in macOS every day. The Windows 10 installation is for reference and testing. Windows 10 VM is allocated 2 core from the CPU and 8G of RAM.

My Windows VM with ATOM Was LOUD Inside My Computer
I was just running both versions of Atom, side by side. I did not take measurements as you did. Those measurements are tremendous and compelling. However, I could hear my disk drives hammering on something and Activity Monitor reported VMWre-vmx running up and down but nearly constantly over 100%. I almost never see that level of activity on this machine, so I shut down the Windows VM and the computer returned to normal. Before shutting down, I was noticing a lot of stop-and-go interaction while installing packages I on the Windows installation I run all the time in OSX Atom. The OSX installation of Atom behaves much nicer, without stressing the system. In fact, one of the reasons I like Atom a lot is it runs light on my system. Start up and shutdown are both really fast and everything it does it manages to do without carrying a lot of weight around. I don’t know how that is accomplished but I cannot imagine it is an accident. I think the light weight of Atom’s activities combined with the range of what it does combined with how the app is structured with a core and plugin and combined still with the way it is built with Chromium, Node.js and other infrastructure makes Atom special.

After shutting down the Windows VM, I started the job of moving the VM to an SSD instead of a regular HDD, to see if what effect that has on performance. The file copy just finished so I am starting it up now with the SSD.

Be right back.


#4

When first starting and for a few minutes after, the system was very busy. This was before starting Atom.

System stopped punching itself in the face after a few minutes. CPU is quiet. Starting Atom and seeing what it does when unburdened with work

At first it was really busy doing nothing, but it quieted down as I typed part of this post

Now I am goiing to try using Atom in Windows the same way I use it in macOS everyday. That means using ftp-remote-edit package to connect to the linux vms also running on this mac. That is where I do my work.

I will let you know what I find in a few minutes. I typed a few questions and thoughts, they are pretty random.


After the fresh install, and the test where you measured the system being very busy, did you try letting it sit for an hour or so, to see if it would settle down? Maybe Parallel and Atom are collaborating on indexing, calling home with installation data, or other new installation activities is something I am wondering about.

Have you installed openvm tools? The reason I ask is I know a major part of it job is to manage performance.

I would think people who have done significant parts of Atom development would have something to add to this inquiry. Have you sought support from Parallels?


#5

I just posted what I think is most valuable as an edit a few posts up. I am mentioning here, in case you already saw that post, but not the new information at the start. Here is a link to it.

I hope you get Atom going on your Mac soon.