[HOWTO] install compcache configuration/status tool: rzscontrol

Search This thread


Senior Member
Dec 7, 2009

For those of you who have compcache on their ROMs enabled: Maybe you noticed that in previous versions of compcache there used to be a special file in /proc from which you could read stats about compcache and its usage (by simply doing "cat /proc/ramzswap").

In newer version this has been removed in favour to a userspace tool for the commandline named "rzscontrol". Some ROMs may have already included it. I missed it on my ROM so I grabbed the current sources from http://code.google.com/p/compcache/ and compiled it against Android 2.1 tree.

If you want to install it:
Attached you find 2 zip-files for 2 alternate ways of installing it:

METHOD 1: Install manually with ADB:

The file "compcache-rzscontrol_just-binary.zip" just contains the compiled binary. Unzip the file and perform the followinf steps to install it manually:
adb remount
adb push rzscontrol /system/xbin/
adb shell chmod 0755 /system/xbin/rzscontrol
That's all.

METHOD 2: Install as update.zip via recovery:

Download the other zip-file "update-install-compcache-rzscontrol-signed.zip". Place it in root of your sd-card, reboot into recovery and apply it as update.zip.

The result is the same for both ways.

After you installed it, you can test it (of course you need to have compcache enabled):

adb shell rzscontrol /dev/block/ramzswap0 --stats
This should produce output similiar to this:
DiskSize:	   65536 kB
NumReads:	     214
NumWrites:	     919
FailedReads:	       0
FailedWrites:	       0
InvalidIO:	       0
NotifyFree:	       0
ZeroPages:	      37
GoodCompress:	      62 %
NoCompress:	       5 %
PagesStored:	     882
PagesUsed:	     385
OrigDataSize:	    3528 kB
ComprDataSize:	    1329 kB
MemUsedTotal:	    1540 kB

Of course you can do much more with this tool. It enables you to configure your compcache blockdevice and other things. For full manpage look here: Manpage of rzscontrol on compcache.googlecode.com

Have fun! :)


  • compcache-rzscontrol_just-binary.zip
    6.5 KB · Views: 564
  • update-install-compcache-rzscontrol-signed.zip
    8.6 KB · Views: 594


Senior Member
Dec 7, 2009
Hi again! :)

For those of you who have "GScript" or "GScript Lite" installed (free app from the Market which allows you to start shell-scripts simply on your phone):

I made a script for gscript, which allows you to start rzscontrol and print out the compcache stats with one touch.

  • Unzip the file.
  • Place it on your scard into the folder "gscript".
  • Run GScript Lite and select "Add script" from the menu.

Enjoy! :)


  • compcache_status.zip
    278 bytes · Views: 217


Inactive Recognized Developer
Sep 29, 2009
hehe this is already implemented in VR6.1... my own work though, i did the same what you did two days ago. also included will be a script to turn on and off compcache on the fly :)


I ran your code with GScript, and I have this error:

Failed to open /dev/block/ramzswap0: No such file or directory

Edit: I guess I don't have compcache in my ROM then.
Last edited:


Senior Member
Oct 27, 2006
My question is , why does (my own compiled, ahem) rzscontrol crash / coredump / segfaul when I try to give the initial size on the command line. According to the help-output my version only supports --init, and if I give any other one, it crashes. This way I don't really have control over my ramzswap on Androbin. With 'free' I can see swap active and it's being full (so it helps I think :)) but more is impossible.

While I'm typing this: I compiled compcache and rzscontrol from the version in Cyanogen's github, maybe I should try the official site version :)
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone