example.com
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview
thread

zram

Russell Coker

24 Apr 2013 24 Apr '13
2:55 a.m.

There has been some discussion on luv-talk (which should have been on luv- main) about zram, a system that uses a compressed RAM disk for swap on Linux. I've enabled zram on one of my systems. I ran "free" on all the systems I run and found that only one had any significant swap use, that's a workstation with 8G of RAM and 512M of swap in use. I didn't bother enabling it on any other systems. I added "zram" to /etc/modules (modules that are loaded on boot on Debian). I created /etc/modprobe.d/zram.conf with the following contents: options zram num_devices=2 This gives two devices and it seems that you are expected to have one zram device for each CPU core. I'm not sure if this is really required but it doesn't seem to do any harm. To enable zram on boot I added the following to /etc/rc.local: echo 1073741824 > /sys/block/zram0/disksize echo 1073741824 > /sys/block/zram1/disksize mkswap /dev/zram0 mkswap /dev/zram1 swapon -p 100 /dev/zram0 swapon -p 100 /dev/zram1 The above sets each of the two devices to 1G of storage and enables them as swap space. I haven't yet rebooted the system to make sure that there are no errors in the above, but as it's what I types on the command-line it should work. Also I haven't tested zram extensively. Finally I'm running the Debian/Experimental 3.8 kernel. I don't know how it would work on other kernels. -- My Main Blog http://etbe.coker.com.au/ My Documents Blog http://doc.coker.com.au/

0 0
Reply
Sign in to reply online Use email software

Back to the thread

Back to the list

HyperKitty Powered by HyperKitty version 1.3.12.