Pinterest Stumbleupon Whatsapp
Ads by Google

A few years ago, a magical “200-line patch” was added to the Linux kernel. It aimed to increase the responsiveness of programs running at the same time on your Linux system. While it was effective, developer Daniel Poelzleithner thinks he can do better.

To achieve ultimate responsiveness on your Linux system, you may want to take a look at Ulatencyd.

Warning: In order to try out Ulatencyd, you’ll need to get your hands deep into the terminal, compiling the program from scratch. In other words, this isn’t the best choice for beginners. If you want, you can brush up on some terminal commands An A-Z of Linux - 40 Essential Commands You Should Know An A-Z of Linux - 40 Essential Commands You Should Know Linux is the oft-ignored third wheel to Windows and Mac. Yes, over the past decade, the open source operating system has gained a lot of traction, but it’s still a far cry from being considered... Read More beforehand.

About Ulatencyd

Ulatencyd is a system daemon for Linux that gives the kernel some hints and limitations on how to deal with processes. It does this using something called cgroups, which are essentially different priority levels. Processes that have graphical user interfaces and need to be responsive – such as desktop environments – will receive a higher priority than processes that don’t need quite that much attention, and won’t cause serious issues should they stutter.

ulatencyd_diagram
Poelzleithner also addresses how his approach is better than the 200-line patch:

I think that this minimal approach [referring to the 200-line patch] is good for some circumstances, but does not provide enough flexibility required for a true low latency desktop. Perfect desktop scheduling needs a lot of heuristics, that don’t belong in the kernel. For example, the patch won’t protect you from swap of death, fork bombs, can’t detect which process you are actually using and give more cpu shares to them, can’t give realtime priorities to processes like jackd, etc… ulatencyd is designed for fixing exactly that.

Installation

To install Ulatencyd on Ubuntu, run the following command:

Ads by Google

sudo apt-get install libglib2.0-dev libdbus-glib-1-dev liblua5.1-0-dev lua-posix-dev procps doxygen libmoose-perl pandoc python-dbus python-qt4 python-qt4-dbus xcb xcb-proto libxau-dev libprocps3-dev cmake

ulatencyd_install_deps
This command will install the needed dependencies of the software. Package names differ between distros, so users of distros other than Ubuntu will need to look at the project’s page and see which packages need to be installed based on the provided list.

ulatencyd_download_code
Next, head to the project’s main page which is hosted on GitHub, an extremely useful code-managing service How To View & Edit The Source Code Of An Open-Source App How To View & Edit The Source Code Of An Open-Source App While going open source might be a good choice, you'll also need to invest in the right community. GitHub is one of the best places to do this, not only because of the sheer amount... Read More , and click on the “Download ZIP” button on the right side of the page.

ulatencyd_extract
Save this to wherever you’d like (such as your Downloads folder), and then extract the zip.

ulatencyd_cd_directory
Then, for all distros, use cd to go to the extracted folder (such as cd ./Downloads/ulatency-master), and run this command:

cmake . && make DEBUG=1 && make docs && sudo make install

ulatencyd_installation
This will compile the code and documentation and then install it.

Finally, run this command to start ulatencyd:

sudo /usr/local/sbin/ulatencyd -v -f /var/log/ulatencyd

You can also choose to restart your system if you’d like.

Notes

Please be aware that some people have reported that installing Ulatencyd has caused kernel panics. The general consensus seems to be that those kernel panics are the result of bugs in the kernel rather than issues with Ulatencyd. However, when using the latest code of Ulatencyd from its Git repo, and the latest daily image of Ubuntu 14.04, I have no issues whatsoever.

Results

I find that Ulatencyd does make a difference, although the experience may be different for you. If you’re already using a fast computer, the potential to see a difference is low because you already have enough resources to give every process the attention that it wants. For slower computers, the potential to see a difference is greater, but it’s dependent on your workload.

Responsiveness is a fairly subjective statistic, but the closest metric that can represent it is the average load. Google+ user Rafal Cieslak tried Ulatencyd in combination with another daemon called verynice, and saw the average load dropped from 2.2 – 2.8 to 0.8 – 1.5. I haven’t quite seen that much of an improvement using ulatencyd alone, but idle loads of ~0.5 drop down to ~0.2, and busy loads of ~2.4 drop down to ~1.8-2.0. In any case, it’s an improvement that’s measurable.

For those who care,  developer Poelzleithner claims the software is effective:

I’m able to run a make -j 40 on my dual core machine while looking a full hd movie without problems and the ui from kde still feels good.

This is actually pretty impressive for a dual core system, as a “make -j 40” command means that he was compiling a piece of software with fourty threads running at once — something that’s sure to keep the CPU fully utilized.

Conclusion

Remember that this program doesn’t necessarily make your computer faster (as in that it can do more work in less time), but just make it more responsive (as in it pays more attention to the things you interact with and leaves other processes as afterthoughts). However, that doesn’t mean that Ulatencyd isn’t worth trying — a responsive system can be a lot less aggravating for the user.

If you’re still on the hunt for improved speed and responsiveness, don’t forget to check out these four tips on speeding up a Linux system 4 Ways to Speed Up Your Linux PC 4 Ways to Speed Up Your Linux PC Is your Linux setup not as speedy as you'd like? Here's how to speed it up. Read More .

Do you have any tricks up your sleeves to improve a Linux system’s performance that you can share with others? Let us know in the comments!

  1. Sathish Kumar M
    May 18, 2014 at 7:58 pm

    I am using ubuntu 14.04 latest version and it caused only kernel panics for me. Had to go to grub recovery mode -->root terminal --> mount my system and mark ulatencyd in /usr/local/sbin/ non-executable to solve the problem.

    I am using Acer Aspire 4736z dual core laptop

    • Alex
      July 26, 2014 at 5:23 pm

      Thank you very much for your post. I installed it on Mint Qiana Cinnamon, and started having kernel panics after reboot. Plugged in an usb with the live installation and solved it like you said.
      Any clue on how to make it work?

    • Sathish Kumar
      July 26, 2014 at 5:31 pm

      Hi Alex, happy to know that I am of some help to you. I tried to make ulatencyd work but couldn't do it and I gave up. I am not an expert to comment on it to.

  2. Parker
    May 11, 2014 at 2:41 pm

    I might try this, but I'm really impressed with how responsive my Fedora 20 system is even under heavy loads. I've been running video stabilization at 100% on all 4 cores and still can browse and use other programs like nothing was going on at all. Windows on the same laptop bogs down to the point of being unusable.

  3. Jim in Oregon
    April 23, 2014 at 4:21 pm

    If I find ulatencyd doesn't help my system much, how do I then remove it?

    • Shiruken
      April 24, 2014 at 11:05 am

      sudo apt-get remove ulatencyd ulatency

  4. dc0de
    April 22, 2014 at 3:41 pm

    sudo apt-add-repository ppa:poelzi/ulatencyd-stable
    sudo apt-get update
    sudo apt-get install ulatencyd ulatency

    Done. and done.

    • Tony
      April 22, 2014 at 6:06 pm

      thanks for the information

  5. Crip
    April 21, 2014 at 5:36 pm

    Always wanted to know cpu load numbers measured, could never find a good explaination. Maybe someone here could give me the explaination or point me where I could find it. Thanks Colin

  6. trag
    April 21, 2014 at 4:56 pm

    Installing using your method is way to intense for me so I just used
    'sudo apt-get install ulatency ulatencyd'

    • Danny S
      April 22, 2014 at 12:14 am

      That does work too, but you're most likely running a much older version of ulatency. The instructions I provided allow you to run the latest version.

  7. Dominic
    April 21, 2014 at 2:56 pm

    Whatever gains this provides will be gobbled up by bloat.

    In 1994 I had a lab full of 486 machines, 16M RAM running Linux 0.99 and twm and they were responsive.

  8. AwesomeC
    April 21, 2014 at 2:32 pm

    If you are looking for a "responsive system", you shouldn't be running Ubuntu in the first place.

    • Deni G
      April 23, 2014 at 6:44 am

      Which Linux distribution do you recommend (also open to suggestions by the public)?

    • Shiruken
      April 24, 2014 at 11:04 am

      Check out Crunchbang, if you don't mind not having a desktop environment. It's the only distro (debian based) that can run on my 12 year old tablet.

      Otherwise, Ubuntu's main bloat is Unity, hence why I use Linux Mint on my desktop. Also check out ElementaryOS. It's Ubuntu based as well but stripped of all the bloat and super fast (I swear the media center boots faster than my desktop).

      All in all, Ubuntu's great, IMHO, because of market acceptance (means you don't have to compile things most of the time, like in this article, but instead just do 'sudo apt-get install'.

      In the end, Ubutu's still Linux, which means you can add/remove/configure EVERYTHING to your liking.

      P.S: I'm toying with Bodhi for my new laptop/tablet, and the Enlightenment WM can kick every other WM/DE's butt in customizability... which comes at the cost of -having- to configure EVERYTHING by hand.

    • a
      April 27, 2014 at 11:05 am

      most lightwight and most useful linux distro at this moment is SLITAZ
      all the rest are bloat, including crunch, lubuntu and bodhi

Leave a Reply

Your email address will not be published. Required fields are marked *