XanMod is a custom built kernel for Debian and Ubuntu operating systems that comes with couple of tweaks for optimizing the performance. According to the authors, the Kernel has the potential of increasing the performance of high-performing Workstations, Game playback, Media Centers and such like.
Tweaks are applied to the existing core utilities of Linux, the Kernel of the GNU operating system, such as the CPU scheduler, CFQ I/O scheduler (this is the software utility that control how disk read/write requests are managed, and it plays a huge role in making the operating system responsive when the disk is under heavy load), GCC 6 (the GNU C++ compiler), improved cache, swap and CPU ondemand governor (this utility scales up/down the CPU depending on the workload. By carefully optimizing it can be used to improve the efficiency of the scaling operation) and a few others.
To tell you the truth, I’m not a gamer and I don’t have any high-performance workstations either. So why would I recommend the XanMod kernel? I recommend it for the simplest reason because it includes the awesome BFQ I/O scheduler! (also, currently, XanMod is the only known kernel, one that’s being actively updated, that provides BFQ for Debian and Ubuntu as far as I know). I have written extensively about this tool over the years, so I’m not going to re-write all that here. But if this is the first time you’ve heard of it, then this is the deal.
It’s true that in my personal experience Ubuntu is a very responsive operating system. And by default Ubuntu comes with the ‘deadline’ I/O scheduler (Linux, the kernel, comes with three I/O schedulers -- ‘deadline’, ‘CFQ’ and ‘noop’). But in my experience, on rotational disks Ubuntu usually performs quite well when I switch over to ‘CFQ’. By performing, I simply mean that it improves the responsiveness of the operating system when your disk (s) is busy (trying to open up couple of programs while copying large number of files in the background for instance).
But ‘BFQ’, an I/O scheduler that is written using the existing code bade of ‘CFQ’, vastly improve things! No I’m not simply paraphrasing here, I’m talking from my direct experience. As mentioned before, I have tested the performance of BFQ in the past and have provided some data -- article_1, article_2. In plain simple words, if you would like to have a more responsive operating system, even under heavy disk load, then BFQ is the best of all disk I/O schedulers that I have used (SSDs, HDDs…), and I honestly don’t know why it’s not accepted into the upstream Kernel code yet.
Anyway, I have been running this Kernel for the past 3 days (I just updated to the latest version -- 4.4.21) in Ubuntu 16.04 LTS and haven’t had any issues so far. Everything is running smoothly, just like under the original Ubuntu Kernel.
XanMod Kernel comes in two different versions, mainly -- Long Term Support (LTS) and the normal releases. I however, urge you to stick with the LTS release, because that’s what Ubuntu 16.04 LTS comes with, and the non-LTS kernel (listed as 4.7 & 4.6 in the XanMod website currently) failed to compile the Kernel module for my Nvidia 920M GPU.
If you don’t have such GPUs and your system only runs on a single Intel GPU, then I guess you’re probably okay to use the latest Kernel releases. Otherwise, stick with the XanMod LTS release.
How to Install it?
1.) First go to the XanMod website and download the preferred Kernel release (I’m using the LTS version).
Update: You can actually get more information about statistics, tweaks etc by visiting the XanMod Forum page as well.
2.) Once the download completes, open the archived file and you’ll see a folder inside. Select the folder and right-click, from the menu choose ‘Extract…’ and when asked for the location, extract it to your ‘Home’ folder.
3.) Now open the terminal window and go to that extracted directory. If you don’t know how to do that, then once you’ve opened up the terminal window, enter the below command:
This will give you a list of files and folders in your Home folder. From that list, find the extracted XanMod Kernel’s folder name and copy it using the mouse, as I’ve demonstrated in the below screenshots.
Then enter the below command (don’t press Enter yet) and replace the copied folder’s name with the ‘f_name‘, and press Enter:
Now you should be inside the XanMod Kernel’s extracted folder.
4.) Now simply enter the below command to finish the installation.
sudo dpkg -i *.deb
If you don’t see any errors, then you’re good to go. And, if you also don’t want to use BFQ as the I/O scheduler, now you can reboot the computer and from the next boot-up XanMod will be used by Ubuntu 16.04 LTS. If you want to enable BFQ, before rebooting, follow the below procedure also.
5.) Enter the below command into the terminal window:
sudo nano /etc/default/grub
6.) This will open up the GRUB (boot-menu) configuration file in ‘nano’ text editor. Now look for the below text line:
7.) Now simply add the below code into that existing text line (make sure to add a space after ‘splash’) so that it looks like the below one:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash elevator=bfq"
8.) Now press ‘Ctl’ + ‘x’ keys on your keyboard to save our changes. When asked, press Enter.
9.) Now we’re almost done. All that is left is to notify GRUB that we’ve added some changes to the configuration file. For that enter the below command:
Now reboot the computer and from your next boot, Ubuntu 16.04 LTS will be using the awesome ‘BFQ’ as the default I/O scheduler (across all the disk drives, if you have multiple drives). If you want to make sure it’s being used, enter the below command:
sudo cat /sys/block/sda/queue/scheduler
When I enter it I get the below output (currently in use I/O scheduler is listed inside a pair of square brackets):
Note: I would like to send a Thank You for the XanMod kernel developers, for especially adding the BFQ I/O scheduler to the ‘list’ (it’s such an excellent utility), thank you guys!