[pve-devel] [Bug 1484] RFC: Improve swap support (zswap, zram & etc)

Timofey Titovets nefelim4ag at gmail.com
Tue Aug 22 13:14:15 CEST 2017


2017-08-22 12:58 GMT+03:00 Eneko Lacunza <elacunza at binovo.es>:
> Hi Timofey,
>
> El 22/08/17 a las 11:45, Timofey Titovets escribió:
>>
>> Hi list,
>> By suggestion from: Fabian Grünbichler,
>> i try open topic on the dev list.
>>
>> So, my suggestion (copy paste from issue):
>> since 3.11 kernel Linux support zswap, and since 3.15 kernel linux support
>> zram.
>>
>> (i'm a creator of https://github.com/Nefelim4ag/systemd-swap)
>> What i can suggest (That just IMHO):
>>
>> - Enabling Zswap along with z3fold in kernel build, can make life
>> easier for your customers
>>    Zswap is a compressed cache between RAM and SWAP device
>>    z3fold it's a successor of zbud and can compress 3 pages in 1, in
>> compare to zbud 2 in 1 (z3fold disabled by default)
>>
>> - Also that's will be cool if you add some info in Host status about
>> zswap efficiency
>>    i.e. how many swap stored in zswap in compare to physical swap devices
>>   (i'm already made that, so you can try do something like that:
>>
>> https://github.com/Nefelim4ag/systemd-swap/commit/83142e4903df02df4498f782cdaabda72f43b491)
>>
>> Also you can adopt systemd-swap if you wish, like you do with ksmtuned
>>
>> So i glad to hear some opinion from proxmox dev's,
>> because you can know your customer cases,
>
> I'm not a Proxmox developer myself, but didn't know these technologies,
> which are quite interesting.
>
> I have found problems in the past with Linux kernel swaping too much under
> cache pressure, causing severe performance problems; what I have done on
> those cases is to turn off swap. Also on newer installations I only set an
> small swapping area, usually 1GB instead of the 4GB that creates proxmox
> installer. On each new installation I think I really could turn off swap
> altogether... :) Once you start swapping, a virtualization server's
> performance degrades too much to be usefull at all on my experience.
>
> I see that in wikipedia zram and zswap articles refer to low resource
> computers; would those technologies be really usefull for a virtualization
> server?
>
> Thanks
> Eneko
>

Zswap can make live with swap more easy, because of "most data" in
theory of course will ba cached in compressed cache and will not
writen to slow disk.

Zram, can do same thing, but it's more like "compressed ram cache",
because disk not used for swap.

As example VMware have "Memory compression" as one of the technique
for memory overcommiting.
And Zram + swap can close that "gap".

In my opinion for virtualization 2 ways can be usefull:
1. Zram + swap of course
(i personally don't like zram+swap, but it's only my unreasonable
opinion, because it's work)
And that can be backed by disk swap.
2. Zswap + chunked on disk swap (i've implement that in systemd-swap)

Thanks.

-- 
Have a nice day,
Timofey.



More information about the pve-devel mailing list