I dug out my old Asus Zenbook (UX305CA) and refurbished it: gave it a good cleaning, replaced the thermal paste, installed a new battery, upgraded the SSD, and did a clean install of Ubuntu 24.04 (don’t judge; everything else in my house is still Debian and/or OpenWRT).

The only thing I can’t upgrade is the memory since it’s soldered on. It’s got 8 GB which hasn’t really been a limit given my use cases, but since I’m in upgrade mode, I was thinking of running it with zram configured.

I just setup zram and gave it 50% of the physical memory as a starting point, set vm.swappiness to 140, and am using zstd as the compression algorithm.

Haven’t noticed much difference, so there doesn’t seem to be much CPU performance penalty even on this low-spec CPU (base clock 900 MHz lol). zramctl shows it’s got 726 MB swapped to it currently which is compressed to 126 MB. Not bad! The only thing I haven’t done yet is set the power profile to “Power Saver” - if there are going to be noticeable performance penalties, that’s probably when it will show up.

I’ve only ever used zram on Raspberry Pis and on an old netbook, so I’m not sure if using it on a machine with an otherwise usable amount of RAM is even worth it.

Thoughts and/or suggestions for a better config?

  • vividspecter@aussie.zone
    link
    fedilink
    arrow-up
    3
    arrow-down
    1
    ·
    edit-2
    15 hours ago

    I go even further and set the proportion to 100%, since ZSTD compresses so well (and the % is based on uncompressed usage).

    There are theoretically some cases where zram can be harmful, but in general I find it works reliably.

    • Admiral Patrick@dubvee.orgOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      15 hours ago

      Yeah, I’m still tweaking things and just kindof came to the same conclusion I need to bump it up.

      I was assuming that it thick-allocated the RAM for the compressed swap block device, but it seems to be dynamic now that I’ve read deeper into it. I just bumped it from 50% to 350% (basically one extreme to another).

      • Rimu@piefed.social
        link
        fedilink
        English
        arrow-up
        3
        ·
        edit-2
        15 hours ago

        On my 8 GB laptop I had it at 100% for a while and it slowed my laptop down a lot. At 50% it’s much happier.

        I can’t remember the compression method, ymmv