Replies: 6 comments 16 replies
-
You can run this via developer SSH or keyboard & monitor to see what uses the SWAP. I got most of the command from here. for file in /proc/*/status ; do awk '/VmSwap|Name/{printf $2 " " $3}END{ print ""}' $file; done | sort -k 2 -n | tail -n50 | column -t Does this actually cause any problems? SWAP usage itself is not necessarily an issue. |
Beta Was this translation helpful? Give feedback.
-
As some crazy things pop up recently, like (within the last hour)
(so @Impact123 answering your
YES, it seems like it creates some (serious) issues meanwhile https://community.home-assistant.io/t/influxdb-restarting/485508/7 So I'd like to urently rule out the 100 % SWAP usage is a root cause for this.
How to make any progress here?Is it maybe a known issue in HA OS 14.2 with Raspberry Pi 5? |
Beta Was this translation helpful? Give feedback.
-
My recommendation is still the same. Set up developer SSH or connect a keyboard and monitor and run my command to see what uses the swap. If you visit the discord server I can help you with that. |
Beta Was this translation helpful? Give feedback.
-
You can find the discord server here: https://www.home-assistant.io/help/#communication-channels |
Beta Was this translation helpful? Give feedback.
-
I just stumbled across this, two comments: @Impact123 - Thanks for that gist, there was a bunch of interesting bits in there. I hadn't see gdu before (was using ncdu) and didn't realize @bcutter - I've had a problem with InfluxDB (via frenck's add-on) in the past where the DB gets too large for the available virtual memory, so it keeps trying to allocate more memory until it fails and exits. The auto-restart on the add-on container just starts the process again. I wasn't able to determine why it was trying to load the whole DB into memory, it might have been trying to recover from an unclean shutdown or the DB just go too big because there was no compaction/resampling/expiration set up by default. Long term statistics came along and I gave up on InfluxDB on Home Assistant. |
Beta Was this translation helpful? Give feedback.
-
Until someone (HA dev/expert) can explain why ...I can add a latest experience and current suspicion: it feels like the Studio Code Server addon might be the root cause. The addon went crazy yesterday when/after using it on few HA Companion app iOS devices (iPhone, iPad) yesterday and the consumed SWAP space went down back to normal once the addon was stopped (started again but not used directly afterwards): Now everything's "normal" again/currently (system): And as you can see, the Studio Code Server addon memory consumption directly correlates with the system SWAP usage: Interestingly I came across a GitHub issue on the addons' behaviour related to memory consumption, but can't find that issue anymore. It's not at https://github.com/home-assistant/addons/issues. But there are other user reports regarding this like https://community.home-assistant.io/t/studio-code-server-add-on-memory-usage/829842 As this is just a (quite likely or based on the data shown above pretty likely) assumption, I still tend to clarify about the |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Since switching hardware from Pi 4 to Pi 5 (NVMe SSD) I noticed HA OS prefers to use almost all available SWAP space instead of using RAM (like before on the Pi 4 with a quite slow disk storage).
In general I am wondering whats the reason for this behavior. I mean there's plenty of disk space and it is quite fast, but also there's plenty of (even faster) RAM available not used at all.
During nightly backup it uses even all available SWAP space (100 % usage).
HA OS 14.2.
Beta Was this translation helpful? Give feedback.
All reactions