Everything freezes when ram gets full

Hi guys, first of all I want to say great work with Manjaro, it really makes Arch accessible for everyone, it’s really fast for me and it looks amazing.

One problem I have with it using Gnome is everything freezes around the time ram gets full and I have to perform a hard reset, the screen doesn’t go black or anything it just freezes and it won’t respond to anything. I have a swap partition the same size as my ram (8GB). Is this a known issue, is there a fix that I can try?

Thank you!

Welcome to the forum! :slight_smile:

Well, if you’re running out of RAM, then the system has to start swapping, and depending on your hardware, that could indeed freeze your system.

However, there is no need to do a hard reset, as it’s just latency that you’re experiencing from writing to the swap partition and reading other processes back into RAM from the swap partition. In other words, if you’re patient enough, then the problem will remedy itself.

Now, 8 GiB of RAM should definitely be enough ─ we’ve got members here with far less than that ─ but a lot depends on how you use your computer. First of all, GNOME is not a lightweight desktop environment ─ not that 8 GiB wouldn’t be enough for it, because again, we’ve got people here with less RAM than that ─ and then there’s the fact that just about all web browsers are notorious memory hogs, especially if you open up multiple tabs with heavy graphics.

So the advice would be to either go easy on the usage of browsers and other memory-hogging applications, or to get more RAM if possible. :man_shrugging:

1 Like

Hi,
are you using many/any RAM-demanding programs?
I think it freeze because OS is moving data from RAM to Swap on disk, so do you have a SSD or a HDD?
You can try to increase swappines ( Here how to, it is about Ubuntu, but it should work on Manjaro too), so that’s OS will move before saturation pages to swapfile, but it still get slower if you use to much memory.
It also should “de-freeze” after some time (how much it depends on how fast is your IO device), so you can keep work without restart; it’s annoying but still usable.

1 Like

Thank you for replying, I will give it more time the next time and see if it comes back. I could indeed be more mindful of how many apps I leave open.

@Magnani I have a SSD but it’s connected over SATA2.

Just to give you an example, when I bought this computer here, it also had 8 GiB of RAM in it, and at some point, I decided to build firefox-appmenu from the AUR. It filled up all of my RAM and about 8 GiB worth of swap.

The system appeared locked solid ─ not even the mouse cursor moved anymore ─ but the system was compiling and swapping, so I turned off the monitor and I went to bed. The next morning, I checked my computer, and everything was running normally again. The timestamps in my command prompt showed that the compilation process had taken over five (5) hours.

I/O is locking, which means that while the processor is engaged in I/O operations ─ which is a kernel operation ─ it cannot do anything else, and swapping is very I/O-intensive.

Never judge the book by its cover. :wink:

1 Like

Tweaking swap settings and some other things might help.
So could early-oom for a rather automated killer…

1 Like

This seems to work for me, setting vm.swappiness=20 I couldn’t freeze it even when actively trying.

Thanks everyone for helping.

1 Like

I wonder if a PS/2 mouse or keyboard would get around that I/O lock since I believe they use interrupts instead of waiting in a queue?

I wonder if a PS/2 mouse or keyboard would get around that I/O lock since I believe they use interrupts instead of waiting in a queue?

I don’t know, but I think also usb Mouse and Keyboard have IO interrupt.
I think that device could cause a hardware interrupt to the CPU, but the graphic will not show you because it is locked because of the swapping. I’m not sure, but when the pc exits to freeze, mouse pointer will “appear” to new position, not just staying still and becoming movable again.
(but today I’ve achieved my first “solution”, so I won’t “pull the rope”)

Not in Linux. Linux handles USB and PS/2 HID through the same subsystem.

2 Likes

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