Discussion:
[linux-mm-cc] ramzswap not working
Nitin Gupta
2009-10-05 15:18:42 UTC
Permalink
Hi,
I downloaded the source through mercurial and did a make on Ubuntu 9.04.
There were no compile errors. I followed the readme and installed the modules.
I booted my system with mem=512M.
bobby at lappy:~/compcache$ sudo sub-projects/rzscontrol/rzscontrol
/dev/ramzswap0 --stats
DiskSize: 125076 kB
NumReads: 69
NumWrites: 0
FailedReads: 0
FailedWrites: 0
InvalidIO: 0
NotifyFree: 0
PagesDiscard: 0
ZeroPages: 0
GoodCompress: 0 %
NoCompress: 0 %
PagesStored: 0
PagesUsed: 0
OrigDataSize: 0 kB
ComprDataSize: 0 kB
MemUsedTotal: 0 kB
bobby at lappy:~/compcache$ free -m
total used free shared buffers cached
Mem: 488 482 6 0 51 127
-/+ buffers/cache: 303 185
Swap: 1714 256 1457
Is there anything I am missing??
Looks like you have another swap device which has priority higher than ramzswap.
Check with: cat /proc/swaps
It will show active swaps and their priority.

To set highest priority for ramzswap, do:
swapon /dev/ramzswap0 -p 10
('10' is the priority -- use any number higher than priority of any existing swaps)

As a side note: always reset ramzswap device after you do swapoff:
swapoff /dev/ramzswap0; rzscontrol /dev/ramzswap0 --reset

Thanks,
Nitin

Loading...