[SOLVED] Frequent crashes, when SSD Usage is high

Hi, i'm sorry to ask this question, and i hope it belongs here, but i get really annoyed by now.

Everytime i have a lot of Document open with Okular, and maybe a pdf with Libre Office Draw, and also Anki open for my flashcards, my HD Led is on constantly, the fans of my Laptop are on full load, the Laptop is getting warm, and finally it freezes, until restart. I'm really annoyed by now.

The RAM is, afaik from KSysguard not full, around 2,5GB-3GB out of 3,71GB available. I'm using the Manjaro KDE Version 20.0.3 with all the latest stable updates and Kernel but the Problem was also there with earlier Kernel Versions. But i didn't always had that kind of Workflow till lately, so it didn't bother me that much.

I would like to provide better info, but i don't really know what i can give more. And also i'm really in a rage right now and not clear thinking. Any support would really, really help me. I read through some of the related topics, but i didn't really see how there Problems would fit mine. Also i would like to try out another IO manager, but i couldn't really figure out how to do that properly from the Wikis.

Thanks up front, sorry for my hasty english, and greetings from D3rMang0

Manjaro uses a non-default setting for vm.swappiness with the value of 10.

➜  ~ cat /etc/sysctl.d/99-sysctl.conf           
vm.swappiness = 10
vm.vfs_cache_pressure = 50
#vm.dirty_ratio = 3

You could try modifying the setting - kernel default is 60 - and make sure you have an adequate cache activated.

sudo nano /etc/sysctl.d/99-sysctl.conf

Another option is the maxperfwiz script made by forum members.

Thank you very much. I've used the maxperfwiz script,and i think it did improve the situation a bit? At least, i found now a usecase where i can reproduce the problem consistently, and found something interesting. The problem seems to occur when the RAM is getting full. KSysguard shows me about 400MB less RAM Usage, in comparison to htop. So the RAM is getting full in htop. But when monitoring with KSysguard, i have still around 600MB left.

One thing to say there might be, that i don't have a swap partition. I am dual booting right now with Windows on a laptop with an 120gb ssd, so i didn't see the space for a swap partition. Is it possible, that Manjaro/Linux doesn't operate correctly in such instances without a swap file?

Is ist possible to configure a swap file now?

It's not linux specific. Operating systems don't work when they have less ram than they need, swap provides a place to put stuff so space can be cleared in ram.

#sudo truncate -s 5G /swapfile  # what was I thinking, don't run this one
sudo dd if=/dev/zero of=/swapfile bs=1M count=2000 status=progress
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
echo "/swapfile none swap defaults 0 0" | sudo tee -a /etc/fstab


1 Like

sudo swapon /swapfile

Doesn't work correctly. It get's skipped and says "seems to contain holes" (in german: scheint Löcher zu enthalten)

Sorry I thought truncate would be easier, I was going to test it, but my ride turned up early and I had to leave, so I just posted. :man_facepalming:

I've tested it using the dd command below in place of the truncate command.

sudo dd if=/dev/zero of=/swapfile bs=1M count=2000 status=progress

How much swap you need varies, the command above will make a 2GB file, you may want to change it based on your needs. bs * count = size

Thank you so, so much, both of you! It works :smiley: I can now see the importance of a swap file/partition ._.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.

Forum kindly sponsored by