Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable Zswap #253

Open
foldfree opened this issue Nov 24, 2024 · 0 comments
Open

Enable Zswap #253

foldfree opened this issue Nov 24, 2024 · 0 comments

Comments

@foldfree
Copy link

foldfree commented Nov 24, 2024

Marcan is recommending to use Zswap instead of Zram for devices that have under 24gb of ram because unified memory is conflicting with zram. See this reddit announcement

Below is a way to add zswap using theses settings as a reference:

./configuration.nix

  boot = {
    kernelParams = [
      "zswap.enabled=1"
      "zswap.compressor=zstd"
      "zswap.zpool=zsmalloc"
      "zswap.max_pool_percent=50"
    ];
  };

./hardware-configuration.nix

 swapDevices = [ {
    device = "/var/lib/swapfile";
    size = 16*1024;
  } ];

There might be a seamless solution via AppleSiliconsupport flake, though this is outside my area of expertise. Currently, Fedora Asahi uses LZ0 compression, but since zstd is already enabled in asahi-nixos kernel, I opted to use that instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant