- Status Closed
- Percent Complete
- Task Type Feature Request
- Category Core
- Operating System Release 2 (.next)
- Severity Low
- Reported Version Hotfix 6
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
Loading...
Available keyboard shortcuts
- Alt + ⇧ Shift + l Login Dialog / Logout
- Alt + ⇧ Shift + a Add new task
- Alt + ⇧ Shift + m My searches
- Alt + ⇧ Shift + t focus taskid search
Tasklist
- o open selected task
- j move cursor down
- k move cursor up
Task Details
- n Next task
- p Previous task
- Alt + ⇧ Shift + e ↵ Enter Edit this task
- Alt + ⇧ Shift + w watch task
- Alt + ⇧ Shift + y Close Task
Task Editing
- Alt + ⇧ Shift + s save task
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...
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