CPU usage randomly jumps to 100% on all cores.
I just installed Bazzite on my Surface Pro 5 and I've gotten a few things installed (mostly discord and a couple of Firefox add-ons), but now I'm suddenly getting random spikes of 100% CPU usage. I can't tell what's causing it, because there doesn't seem to be a consistent pattern and the resource monitor isn't showing any app taking up an unexpected amount of processing power (with the possible exception of itself).
I'm also not doing anything I'd expect to be overly CPU intensive, since I only have a handful of programs open and the only one that's actively doing anything is the Bazzite portal.
I'm not even sure what else to do to diagnose this.
19 Replies
It almost looks like scrolling (on firefox, discord, or the system monitor) or even just rapid mouse movement might be causing the spikes?
I had a look at the spec of the Surface pro 5. And I see that the ram is 4GB, 8GB or 16GB. Do you perhaps have 4GB of ram? If you run low on RAM Bazzite will start using your ZRAM swap memory (essentially compressed memory inside of memory) this process is quite CPU intensive if it is happening frequently
It's 8GB, though it only seems to be seeing 7.7.
Yeah the 7.7 is normal. I have 32GB of ram and it's showing 30.7 GiB. 8GB = 7.7 GiB. If you open the terminal. run
btop
I find it's quite a bit lighter than the other system monitors. When you have your CPU spikes check how much RAM is free and how much swap is getting used
I have a browser with 4 tabs open and discord and I'm using 5.4GiB browsers and discord are quite heavy on ram
Oh also missed the part with Bazzite portal being active.
If you starting up something that uses distrobox that can also be quite intensive (quite a few of the bazzite-portal apps use distrobox in the background)Good to know. I closed Bazzite portal, because it seemed like it had gotten stuck and wasn't doing anything, but it does look like I'm still using most of my ram.
(Also, I have to say, btop might have the most classically techy interface I've seen.)
If you press Right or Left arrow, you can reorder the processes by memory usage and cpu usage, you might be able to find the culprite of what is using all your ram. Also note that you only care about Available RAM, ignore free ram completely as Linux uses free ram to cache stuff and you don't want to turn that off.
Is there any way to colapse all the processes on a level in tree mode?
It looks like Firefox is using 3GB, on its own.
After that, Discord is using 531MB.
That's potentially a problem. I'm not planning on doing anything too intense on this computer (mostly writing), but that's not really going to work if just having a few dozen tabs open eats up most of my resources.
in the menu there is an option to switch to "tree" the shortcut is the E key
Yup. I had it in tree mode. I was asking about collapsing levels of the tree.
The e short cut is good to know about, and I can see how they're noting those now, which is nice.
looks like space bar collapses or expands the tree
The mouse also works in btop
Yup. But space bar only collapses what you have selected, not an entire level, so it seems like that feature might not exist. Still, it's a rather nice program, thank you for telling me about it.
But, yeah, the issue seems to be firefox.
That's weird though firefox is usually one of the more lightweight browsers. Try install a different one and lets see what happens
The other odd thing is that its usage seems to be fluctuating pretty heavily, even without me doing anything that should effect it. By which I mean, without closing any tabs, it dropped from 3gb to 2.6, then in the process of slightly scrolling down a page it went back up to 2.8.
Oh, the other weird thing is that discover fails to update firefox. It produces an error about GPG verification.
try
flatpak update
in the terminalTrying it now. If that doesn't change things, would Vivaldi or Waterfox be good choices for a comparison?
... I'm probably going to need to deal with the weirdly slow internet speeds after this too. 😓
Yeah vivaldi works well for me, it's my default browser. Haven't tried Waterfox, so no comment there
Ok. So, for comparison, with firefox closed, my used memory seems to have settled at about 4-4.2GiB.
Sometimes there two options make a big differense in internet speed. I usually use 1.1.1.1 (cloudflare) or 8.8.8.8 (google) for my alternative DNS server rather than what the ISP gives. Also sometimes forcing IPv4 speeds up things because ipv6 is slow for some people
I'll give that a shot. With no tabs open FF is only taking up 1.1GB.
Mmm. Even using cloudflare and just sticking to IPv4, I'm getting about 100KiB/s downloading vivaldi.
I'm also sporadically getting a message that says I need to log into my network, like it has some sort of web portal, which is weird.
Ok. I have 7 tabs open and FF is at 2GB and one of those tabs is settings and another is the new tab page.
Vivaldi's finally installed, lets see how it does.
With a fresh install and nothing open, it's using 950MB.
Just going to duck duck go brings it up to 1.3.
Ok. It's at 2.3GB with just 5 tabs open and, unlike FF, I don't have any plugins installed. So, it doesn't seem like FF is the problem.