zram and zswap missing in linux-image-4.0-1.dmz.1-liquorix-amd64
Jos.v.W.
Status: Contributor
Joined: 25 Jan 2011
Posts: 57
Reply Quote
Hi damentz,
Why are zram and zswap no longer configured in 4.0-1.dmz.1-liquorix-amd64?
I need them!
Back to top
damentz
Status: Assistant
Joined: 09 Sep 2008
Posts: 737
Reply Quote
I disabled them thinking they contributed to the stalls that braveheartleo was affected by. However, after reading the description and reading some feedback, they look safe to keep enabled.

For example, zswap only compresses to swap partitions and zram has to be enabled specifically by the user. Since swap is normally slow, it should cause the system to stall _less_ due to the compression reducing the total number of bytes needed to write to disk, easily by a factor of 2. As for zswap, that's up to user discretion, so it was not my business to disable it.

Next release should have zswap and zram restored.
Back to top
Jos.v.W.
Status: Contributor
Joined: 25 Jan 2011
Posts: 57
Reply Quote
:: Quote ::
Next release should have zswap and zram restored.

Thanks!
I use them to avoid swapping to disk.
Back to top
windseeker
Status: Interested
Joined: 08 Mar 2016
Posts: 13
Reply Quote
:: Quote ::
Next release should have zswap and zram restored.


It seems it's still not or not completely restored. Even with latest 4.5 I still get the messages in kern.log:

:: Code ::
Apr 17 07:40:47 windseeker kernel: zswap: default zpool zbud not available
Apr 17 07:40:47 windseeker kernel: zswap: pool creation failed


As far as I understand, this is really important for SSDs to reduce wear when swap is used. In my case this happens quite often due to some demanding build tasks
Back to top
zika
Status: Interested
Joined: 02 Apr 2012
Posts: 28
Reply Quote
:: windseeker wrote ::
:: Quote ::
Next release should have zswap and zram restored.


It seems it's still not or not completely restored. Even with latest 4.5 I still get the messages in kern.log:

:: Code ::
Apr 17 07:40:47 windseeker kernel: zswap: default zpool zbud not available
Apr 17 07:40:47 windseeker kernel: zswap: pool creation failed


As far as I understand, this is really important for SSDs to reduce wear when swap is used. In my case this happens quite often due to some demanding build tasks
Try with
:: Code ::
zswap.zpool=zsmalloc
in kernel boot line.
Back to top
windseeker
Status: Interested
Joined: 08 Mar 2016
Posts: 13
Reply Quote
:: zika wrote ::
Try with
zswap.zpool=zsmalloc
in kernel boot line.


Thank you, zsmalloc seems to let zswap activate just fine. But after reading into this topic, it seems that zsmalloc has some drawbacks that outweight its benefits. It has stronger compression, but may lead to I/O delays and additionally it has no LRU logic to reclaim freed pages. So with time it just fills up until it just rejects new pages, which is fatal for systems with high uptime.

Because of this, zbud is the default pool that is being tried without any kernel parameters given.

Source: https://lwn.net/Articles/549740/

The article is quite old in IT measures, but since zbud is still default, it seems the devs still don't consider zsmalloc mature enough yet.

So I would propose including the zbud allocator again for the time being. People preferring szmalloc allocator can still choose it from kernel boot parameters, like they need to do now anyway. This way we have a safe default for the growing number of SSD users and more importantly we have options where we now have none (okay, we can choose between zsmalloc and no zswap at all, but you know what I mean)

What do you think?
Back to top
jblake
Status: New User - Welcome
Joined: 24 Apr 2016
Posts: 1
Reply Quote
I had similar problems getting zswap to work and eventually found a solution on a Russian language website. I needed to add the required modules to /etc/initramfs-tools/modules (below) and run 'update-initramfs -u -k all'.

I think the problem was that the modules needed to get loaded early during boot. I'm using lz4 compression and you might need to change this to suit your own preference.

:: Code ::
# List of modules that you want to include in your initramfs.
# They will be loaded at boot time in the order below.
#
# Syntax:  module_name [args ...]
#
# You must run update-initramfs(8) to effect this change.
#
# Examples:
#
# raid1
# sd_mod
lz4
lz4_compress
zbud

Back to top
Display posts from previous:   

All times are GMT - 8 Hours