Skip to content

Option to use zram swap #1157

@strawberry192

Description

@strawberry192

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions