1. MGLRU Enables Multi-Gen LRU (improved page reclaim and caching policy). Prevents thrashing, improves loading speeds under low ram conditions. Requires kernel 6.1+. Has dramatic effect especially on slower HDDs. For slower HDDs, consider 1000 instead of 300 for min_ttl_ms. sudo tee /etc/tmpfiles.d/mglru.conf <> /etc/sysctl.d/85-swappiness.conf For systems with low RAM and slower HDDs, consider also tuning swappiness to lower page cache reclamation rate. echo vm.swappiness=100 >> /etc/sysctl.d/85-swappiness.conf echo vm.watermark_scale_factor=200 >> /etc/sysctl.d/85-swappiness.conf 3. Eatmydata Fix Debian/Ubuntu apt/dpkg excessive fsync() calls. Speeds up software installation. apt install eatmydata echo -e '#!/bin/bash\nexec eatmydata /usr/bin/dpkg "$@"' > /usr/local/bin/dpkg chmod +x /usr/local/bin/dpkg echo 'Dir::Bin::dpkg "/usr/local/bin/dpkg";' > /etc/apt/apt.conf.d/85eatmydata 4. glibc MALLOC_ARENA_MAX and MALLOC_TRIM_THRESHOLD Decrease and set static memory allocation arenas to 2. Decrease and set static heap trimming threshold down to 64KiB. Reduces overall memory usage. sed -i 's/#DefaultEnvironment=.*/DefaultEnvironment=MALLOC_ARENA_MAX=2 MALLOC_TRIM_THRESHOLD_=65536/' /etc/systemd/system.conf echo -e 'export MALLOC_ARENA_MAX=2\nexport MALLOC_TRIM_THRESHOLD_=65536' > /etc/profile.d/85malloc_arena # Additional files for graphical X11 environment (not for server) echo -e 'export MALLOC_ARENA_MAX=2\nexport MALLOC_TRIM_THRESHOLD_=65536' > /etc/X11/Xsession.d/85malloc_arena echo -e 'export MALLOC_ARENA_MAX=2\nexport MALLOC_TRIM_THRESHOLD_=65536' > /etc/X11/xinit/xinitrc.d/85malloc_arena.sh chmod +x /etc/X11/xinit/xinitrc.d/85malloc_arena.sh