In view of the ongoing DRAM shortage, it would be very useful to be able to configure a zram swap device, as the swap is quite small on IncusOS and there does not seem to be a way to increase it. By allocating a large zram device for swap we can effectively increase the available memory at the cost of some CPU cycles, which could be a worthwhile tradeoff for many use cases where the server runs a lot of services that are largely idle or IO bound.
Reference: https://wiki.archlinux.org/title/Zram
It is the default setup on many distros, like Fedora and Arch when using the installer. At a minimum it is much faster than any type of disk swap currently being used.
Suggested configuration options:
- zram_compression_algorithm
- zram_size
P.S. It may also be useful to use this facility as a generic block device by creating new zram devices for use in VMs.
In view of the ongoing DRAM shortage, it would be very useful to be able to configure a zram swap device, as the swap is quite small on IncusOS and there does not seem to be a way to increase it. By allocating a large zram device for swap we can effectively increase the available memory at the cost of some CPU cycles, which could be a worthwhile tradeoff for many use cases where the server runs a lot of services that are largely idle or IO bound.
Reference: https://wiki.archlinux.org/title/Zram
It is the default setup on many distros, like Fedora and Arch when using the installer. At a minimum it is much faster than any type of disk swap currently being used.
Suggested configuration options:
P.S. It may also be useful to use this facility as a generic block device by creating new zram devices for use in VMs.