OpenPandora Main OS

  • Status Closed
  • Percent Complete
    100%
  • Task Type Feature Request
  • Category Core
  • Operating System Release 2 (.next)
  • Severity Low
  • Reported Version Hotfix 6
Attached to Project: OpenPandora Main OS
Opened by Ivanovic - 09.04.2012
Last edited by EvilDragon - 06.05.2013

FS#276 - Kernel 3.2.x: add script to activate zram

Please add a script to activate zram (RAM compression) when using the new kernel. More info about how to do this is available in this post:

http://boards.openpandora.org/index.php?/topic/7844-superzaxxon-beta-3-released/#entry138834
http://boards.openpandora.org/index.php?/topic/7226-superzaxxon-beta-11-released/page__st__20#entry128665

Please be aware though that Linux-SWAT had to explicitly set a value in "/sys/block/zram0/disksize" to get it work with Slackware. Over here the following is automatically set:
pandora:~$ cat /sys/block/zram0/disksize
61648896

Sadly I can *not* change this value, even using sudo:
pandora:~$ ls -l /sys/block/zram0/disksize
-rw-r--r-- 1 root root 4096 Apr 9 12:51 /sys/block/zram0/disksize
pandora:~$ cat /sys/block/zram0/disksize
61648896
pandora:~$ sudo echo 61648888 > /sys/block/zram0/disksize
-bash: /sys/block/zram0/disksize: Permission denied

Basically the following commands are required in a startup script to automatically create the "compressed swap inside RAM" aka zram (possibly a check if the modprobe was successful makes sense as well as checking for the size of the created ramdisk):

modprobe zram
mkswap /dev/zram0
swapon -p 5 /dev/zram0

Closed by  EvilDragon
06.05.2013 01:20
Reason for closing:  Implemented
Admin

Added for SuperZaxxon Beta 4.
Needs to be tested.

Please make sure to check on your system if zram is really active and how large it is. Just call "free" in a terminal after booting when zram should have been activated. DJWillis mentioned that he explicitly has to set a value for the size while this is not required on my system. Don't ask me why that is the case though...

Admin

Not sure how Ed has configured this in SZ as I added it as a systemd control task to the oe-core based metadata (.next stuff).

https://github.com/openpandora/meta-openpandora-vendor/blob/master/recipes-core/systemd/zram-service/load-zram.sh also shows the calculation used to set the level of zram swap.

John

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing