I'm trying to get the swap file working for the first time. I'm posting my configuration and what I see in SSH. Please let me know what I can do to get it working? By the way, I'm new to all this. The warning, "Be aware that swapping data is a very slow process as the swap-device cannot be accessed with the high datarates of the RAM", makes it seem not worth it.
Before you go down this route, is swap actually necessary for your setup?
ubus call system board
free
df -h
yes I agree. I'm new and trying to figure out where to put my resources. I'm installing a bunch of software and I have some space left on my router. I may not install anything else and I don't really need a headache. I'll wait until I get closer to running out of space.
You never answered your goals in your other thread about deleting software. Maybe you should tell us specifically what you are trying to achieve and what device you are using.
I will do that there; thank you.
You generally don't want swap on 'any' system, not just OpenWrt, it's always a kludge, a -bad- workaround for insufficient RAM and better best avoided. In many cases, it's even better to let things fail/ break, than to cope with the slowdown of swap being in active use. But you always want (more than-) 'enough' RAM for your envisioned usage scenario, fortunately these days you can choose such devices at a reasonable cost.
Relevant for OpenWrt:
- the internal flash is too small for swap anyways
- the internal flash will wear and break, if used as swap, so swapping must happen on better suited, faster and more durable, external -removable- media
--
zram is a special case, but wouldn't be my favourite either.
Try to post text next time
You are not under memory pressure, it is like half used, but more than default/typical setup -> what additional packages you installed?
First effort at swapping would be zram-swap
package that compresses parts of memory, adding a bit RAM at the cost of small slowdown.
And then you know you need bigger router without crashing overly filled old one.
Swap to USB drive will be slow and make your system unstable on its own. Typical USB drive is not fit for continuous heavy duty usage.
I'm not going to use the Swap at all, ever. I'll get a new router first.
Currently you have no problem. I am just suggesting compressed memory swap as safety net for the case you start running out of RAM. What you see is disk cache taking otherwise unused RAM, shich will be freed as other need arises.