Skip to content

Instantly share code, notes, and snippets.

@makidoll
Last active December 1, 2024 19:23
Show Gist options
  • Save makidoll/0e18f1600e12eaaffd4a0fcaae6142e9 to your computer and use it in GitHub Desktop.
Save makidoll/0e18f1600e12eaaffd4a0fcaae6142e9 to your computer and use it in GitHub Desktop.
Linux XanMod on Debian/Ubuntu Server

Linux XanMod on Debian/Ubuntu Server

Note

I've been experimenting with linux-tkg-bore and https://liquorix.net/ and have found results to potentially be better so far.

Preface

I came across XanMod when I was trying to find a Linux fork that included the "PCIe ACS Override" patch for my personal Linux machine, specifically to passthrough a second GPU on my work related Windows VM. At the time, I also had microstuttering issues when playing Overwatch with Proton and it really sucked since I easily get motion sick. It was hard to play my favorite hero (Echo ^^) whilst also being on Linux. After installing XanMod, those microstuttering issues went away and it blew my mind. I've been able to have so much fun again.

Looking at some of the patches on their website (https://xanmod.org), there seems to be quite a few relating to networking too. Running my own homelab server with game servers and such made me think it would be a good idea to try XanMod here too. After all, their site says its optimized for "Linux gaming server/client for eSports, streaming, live productions and ultra-low latency enthusiasts."

I've installed it on my homelab server and I've already been able to find very noticeable improvements. I may update this with more information but I was hella surprised when my server with hundreds of Docker containers was able to start almost instantly.

I also wanted to note that XanMod also sets BRR by default which I had previously made a gist for (https://gist.github.com/makidoll/9585c00892a3c23736e11d4d84e2debe). It can really help with TCP bandwidth. There's more patches related to networking.

Requirements

  • I'm currently using Ubuntu 22.04.3 LTS Debian 12 (im having issues atm where my system freezes with xanmod :<). Was a bit scared to update the kernel since the distro does everything for you, but the installation was flawless.

  • Check the XanMod website (https://xanmod.org) to find out if you need v1,2,3,4. Newer AMD cpus greatly benefit.

  • Probably a good idea to just check which patches they've applied. I'm also able to continue using my NVIDIA gpu with my server.

  • This also updates your Linux kernel to latest if your distro is behind, however you might want to consider using LTS instead.

Installation

  • ensure system is up to date first
    sudo apt update && sudo apt upgrade

  • install require packages
    sudo apt install -y dirmngr ca-certificates software-properties-common apt-transport-https dkms curl

  • import gpg key
    curl -fSsL https://dl.xanmod.org/gpg.key | sudo gpg --dearmor | sudo tee /usr/share/keyrings/xanmod.gpg > /dev/null

  • import their repo
    echo 'deb [signed-by=/usr/share/keyrings/xanmod.gpg] http://deb.xanmod.org releases main' | sudo tee /etc/apt/sources.list.d/xanmod-kernel.list

  • update and upgrade system again
    sudo apt update && sudo apt upgrade

  • install package. make sure to pick right version!
    sudo apt install linux-xanmod-x64v4 or linux-xanmod-lts-x64v4 or v3 or lower

  • you could check if it's installed with
    ls /boot and cat /boot/grub/grub.cfg
    debian or ubuntu kinda just does everything for you

  • reboot and hope for the best
    sudo reboot

  • check if it's working cat /proc/version
    check if using brr which xanmod enables by default
    sudo sysctl net.ipv4.tcp_congestion_control

  • go donate to the project
    https://xanmod.org/#donation

References

Guide originally from https://www.linuxcapable.com/install-xanmod-kernel-on-ubuntu-linux/

Extra

I didn't know where to add this, but increasing file descriptor limit can increase server performance too. Look here:

https://unix.stackexchange.com/a/145025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment