Fahmi, zram and swap are two different things, the first is used to compress ram pages while the second is used to store such pages on local drive and free up avalaible ram.
It should be this.
Fahmi1597 (19-12-12)
Fahmi1597 (19-12-12)
If it shows zero no swap is enabled. Also to enable it in the 07setvm script you must modify the partition number. I use 03, you use 02.
Not quite. zRAM are compressed RAM disks/devices. One can choose how to use them. As a partition for volatile file system or as a swap partition. Such choice are made "by hand", first creating the zRAM devices, formatting them depending on how we want to use them and then enabling them for their purpose. I use the zRAM in 07setvm only as a swap partition, so at the end it has the same exactly functionality of the flash swap partition.
Honestly I am against the flash Linux partition. Unless someone finds the right tuning values it may slow down the phone dramatically. It is there just for people that want to experiment it. To use the zRAM as a Linux swap it is much better. It steals RAM but it makes more than twice of the stolen RAM available as a very fast swap device. So the trade off should be positive. Still, more application one allows to run, and higher is the battery drain. I don't know if it is worth it.
Fahmi1597 (19-12-12)
################################################## ###########
# zRAM module
#
if [ -z $ENABLE_ZRAM ] || [ ! "$ENABLE_ZRAM" = "ON" ]; then
#
# Swappiness wouldn't really matter. Just set it to zero
#
echo 0 > /proc/sys/vm/swappiness
#
# Set memory manager minfree (in 4KB pages)
#
echo "1024,2048,3072,21000,22000,23000" > /sys/module/lowmemorykiller/parameters/minfree
#
log -p i -t setvm "zRAM is not enabled"
else
#
# Set Swappiness. Use value >0 if zRAM is enabled. Not too high
# Higher the number, higher the swap activity (theoretically...)
#
echo 40 > /proc/sys/vm/swappiness
#
# Set memory manager minfree (in 4KB pages)
#
echo "1024,2048,3072,24000,25000,26000" > /sys/module/lowmemorykiller/parameters/minfree
#
# Load kernel's zRAM modules
insmod /system/lib/modules/lzo_compress.ko
insmod /system/lib/modules/lzo_decompress.ko
insmod /system/lib/modules/zram.ko
#
# enable zRAM. disksize is in bytes
#
if [ ! -e /sys/block/zram0/disksize ]; then
log -p e -t setvm "Something went wrong. zRAM modules not loaded by the kernel!!"
else
echo $(($zram_size*1024*1024)) > /sys/block/zram0/disksize
mkswap /dev/block/zram0
swapon -p 100 /dev/block/zram0
log -p i -t setvm "zRAM is enabled. Current status of swap areas:"
log -p i -t setvm "$(cat /proc/swaps)"
fi
fi
#
# End of zRAM section
################################################## ###########
i don't find to mmcblk0p3, where i can change it? in linux swap section?
sorry, i'm too newb about zram ._.
Fahmi1597 (19-12-12)
Scusate il doppio post, ma è per non mescolare inglese e italiano.. Ragassi.. io ho provato a togliere il tuning della minfree in 07setvm.. Mi si è mezzo bloccato il telefono!!! Troppe applicazioni attive, CPU al 100% a nastro. Poi l'ho tolto abilitando la zRAM.. e ciao. Proprio non si muoveva. Sempre in I/O, forse a causa dello swapping con la zRAM.
Sicuri che eliminando 07setvm vi funzioni meglio?
Mah… Onestamente mica è ben chiaro come funzioni la gestione della RAM in Android. Perché prima c'è la gestione della RAM fatta dal kernel, poi sopra c'è quella per chiudere le applicazioni quando la RAM libera è inferiore ai valori stabiliti da minfree. Aggiungici che è pure possibile attivare le partizioni swap e… buonanotte.
A me infatti funziona meglio con minfree settato in 07setvm. Il fatto che più applicazioni siano presenti allo stesso tempo dovrebbe comportare un maggiore uso di CPU, e quindi un ovvio rallentamento. Monitorando con "top" da shell la cosa è pure confermata. Anche se qui di ovvio c'è ben poco.