0

On RPi 3B/Raspbian, I'm experiencing dreadful seize-ups when it appears I've filled the memory up with programs. Mouse movements, for example, can take 10 seconds.

This happens with a standard setup.

Is there a way to set the system to mitigate against this, by, for example, warning the user this may be about to occur, so reconsider starting that additional app/opening that additional data-heavy browser tab?

Any elucidation on the mechanics of this situation would be most helpful.

4
  • 1
    Read up on the linux OOM killer. There are various ways to constrain app resource usage, it depends on context. I'm not aware of any warning apps separate from watching a resource monitor, but it would be pretty easy to implement one.
    – goldilocks
    Commented Sep 13, 2020 at 16:23
  • I suggest removing swap. That way the OOM killer will just kill some memory hogger instead of the system freezing up because the SD card (swapping in general) is just so much slower than real ram. Commented Sep 27, 2020 at 16:32
  • Thanks for the responses. I did try removing swap, though I do still run into seizures as such. Often, I can overcome this by for example pressing Ctrl-F4 when in the browser then go away for a while (make a cup of tea say). It usually gets me unstuck but it can still take a while (5 mins maybe). I can't tell if removing the swap has helped, as my behaviour is now such that I'm careful not to load too many resource-heavy pages at once.
    – TKonan
    Commented Mar 13, 2021 at 16:26
  • I guess I'm surprised that the system (Raspbian) doesn't anticipate resource exhaustion, and/or reserve resources to ensure it can operate/provide a warning when resources run low. In saying that, am I misunderstanding the underlying Raspbian/Linux strictures that make this impossible? Wouldn't others often run into this problem? I don't see others with the same complaint. Maybe something else has got into my system so its not as standard as I imagined.
    – TKonan
    Commented Mar 13, 2021 at 16:35

1 Answer 1

0

I would now describe the operating system running on this unit as Raspberry Pi OS (Stretch - Legacy).

To answer the question of mitigation against this freezing situation, firstly, I discovered the 'Resource monitors' applet which can be applied to the taskbar's system tray (rt-click Start Menu Button -> Add/Remove Panel Items -> Panel Applets tab -> Add -> Resource Monitors). This gives a real-time memory usage indication, which is a help.

What really fixes up this situation however, is to use a memory manager. Through 'Pi Apps', I found an installation called 'More RAM' (under the 'Tools' category), which is a Pi-optimised ZRAM install that works by compressing memory. Since then, I've not experienced such freezing at all, even with twice as many browser tabs active.

Pi-Apps: https://github.com/Botspot/pi-apps

Forum post related to 'More RAM': https://forums.raspberrypi.com/viewtopic.php?t=327238

This installation has improved the user experience on my 1Gb Pi 3 no end, so tell your friends; spread the word!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.