Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • infrastructure infrastructure
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
    • Locked files
  • Issues 106
    • Issues 106
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 20
    • Merge requests 20
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Arch LinuxArch Linux
  • infrastructureinfrastructure
  • Merge requests
  • !458

Remove zram size limit and disable zswap when using zram

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Evangelos Foutras requested to merge zram-generator-fixes into master Jul 12, 2021
  • Overview 3
  • Commits 3
  • Pipelines 3
  • Changes 3

Two fixes that I tested and deployed to build.archlinux.org:

zram-generator: Uncap max size of the zram device

Set "max-zram-size = none" to disable this unwanted limitation which
defaulted to creating zram-based swap with a maximum size of 4096MiB.

Fixes: dc8fa2bdfc86 ("common: Replace deprecated systemd-swap[1] with zram-generator")
zram-generator: use systemd-zram-setup@zram0 handler

Restarting swap.target doesn't apply configuration changes; instead we
can restart systemd-zram-setup@zram0 which seems to do what we wanted.

Bonus commit so that zramctl will display useful statistics:

zram: Disable zswap to prevent conflict with zram
    
When both zswap and zram are active, zswap sits in front of zram and
treats it as a backing store. We just want to use zram and not zswap
disguising itself as such; disable the latter so we can enjoy useful
zramctl statistics.
    
Implemented as tmpfiles.d/zram.conf which disables zswap at runtime.
Edited Jul 12, 2021 by Evangelos Foutras
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: zram-generator-fixes