Feature request: Multi-gen LRU

Forum Forums antiX-development Development Feature request: Multi-gen LRU


  • This topic has 1 reply, 2 voices, and was last updated Nov 21-3:26 pm by PPC.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #93645

      The Linux kernel does not perform well under RAM shortage conditions on desktop computers.
      When running programs use RAM almost to its max, it is not uncommon for system to fall under thrashing:

      In computer science, thrashing occurs when a computer’s virtual memory resources are overused, leading to a constant state of paging and page faults, inhibiting most application-level processing. This causes the performance of the computer to degrade or collapse. The situation can continue indefinitely until either the user closes some running applications or the active processes free up additional virtual memory resources.

      When the memory is almost completely filled with real data (not cache), the operating system has to decide: how much of cache to throw out, how much and what data to send to the swap, and how intensively to perform these operations.
      The Linux kernel with standard configuration considers the cache to be the least overall demanded type of data in RAM, discarding it too aggressively for the sake of real data, swapping out real data in small batches. Because of this, an avalanche effect arises, when the entire computer works only to transfer program executables, libraries and swap back and forth from and to HDD, leaving almost no time for the execution of programs.

      Continuous reading of system libraries and programs, especially from a slow HDD, leads to a performance drop by orders of magnitude. The system may lose responsiveness for minutes, which is especially true for older computers.

      Multi Generational LRU patchset, which has been merged into Linux 6.1, greatly improves memory management in case of high RAM utilization, and especially helpful on older computers with slow HDDs, where it could prevent thrashing with additional configuration.

      There are Android kernel 5.10 and 5.15 backports of the patchset: 5.10, 5.15.
      It would be great to see this patchset in Antix.

      MGLRU is currently used in Armbian, Android, Arch Linux Zen, Chrome OS, Liquorix, post-factum and XanMod.

      More information: http://blog.esper.io/android-dessert-bites-22-linux-memory-management-38419756/

      In my opinion, this is the most major patch for Linux desktop in the latest 5 years.

      • This topic was modified 1 year, 4 months ago by ValdikSS.

        Hi! I’m not a developer, but anticapitalista is working in adding new 5.1 kernels to antiX (see here: https://www.antixforum.com/forums/topic/kernel-testers-needed/).
        It probably will be a while, before he can try to do the same to kernel 6.1… So, please be patient, this is almost a “one man show”!

        Edit: hum… I may have spoken too soon- it seems anticapitalista is already on top of that: https://www.antixforum.com/forums/topic/antix-23-based-on-debian-12-bookworm-ideas/

        • This reply was modified 1 year, 4 months ago by PPC.
      Viewing 2 posts - 1 through 2 (of 2 total)
      • You must be logged in to reply to this topic.