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.
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.
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.
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!