Memory useage

Hi. This is my first posting so apologies if this has been covered before. I am running Piaeware 7.2 on a Pi4 2GB. It has been running reliably for a few months after power supply problems.
When I started the memory card useage was about 2.7 GB and memory useage about 3%. Now the card useage has increased to 3.6 GB which I can accept will be due to log files or similar but the memory useage has gradually increased to 46%. Is this normal and if so I assume it will mean I will have to replace the card with a backup and start again to prevent it running out of memory.
Thanks for any help.

1 Like

File system cache, usually called cache can be freed to be used at any time and doesn’t really count as “used” memory for purpose of running out of memory.

In case you want some graphs to keep an eye on historical trends of reception and also free memory / disk, you can take a look at graphs1090 here: Raspbian Lite: ADS B receiver · wiedehopf/adsb-wiki Wiki · GitHub
It’ll work best with readsb or dump1090-fa as the decoder.

Welcome to the forum G4GCL

Fascinating hobby, you can either keep it simple and just let the Pi tick away quietly or, as @wiedehopf suggested, add scripts that give you graphs and dials. This of course gets you hooked and you end up buying extra antennas, filters, moving the Pi, climbing on roofs, all the get a better signal and track more aircraft.

You’ll then want another one, run two sites, you don’t know what you’ve let yourself in for :joy: :sunglasses:

Geoff

1 Like

Sometimes things get in a knot. This Pi had been running fine for a year, then it started to fill up.
(the outages were due to a failed battery)
The setup was a Piaware image with Tar and Graphs, but otherwise vanilla.
Formatting the card and setting back up as it had been, has fixed what ever problem it had developed.

image

The Bullseye OS enables persistent journaling out of the box. So, if you are seeing a slow, steady creep in disk space consumed it may be that. The default retention configuration limits the journal to 10% of disk space and sets aside 15% of the file system which systemd-journald will leave free for other uses. Both of these values are capped at 4G. If you see a shedload of files in /var/log/journal/your unique hex id/ then this is at least part of the cause.

I am unsure if Piaware uses the default described above as I always modify the journaling parameters straight away in any Linux system I build to suit my needs. That is done by editing /etc/systemd/journald.conf and restarting the systemd-journald service.

The normal Raspbian Lite Bullseye image does not use persistent journald storage by default as far as i know. (and i just checked such an image)

Hi. Thank you for all the replies. I understand a little bit more now about how things are working. It seems that the easy answer to the memory useage gradually increasing is an occasional reboot. The SD card gradually filling up is not a problem because it’s a 32 GB version. This is the first image that I have expanded the file system and I’m beginning to wonder if it would have behaved the same if I hadn’t done that and provided the space.
Now I need to look into setting up a chron job to do a reboot every month!
Thanks once again.
John

To the best of my knowledge the filesystem is now expanded automatically, there is still an option to do so in raspi-config but of late it seems to deal with this at some point during installation or reboot.

Trouble is with installations is, unless one does them regularly certain procedures easy to forget.

Geoff

You really shouldn’t need to.
Get the graphs and if something slowly goes up (either disk or memory), just log in via SSH and check:
Memory using the command

htop

Disk using

sudo ncdu /

You might need to install ncdu

sudo apt install ncdu

This way you can find the culprit of what is using memory / disk.
And fix it.

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