RPI5 - Swap file size becomes 0 only when fresh boot

I noticed that every time HA restarts (not reboot but restart) the swap file increase size…

If I shutdown entirely HA/RPI5 and then boot I see that swap file becomes 0 and it remains at 0 until I reboot HA (eg after a Core update) when it increase size (at every reboot)

Is it all normal ?

The startup script sets the SWAP size depending on physical memory available. However, it should stay at that higher value from then onwards (unless you clear it manually).

If it clears by itself that might be a bug, in that case report it to the Home Assistant OS issue tracker.

A restart of HA core only restart the HA core docker container.
The underlying OS where the swap partition is handled is not restarted.

Update:
For the 1st time from when I started to notice this behavior, after the latest (today) Core update (2025.3.1) and subsequent restart, the swap file remained at 0
Very strange

And now again 100Mb of swap files (before it was 0) after latest Core update and subsequent restart