swap file question

This forum is for Marvell Kirkwood devices such as the GoFlex Home/Net, PogoPlug v1/v2, SheevaPlug, and ZyXEL devices.

swap file question

Postby rflores2323 » Fri Feb 01, 2013 3:42 pm

Total newb here. I have a pogo plug E02 running alarm a 8gb usb stick. I thought I made a swap file by doing the below on a how to however how do I check if its working or not.

$this->bbcode_second_pass_code('', 'dd if=/dev/zero of=/swapfile.img bs=1M count=512
mkswap /swapfile.img
swapon /swapfile.img
echo "/swapfile.img none swap sw 0 0" >> /etc/fstab')

I checked my file structure via cyberduck and I do have a swapfile.img (512 mb) on my usb stick.

I ran some commands also to check the swap.

$this->bbcode_second_pass_code('', '[root@alarm ~]# cat /proc/meminfo
MemTotal: 252476 kB
MemFree: 21788 kB
Buffers: 20836 kB
Cached: 20840 kB
SwapCached: 0 kB
Active: 184364 kB
Inactive: 32696 kB
Active(anon): 175724 kB
Inactive(anon): 44 kB
Active(file): 8640 kB
Inactive(file): 32652 kB
Unevictable: 0 kB
Mlocked: 0 kB
SwapTotal: 0 kB
SwapFree: 0 kB
Dirty: 2588 kB
Writeback: 3736 kB
AnonPages: 175440 kB
Mapped: 4464 kB
Shmem: 332 kB
Slab: 8572 kB
SReclaimable: 3756 kB
SUnreclaim: 4816 kB
KernelStack: 864 kB
PageTables: 1916 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
WritebackTmp: 0 kB
CommitLimit: 126236 kB
Committed_AS: 604208 kB
VmallocTotal: 753664 kB
VmallocUsed: 644 kB
VmallocChunk: 752928 kB
[root@alarm ~]# cat /proc/swaps
Filename Type Size Used Priority
[root@alarm ~]# swapon -s
[root@alarm ~]# swapon -s
[root@alarm ~]# free -m
total used free shared buffers cached
Mem: 246 241 5 0 30 26
-/+ buffers/cache: 184 62
Swap: 0 0 0
[root@alarm ~]# free
total used free shared buffers cached
Mem: 252476 247896 4580 0 23164 27584
-/+ buffers/cache: 197148 55328
Swap: 0 0 0

[root@alarm ~]# ')
Last edited by rflores2323 on Fri Feb 01, 2013 3:54 pm, edited 1 time in total.
rflores2323
 
Posts: 17
Joined: Wed Nov 23, 2011 4:39 pm

Re: swap file question

Postby rflores2323 » Fri Feb 01, 2013 3:49 pm

ok one of the things I did was turn it on.. since it looks like it was not on... So not it shows some some output on the swap.

$this->bbcode_second_pass_code('', '[root@alarm ~]# swapon /swapfile.img
[root@alarm ~]# free
total used free shared buffers cached
Mem: 252476 221344 31132 0 14004 14920
-/+ buffers/cache: 192420 60056
Swap: 524284 17992 506292
[root@alarm ~]# ')

Does this turn on automatically after a reboot?

I added this to my fstab
/swapfile.img none swap sw 0 0
rflores2323
 
Posts: 17
Joined: Wed Nov 23, 2011 4:39 pm

Re: swap file question

Postby Obihoernchen » Fri Feb 01, 2013 4:10 pm

Putting a swap file on USB flash media is a VERY BAD idea, as it may be written to many times, wearing out the drive's limited write cycles.

Don't do that!
On top of that the E02 has 256MB RAM and this should be enough.
If you need swap make a swap partition on a HDD.
Last edited by Obihoernchen on Fri Feb 01, 2013 4:13 pm, edited 1 time in total.
Visit my Blog for Pogoplug guides
Obihoernchen
 
Posts: 17
Joined: Thu Jan 31, 2013 3:17 am
Location: Germany

Re: swap file question

Postby rflores2323 » Fri Feb 01, 2013 4:13 pm

ahhh ok. I will disable it then. Thanks

one of the reason I thought to enable the swap was that I am getting DL speeds of 1Mb instead of 3Mb which I used to get.
rflores2323
 
Posts: 17
Joined: Wed Nov 23, 2011 4:39 pm


Return to Marvell Kirkwood

Who is online

Users browsing this forum: No registered users and 441 guests