Linux is all about priorities

It looks like you are reading this text right now. Besides the fact that there are a million other things you could do instead you made a decision that this is your prioritiy right now. Very similar to what the Linux Kernel does all the time: Find out what our priority as and act accordingly.

One of the best decisions I made in my life was the purchase of a cheap laptop in 2008. At that time it already was an outdated model and the seller advised me not to buy it as it only had 1 GB of RAM and a 1.6 GHz single core CPU. He told me that it would start swapping if I opened up multiple windows and browse the internet.

I reminded myself that I first got online with a computer that had a 90 MHz Pentium CPU and 16 MB of EDO-RAM. That worked very well for me and this guy was telling me that having 50 times more memory available was not enough?

So I made the decision to buy it despite the fact that I was advised not to.

Very soon I discovered that he was right. At least on his terms. Windows Vista was preinstalled on the machine and it tried to impress me with fancy window animations and popups that interrupted my work just to tell me what it expects me to do. But rather than getting impressed I got annoyed very quickly. My priority was to write text and read PDFs for my studies. And I did not want to get interrupted while I was doing that.

I managed to click away those pop ups quickly without paying to much attention. But one day a window popped up that drew my attention. It said: “Problem detected: Windows”. I thought to myself: “Oh yes, that’s true” and decided to install Kubuntu 8.04 that I had lying around on a CD. I completely got rid of the problem.

I am telling this because it is exactly what Linux is all about: Priorities and interrupts. There are 3 schedulers in the Linux Kernel: Process scheduler, I/O scheduler and packet scheduler. Once we install a system it makes some assumptions for us what our priorities are. But these assumptions do not necessarily have to be right for what we are doing.

In order to get the most out of our systems we have to tell them what our priorities are. We do not have to buy what others think is right for us. We do not always need more {instances, memory, bandwidth, I/O}. It can be very expensive to constantly scale without knowing our priorities.

Actually there is a lot we can do to tell our schedulers what we expect from them. I will go over this in future articles.

And yes, I am still using my “outdated” laptop besides the fact it is a little bit heavier than today’s laptops it still serves me very well. As long as x86 kernels are available I have no urge to throw it away.