High memory usage issue?

Youre running without a swap partition/file which means when you run OOM the system has to 1 by 1 kill processes it thinks it can safely kill as without swap the programs have nowhere to go. This will cause this issue and the reason it isnt on windows is because Windows has this setup and enabled by default with most users not knowing it exists.

1 Like

But it shouldn’t be and that’s my point whether it’s on my system or the OP’s. So it’s either hardware or software and can be the network that causes a system to hang or freeze. The fact is Firefox does consume a lot of memory and when you have many tabs open memory usage goes way up. Some of these programs Slack and Discord also running doesn’t help and having many browser extensions also increases the load on the system.

with the CPU usage also getting to 99%

This can happen even with the most powerful cpu.
I don’t particularly like certain Intel Cpu that are designed to be lower power. They just don’t work well when they have any load on them. I’m always sceptical when users have issues like this. 8 GB ram should be sufficient and this shouldn’t be happening. I would be looking in a totally different direction such as the programs running. Is it discord? Slack? Too many tabs open? Certain extensions? Network? Or is it the hardware.

I don’t normally get into these things about OOM and such as i stick to default installation and settings. I don’t usually have these issues.

with the CPU usage also getting to 99%
I had definitely missed that part from the OP. It would be interesting to see what is using the CPU so intensely. I would suggest isolating each app and monitoring the CPU and RAM usage by running one major app at a time and monitor their behavior individually. Definitely keep an eye on free -h output, especially the Available column at the end, which will tell how much memory is free to be reclaimed by the system. If indeed the system is running out of RAM, using an OOM killer would help in finding out the culprit. But there is a learning curve and it takes some time to set up and manage.

@Steve120

Everyone here has brought up valid points. However, to really diagnose the cause of the high memory usage on your EOS install, you have to isolate each component and then observe them individually. We can’t expect to learn anything useful about the ram usage of your window manager, for instance, if we have a ton of applications open in the background. There’s just too much complexity involved, too many variables.

The first issue you have expressed concern (and confusion) over is whether or not Windows’s window manager is more memory-efficient compared to KDE plasma’s. To get to the bottom of this, just compare the initial ram usage at boot up (without launching any applications)? How much ram does KDE plasma use when you boot into your system? You can’t involve the applications in this because there are probably differences in the way an application is implemented across platforms. For instance, the Windows version of application X might be more memory-efficient compared to the Linux version. Maybe there’s a hidden bug somewhere in the Linux version (like a memory leak). In which case, @ricklinux is absolutely right. It’s a software issue. If that’s the case, you have to do some work to identify which application is the culprit and then bring up the issue to that particular application’s developer.

The second issue here is whether or not having a swap makes a difference. The best thing to do here is to just test it out. Create a swap and then launch the same applications you did before. After that, open up htop and see the percentage of swap being used. If 0% of swap is used even though you have the same number of tabs or applications open, then it’s obvious that something other than your RAM is causing your system to hang.

Personally, the fact that your cpu usage is also high tells me that the culprit is most likely an application. But, of course, I could be wrong.

1 Like

Ok I have only recently gotten back to this post, and added a swap file

though it seems to be not doing much. Though, weirdly, a new problem has appeared after I set this up. Sometimes my dock and notifications just stop updating. Like my notifications hang, or just leave a black rectangle in its wake. I wouldn’t be able to press the Super key to bring up the menu to restart the PC, only through either holding the power button or doing reboot on terminal (which would take a while to restart). This happens even when my RAM usage isn’t at the max yet.

Nonetheless, I also suspect it’s a memory leak too among one of my software programs. These issues already were occurring before I installed Slack, so it’s most likely either Discord or Firefox (I’m thinking it’s Discord though can’t be too sure). I’ll leave it at here for now. Thank you everyone for your help!

Actually, never mind, I think adding the swapfile helped a lot. I opened a browser with 40 YouTube tabs, and it was still not hanging. free -h gives:

I think I would consider this resolved?