Supercharge Your Ubuntu 16.04 LTS with XanMod Kernel (includes BFQ)XanMod is a custom built kernel for Debian and Ubuntu

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

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), ,

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 ! (also, currently, XanMod is the only known kernel, one that’s being actively updated, that provides BFQ for Debian and

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 — , . 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

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 .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.1.) First go to the

and download the preferred Kernel release (I’m using the LTS version).Update: You can actually get more information about statistics, tweaks etc by

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:lsThis 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 ‘‘, and press Enter:cd 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 *.debIf 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/grub6.) This will open up the GRUB (boot-menu) configuration file in ‘nano’ text editor. Now look for the below text line:GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash”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:sudo update-grub2Now 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/schedulerWhen I enter it I get the below output (currently in use I/O scheduler is listed inside a pair of square brackets):Enjoy!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!Related PostsAn RHCE, ‘Linux’ user with 14+ years of experience. Extreme lover of Linux and FOSS. He is passionate to test every Linux distribution & compare with the previous release to write in-depth articles to help the FOSS community.Hey thank you for this. It was presented and easy to follow.Thanks also for all the other articles as well 🙂 Your website can be very useful.CheersHello, Gayan, thank you very much for your article!Please, feel free to visit Xanmod’s community forum to have a global sight about the whole work done, also with all the information about statistics, cumulative features, additional tweaks, benchmarking results, development process and some other interesting and useful threads.I’m sure that you and your readers will enjoy it!🙂Does this increase video card performance?Hi Gayan:Just a note about bfq: While it works well for most things, it performs horribbly when copying large data files between USB drives.My machine, which stays reasonably responsive (Xenial) with cfq, becomes totally unusable (mouse unresponsive etc,) until the job is complete if using bfq.To test, copy a 1GBor larger file between two USB drives or sticks. Since I do this a fair amount, I have had to abandon bfq.I would be interested if others have this issue.Cheers.Hi again… I took the time to test all 3 i/o schedulers in the task of copying or moving large data files between two usb drives (in this case two older Sandisk 8GB Cruzers copying a 2.2 GB video between the usb flash drives).CFQ = the worst performerBFQ = almost as bad as CFQDEADLINE = not perfect but a usable systemBoth bfq and cfq resulted in unusable systems during the above copy. Many, MANY stalls in the transfer.Deadline displayed some jerkiness of the mouse, but no stalls and one could at least use the system while the file was being copied.It would be interesting to discover if others experience this.CheersBFQ alone and BFQ+BFS (Xenial)No problem copying files. 🙂Hi Gayan,Your instructions made it very easy to install and it works fine on my pc. Silly question I expect, but when Ubuntu next update the image and headers do I need to do anything extra, as I now have XanMod running things?Thank you for the tips etc you supply for 16.04, very much appreciated.Hi Gayan,Thank you for solving this. I think I will just wait to see what happens. It takes little time and effort to reinstall XanMod, and you have already given the command to check if it is being used. I just needed to clarify what might happen while updating. Thanks again.Sorry to be away so long there…Anyway, this above issue with BFQ only happens with:1) very large files, usually starting at around 1GB, and above especially when you get to the 2GB range; there is no problem copying a 500 meg file.2) only between USB drives (USB -> USB, not HDD -> USB)3) does NOT occur when using rsync; I just found this out today. Rsync works quite well.So if the problem does not exist using rysync, but does occur with the cp command, this tells me it is related to cp, and and not bfq except that bfq may act as some form of catalyst for some timing issue in cp.?As for me, since rsynce works OK, I am back to using bfq 🙂Hallo guys and thank you, Gayan, for your plain howto and for introducing me to xanmod. Yesterday I have installed the new 4.9, but the bfq scheduler suddenly disappeared! Did anybody suffer this problem? Tnx in advHi Drumsal,Currently, bfq is not supported for the Linux 4.9 series yet. Use the I / O Scheduler Deadline (default) as it is also ideal for desktops. 😉Thank you Alexandre, actually deadline was the scheduler that my linux adopted while missing bfq. But in the latest days I have noticed that xanmod supports again bfq (4.9.2 and later), so problem (if it really was) solved and I’m enjoying it again. Thank you again!Maybe a bit late to the game here, but just installed xanmod and switched to bfq (ubuntu 16.04 LTS set-up). Then in terminal, installed the intel microcode update. And maybe this is wherein the problem lies, it seems intel turbo is now off. I have an i5-2410M CPU, which is 2.3 GHz, and then to 2.9 GHz with turbo.My system monitor for cpu shows that I am not getting more than 2.3 GHz at a heavy load now. I suspect this newest microcode is not suitable for the i5, and will see if I can revert to the previous one (2015) and see if turbo is back. Will report back here for anyone who might be interested.I know you have indicated in the article that putting the Gnome Kernel on hold will stop the xanmod update.I used:sudo apt-mark hold linux-image-generic linux-headers-genericThe automatic method of installation includes adding their repository. This suggests this will over-ride the hold on Gnome kernel updates so as to ensure that only the xanmod updates will still happen. Is this correct?Installed Xanmod kernel onto 64bit Zorin 12 (which is based on Debian / Ubuntu) and it worked really well.Have you tried the pf kernel ? Pf kernel did use the BFS but now uses the PDS CPU scheduler with BFQ improvements.I have an old macbookpro with faulty ram which kept crashing (I confirmed the ram is faulty by running Memtest86+ which found lots of errors) with the pf kernel it hardly crashed at all.There is the grub bad ram filtering which lets you tell grub not to use the faulty part of the ram.PF kernel updated as of Jun 5 2018!I installed again the xanmod kernel after a bunch of time. Just to say that it’s no more necessary to modify /etc/default/grub. I didn’t and found the scheduler correctly set.This site uses Akismet to reduce spam. .Recent PostsContactAbout HecticGeekWelcome to HecticGeek, it is an independent blog founded back in 2010. We cover in-depth Linux OS, product review with other all technology-related software and tools. Our mission is to provide valuable and trustful technology-related content to our users.

Leave a Reply

Your email address will not be published.