1. disable Transparent Hugepage Support, by adding the kernel argument transparent_hugepage=never. on Debian-adjacent distros, this can be done by putting this in /etc/default/grub.d/no-hugepage.cfg: GRUB_CMDLINE_LINUX_DEFAULT="$GRUB_CMDLINE_LINUX_DEFAULT transparent_hugepage=never" then run update-grub 2. run these: git clone https://github.com/jemalloc/jemalloc cd jemalloc ./autogen.sh make sudo make install 3. either put this on top of ~/.xinitrc: export LD_PRELOAD="/usr/local/lib/libjemalloc.so $LD_PRELOAD" or, if you want to be more thorough (be careful, this is harder to recover from, should it go wrong), put this in /etc/environment: LD_PRELOAD=/usr/local/lib/libjemalloc.so 4. depending on how you did step 3, either restart xorg or reboot your system.