Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

agnos.is Forums

  1. Home
  2. Linux
  3. Multi-Gen LRU is a game changer on my low memory netbook

Multi-Gen LRU is a game changer on my low memory netbook

Scheduled Pinned Locked Moved Linux
linux
10 Posts 3 Posters 0 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • W This user is from outside of this forum
    W This user is from outside of this forum
    [email protected]
    wrote on last edited by
    #1

    MGLRU.

    On my low RAM/CPU netbook it is a game changer; thanks to ZRAM the netbook is perfect for browsing the internet/light work. When running my backups (creates big tarballs) or Ansible though, my desktop/applications would freeze/stutter noticeably.
    Enabling MGLRU simply solved the problem of freezes/stuttering, it feels like magic and besides ZRAM, I don't know of any other lever with this massive impact on desktop performance.

    Just wanted to share this, for other users with low RAM/CPU hardware. I would assume the observed difference is less dramatic, once 8GB of RAM are available, but I would love to hear about other experiences.

    I would also love to hear/learn about other levels with high impact to tweak for low RAM/CPU desktop devices. Anything else to tweak under /sys /proc which has impact on performance?

    G 1 Reply Last reply
    1
    0
    • System shared this topic on
    • W [email protected]

      MGLRU.

      On my low RAM/CPU netbook it is a game changer; thanks to ZRAM the netbook is perfect for browsing the internet/light work. When running my backups (creates big tarballs) or Ansible though, my desktop/applications would freeze/stutter noticeably.
      Enabling MGLRU simply solved the problem of freezes/stuttering, it feels like magic and besides ZRAM, I don't know of any other lever with this massive impact on desktop performance.

      Just wanted to share this, for other users with low RAM/CPU hardware. I would assume the observed difference is less dramatic, once 8GB of RAM are available, but I would love to hear about other experiences.

      I would also love to hear/learn about other levels with high impact to tweak for low RAM/CPU desktop devices. Anything else to tweak under /sys /proc which has impact on performance?

      G This user is from outside of this forum
      G This user is from outside of this forum
      [email protected]
      wrote on last edited by
      #2

      Did you need to compile a kernel to enable it? I’ve just done the project of installing Debian on a 20 year old iMac with 2.5 GB of RAM, and while zram definitely seems to help, I’d love to try this as well.

      N W 2 Replies Last reply
      0
      • G [email protected]

        Did you need to compile a kernel to enable it? I’ve just done the project of installing Debian on a 20 year old iMac with 2.5 GB of RAM, and while zram definitely seems to help, I’d love to try this as well.

        N This user is from outside of this forum
        N This user is from outside of this forum
        [email protected]
        wrote on last edited by
        #3

        Yes, but maybe debian enables it by default? You can check by running cat /sys/kernel/mm/lru_gen/enabled

        If the result is 0x0007, it means MGLRU is fully enabled.

        W 1 Reply Last reply
        0
        • G [email protected]

          Did you need to compile a kernel to enable it? I’ve just done the project of installing Debian on a 20 year old iMac with 2.5 GB of RAM, and while zram definitely seems to help, I’d love to try this as well.

          W This user is from outside of this forum
          W This user is from outside of this forum
          [email protected]
          wrote on last edited by
          #4

          I am running Debian 12 on all of my devices with Debians vanilla kernel! 🙂

          One further tip for ZRAM: On my device the LZ4 algorithm was noticeable faster than ZSTD (didn't try ZSTD with the enabled MGLRU, yet) and it was important to disable the RAM page read-ahead on my device.

          G 1 Reply Last reply
          0
          • N [email protected]

            Yes, but maybe debian enables it by default? You can check by running cat /sys/kernel/mm/lru_gen/enabled

            If the result is 0x0007, it means MGLRU is fully enabled.

            W This user is from outside of this forum
            W This user is from outside of this forum
            [email protected]
            wrote on last edited by
            #5

            Debian does not enable it by default, cat /sys/kernel/mm/lru_gen/enabled will be a 0.

            G 1 Reply Last reply
            0
            • W [email protected]

              I am running Debian 12 on all of my devices with Debians vanilla kernel! 🙂

              One further tip for ZRAM: On my device the LZ4 algorithm was noticeable faster than ZSTD (didn't try ZSTD with the enabled MGLRU, yet) and it was important to disable the RAM page read-ahead on my device.

              G This user is from outside of this forum
              G This user is from outside of this forum
              [email protected]
              wrote on last edited by
              #6

              I think I did go with LZ4 after looking at benchmarks; I figured on a weak CPU speed would be more valuable than another few percent of compression. I’ll have to look into the RAM page read-ahead.

              W 1 Reply Last reply
              0
              • W [email protected]

                Debian does not enable it by default, cat /sys/kernel/mm/lru_gen/enabled will be a 0.

                G This user is from outside of this forum
                G This user is from outside of this forum
                [email protected]
                wrote on last edited by
                #7

                I’m on trixie, since recent Mesa has many fixes for very old Radeon GPUs, and it appears to be on by default! At least, I didn’t intentionally turn it on and it’s on.

                W 1 Reply Last reply
                0
                • G [email protected]

                  I think I did go with LZ4 after looking at benchmarks; I figured on a weak CPU speed would be more valuable than another few percent of compression. I’ll have to look into the RAM page read-ahead.

                  W This user is from outside of this forum
                  W This user is from outside of this forum
                  [email protected]
                  wrote on last edited by
                  #8

                  Just set vm.page-cluster to 0, to disable the page read-ahead (AFAIK the default value was set when swap was still on rotating disks).

                  Arch wiki has some good options for tuning the VM

                  1 Reply Last reply
                  0
                  • G [email protected]

                    I’m on trixie, since recent Mesa has many fixes for very old Radeon GPUs, and it appears to be on by default! At least, I didn’t intentionally turn it on and it’s on.

                    W This user is from outside of this forum
                    W This user is from outside of this forum
                    [email protected]
                    wrote on last edited by
                    #9

                    Does on mean that /sys/kernel/mm/lr_gen/enabled returns 0x7?

                    G 1 Reply Last reply
                    0
                    • W [email protected]

                      Does on mean that /sys/kernel/mm/lr_gen/enabled returns 0x7?

                      G This user is from outside of this forum
                      G This user is from outside of this forum
                      [email protected]
                      wrote on last edited by
                      #10

                      Yes indeed.

                      1 Reply Last reply
                      0
                      • System shared this topic on
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • World
                      • Users
                      • Groups