OpenWrt Forum Archive

Topic: Swap usage

The content of this topic has been archived on 14 Mar 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

I'm using my WGT634u as a file server.  However, I've run into a problem trying to use rsync to backup my data.

When running rsync, the WGT634U runs out of memory.  I enabled a swap partition on the attached hard drive.  The swap is correctly started and shows correctly both in free and /proc/meminfo.  However, practically no swap is ever used (<30KB), even when the router runs out of memory.

I figured that kernel memory may not all be swappable, so I'm running userspace daemons (NFS, SAMBA, rsyncd), thinking they would be swappable.  This doesn't seem to help, though, since swap is not being used.

What needs to happen for memory to be swapped out?

Swap priority, maybe?

If you are using trunk, you should be able to use /etc/config/fstab to configure a swap. Requires the swap-utils package to be installed on your router.

The discussion might have continued from here.