Unfortunately no one can be told what fun_plug is - you have to see it for yourself.
You are not logged in.
Hi all!
I am successfully running funplug from USB. But sometimes I see that system is heavy loaded (transmission, smbd, lighthttpd) and top shows memory ussage like 150 %.
Does this means, that RAM is taken from SWAP partition on HDD? If yes is it possible to move SWAP partition to USB as well?
Maybe it is stupid question - if yes please tell me :-)
Gyngy
Offline
You can move swap to USB stick. Create a big file on the stick, convert it to swap, and use it:
dd if=/dev/zero of=/mount/path/of/stick/swapfile bs=4k count=32k # 128MiB mkswap /mount/path/of/stick/swapfile swapon /mount/path/of/stick/swapfile
Now you can switch off your disk-swap.
# find the swap cat /proc/swaps swapoff /dev/sda?
You'll have to repeat the swapon/swapoff on each boot.
Another option is to give the swap-on-usb a higher priority. in that case you don't need to switch off the disk-swap. It will be used only if the usb-swap is full.
swapon -p 10 /mount/path/of/stick/swapfile
Keep in mind that using flashmemory as swapspace will damage your stick, sooner or later. So keep your backup of your stick up-to-date. (It's not too dramatically. I had Debian running from stick for a year, with swap on stick, and normal logfiles on. The stick still lives, but it's very slow in writing.)
Last edited by Mijzelf (2011-10-22 13:36:14)
Offline
Thank you,
my DNS-320 is not equipped by debian so I hope this procedure will work for D-links linux distribution as well!
Gyngy
Offline
Mijzelf thank you!
It is working like a charm. I know about USB stick limitation about read/write cycles.
I am thinking about using one USB stick for funplug and one (old one) for swap.
BTW, DNS-320 is creating 512 MB raid 1 partitions on HDDs where swap (/dev/md0) is located.
Best regards!
Tomas
Offline
Hi,
the DNS320 does also create a swap with only one drive? Or is it possible to create one after the setup by hand?
Regards
Offline
@ SerpensAlatus
Yes and yes.
1. standard swap is created by system as raid 1 block on discs while initializing new HDD in system. If there is only one drive then it will be same RAID array but degraded.
2. you could turn off swap (swap off) and turn it on only on one disc (swapon /dev/sda1)
Gyngy
Offline