• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!
  • Fill out your device list and let everyone know which phones you have!    Edit Your Device Inventory

Cyanogen 4.1.6 - Compcache Disabled - Still taking up RAM - How to free?

Search This thread

andjohn

Senior Member
Apr 22, 2009
318
97
Edmonton
goo.gl
Hello Everyone,
First, I did search. That is how I figured out how to disable compcache and enable the swap. It's working great, however since I am no longer using compcache, I would like to make available the RAM that it is using. Here are my free commands:

BEFORE:
# free
free
total used free shared buffers
Mem: 97928 96356 1572 0 8164
Swap: 24476 15516 8960
Total: 122404 111872 10532

AFTER:
# free
free
total used free shared buffers
Mem: 97928 96416 1512 0 300
Swap: 31768 3092 28676
Total: 129696 99508 30188

Notice that the Physical Memory is still the same number, despite compcache being disabled (well, atleast swapoff'd) Here is my userinit and you can see that it's just enabling the swap.

#!/system/bin/sh
##adb push userinit.sh /system/sd/

uname_r=`uname -r`
moddir=`find /system/modules -type d -name $uname_r`
#insmod=/system/bin/insmod

#$insmod $moddir/compcache/xvmalloc.ko;
#$insmod $moddir/compcache/ramzswap.ko disksize_kb=32768;
#$insmod $moddir/compcache/ramzswap.ko backing_swap=/dev/block/mmcblk0p3;

#mknod /dev/ramzswap0 b 253 0;
echo 20 > /proc/sys/vm/swappiness;

# Experimental settings
#echo 1 > /proc/sys/vm/page-cluster; # default: 3 Changes Page clustering from 8 to 2.
#echo 5 > /proc/sys/vm/laptop_mode; # default: 0 Helps keep SSD from getting worn.
#echo 5000 > /proc/sys/vm/dirty_expire_centisecs; # default: 3000
#echo 800 > /proc/sys/vm/dirty_writeback_centisecs; # default: 500
#echo 10 > /proc/sys/vm/dirty_background_ratio; # default: 5
#echo 16 > /proc/sys/vm/dirty_ratio; # default: 10
#

#swapon /dev/ramzswap0;
swapon /dev/block/mmcblk0p3;

#Over Clock CPU when in use, puts at lower freq when idol. # if you don't want it.
#echo 128000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq;
#echo 528000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq;

QUESTION: Is there any way to re-allocate the compcache section of my physical RAM to be used again? There is that 24476b that I cannot use, as I'm using a swap.

Thanks for your time.
 

ccyrowski

Senior Member
May 20, 2009
1,052
0
Lansing, MI
Hello Everyone,
First, I did search. That is how I figured out how to disable compcache and enable the swap. It's working great, however since I am no longer using compcache, I would like to make available the RAM that it is using. Here are my free commands:

BEFORE:
# free
free
total used free shared buffers
Mem: 97928 96356 1572 0 8164
Swap: 24476 15516 8960
Total: 122404 111872 10532

AFTER:
# free
free
total used free shared buffers
Mem: 97928 96416 1512 0 300
Swap: 31768 3092 28676
Total: 129696 99508 30188

Notice that the Physical Memory is still the same number, despite compcache being disabled (well, atleast swapoff'd) Here is my userinit and you can see that it's just enabling the swap.

#!/system/bin/sh
##adb push userinit.sh /system/sd/

uname_r=`uname -r`
moddir=`find /system/modules -type d -name $uname_r`
#insmod=/system/bin/insmod

#$insmod $moddir/compcache/xvmalloc.ko;
#$insmod $moddir/compcache/ramzswap.ko disksize_kb=32768;
#$insmod $moddir/compcache/ramzswap.ko backing_swap=/dev/block/mmcblk0p3;

#mknod /dev/ramzswap0 b 253 0;
echo 20 > /proc/sys/vm/swappiness;

# Experimental settings
#echo 1 > /proc/sys/vm/page-cluster; # default: 3 Changes Page clustering from 8 to 2.
#echo 5 > /proc/sys/vm/laptop_mode; # default: 0 Helps keep SSD from getting worn.
#echo 5000 > /proc/sys/vm/dirty_expire_centisecs; # default: 3000
#echo 800 > /proc/sys/vm/dirty_writeback_centisecs; # default: 500
#echo 10 > /proc/sys/vm/dirty_background_ratio; # default: 5
#echo 16 > /proc/sys/vm/dirty_ratio; # default: 10
#

#swapon /dev/ramzswap0;
swapon /dev/block/mmcblk0p3;

#Over Clock CPU when in use, puts at lower freq when idol. # if you don't want it.
#echo 128000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq;
#echo 528000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq;

QUESTION: Is there any way to re-allocate the compcache section of my physical RAM to be used again? There is that 24476b that I cannot use, as I'm using a swap.

Thanks for your time.


hahaha, compcache doesn't take up your physical RAM.