Btw, a tmpfs does not reserve the RAM, but uses it only on demand. There are multiple other tmpfs mounts (df -h) with a summed size larger than total RAM, which is totally fine as they never actually fully use that size concurrently. I recommend to leave the /tmp size as it was (50% of RAM + swap), especially on low RAM devices. Otherwise dietpi-software installs might fail, which often download and extract to, sometimes compile in /tmp tmpfs to reduce disk writes.
Very interesting :-
I have disables swp and htop shows me this:
I wonder what it means as it did not change when I decrease tmpfs in fstab. This looks quite crouded to me so I tried to decrease tmpfs.
On the other hand cat /proc/meminfo gives me an inactive space of 650MB but only a free space of 79MB while running my software. I fear the 79MB might not be enough in the long run. And what is the difference between free and available
Would you please explain that to me so I will get a bit smarter?
Linux uses available memory to cache reads and writes from resp. to filesystem, to speed those up and reduce actual disk I/O. These are the blue (buffer) and yellow (cache) parts of the memory usage bar in htop. So it’s expected to be nearly full, hence “MemFree” very low. Important is only that “MemAvailable” is sufficiently large resp. the green part of the bar not too large on common usage.
The size of any tmpfs has no effect on RAM usage as long as you do not actually store files into them to use that space.