zRam and Swapspace

Liam Proven lproven at gmail.com
Mon May 20 13:49:38 UTC 2013


On 19 May 2013 20:41, Tom H <tomh0665 at gmail.com> wrote:
> Does hibernation work with swapspace but without sram?

OK, after a little more experimentation, the quick answer is "no".

The longer answer:

Hoping that, in the immortal words of the Haynes manuals for many a
vehicle, "assembly is the reverse of disassembly", I tried to
uninstall zRam by just doing `apt-get remove zram-config`.

This didn't work. At the moment I did it, the extra swap space
disappeared - I was watching the output of `top` in an xterm - but on
reboot it reappeared.

Some Googling suggested an entry in /etc/init.d. There wasn't one. But
I did find a config file, zram-config or something like that, in
/etc/init/config. I removed that, rebooted, and zRam was gone.

Now, the system has just the slightly-under 0.5GB of swap currently
provided by `swapspace`. (This does not seem to have shrunk, oddly,
after quitting all my memory-hogging tasks and rebooting.)

However, as the VM now has less swap than RAM, it won't hibernate any
more. Attempting results in the screen going black, then immediately
resuming.

My conclusion is that the demand-based swap files provided by
`swapspace` - being normally less than the amount of system RAM unless
under heavy load - are insufficient for hibernation support and the
system is not "smart" enough to quickly grow the swapfiles to the
required size when hibernating.

Shame, but hibernation is not something I use on desktops, and my
desktop machines these days all have lots of RAM as it's quite cheap
now. (And they usually have multiple DIMM slots.)

Notebooks have less RAM expansion, the RAM is dearer, and hibernation
is often useful on them, thus they have more use for permanent swap
partitions and less need for swapspace.

I might make it my default config from now on for desktops, though. :¬)

-- 
Liam Proven • Profile: http://lproven.livejournal.com/profile
Email: lproven at cix.co.uk • GMail/G+/Twitter/Flickr/Facebook: lproven
MSN: lproven at hotmail.com • Skype/AIM/Yahoo/LinkedIn: liamproven
Tel: +44 20-8685-0498 • Cell: +44 7939-087884




More information about the ubuntu-users mailing list