Saturday March 20, 2010 5:09 AM AEST

Kernel engineering

  • Email a Friend
  • Print Page
 »
Kernel engineering
By Ashton Mills
Sep 12, 2007
Tags: Kernel | engineering | linux | vista

Optimise your kernel for the server or desktop performance, with Col. Kernel, Ashton Mills.

It’s all too easy to think of Windows or Linux as operating systems that just work when we throw our demands at them. We know that both are designed to handle server and desktop environments, and though logically you’d assume these to be contrary, under the hood the operation of the kernel to support them can be substantially different.

It’s all about latency
If you think about it, for each and every slice of CPU time, your operating system can do only one thing. The magic that is multitasking is the brilliant management and execution of commands from multiple processes to run them, as seamlessly as possible, side-by-side. But when it comes to making sure an operating system performs as required for the two core environments of server and desktop, how the kernel does this makes all the difference.

Bandwidth reservation with Windows Media Player as an example, and the 80% task priority via multimedia scheduling. Source: Microsoft
Bandwidth reservation with Windows Media Player as an example, and the 80% task priority via multimedia scheduling. Source: Microsoft


Microsoft has made lots of noise about the advantages of Vista. When you look under the hood at just the kernel changes you can quickly see how Microsoft has worked hard on the end-user desktop experience, and also the extent to which XP, and Windows versions prior to this, have all been slowly working on the problem. And that it still isn’t completely there yet.

Linux is no different and, in many ways, is worse off. The brain boxes behind Linux kernel development are masters, but for almost two decades now the Linux kernel has been engineered and finely tuned for the market where it first got a foothold: servers. The focus in recent years on Linux for the desktop is great, and much of the work that’s been done has been on the user space (witness Ubuntu and the many changes it makes on the desktop to make Linux accessible). But under the hood, all Linux distributions are still running a kernel that was essentially designed for a server, not a desktop.

This expresses itself in the problems some users face. For example, stuttering audio playback while accessing a disk, or slowed GUI window movement under high processor loads. The problem isn’t that the kernel can’t handle the workload, it’s how the kernel has been designed to handle it.

click to view full size image
Configuring a Linux kernel – CFS and its default ‘Interactive Desktop’ setting.


It’s a complex problem for Windows and Linux. How can you get optimum performance under both these two core environments when, for the most part, they are largely opposed?

There’s a popular maxim that states server and desktop requirements roughly correlate to a sliding scale between throughput and latency. Servers are big on throughput, while desktops are big on (low) latency. And the more you get of one, the less you get of the other. While this is true in principle, the issue can really be broken down to just latency, as lower latencies tend to equate to lower throughput.

For servers, throughput and getting work done is usually more important than latency, as well as ensuring that services (be it file, web, networking and so on) get their fair share of time in the sun. For desktops it’s somewhat the other way around – low latencies mean responding quicker to the user, and giving some tasks higher priority at the expense of others (effectively an ‘unfair’ workload) can mean a more seamless user experience where it counts.

Consequently, there is actually quite a lot that both Vista and Linux do at the kernel level to provide a better experience for the desktop user.




 
 »
 
This article appeared in the September, 2007 issue of Atomic.

Want to check out the first Australian review of Final Fantasy XIII? We got in this month's Atomic!

Plus HD projectors, Napoleon: Total War, Intel's new six-core processor, PC upgrading guide, and a whole lot more.

ON SALE NOW!
Comments

Be the first to comment on this article.
Thoughts on this article? Add a comment below.
Login or register to submit a comment.
 
 
Atomic Magazine

Issue: 111 | April, 2010

Atomic is a magazine aimed squarely at computer enthusiasts, gamers, and serious PC upgraders.

Every month we bring you the latest reviews of new technology and PC components, in depth features on everything from overclocking to console hacking, and gaming previews and interviews.
 
Latest Comments
"RAGE!!!"
by Hawkeye | Mar 20, 2010 1:24 AM
 
"alex - bugger all. 78mg of caffeine. About the same as a cup of instant coffee. Taurine, Gurana ..."
by tantryl | Mar 20, 2010 12:51 AM
 
"Yummy yummy yummy om nom nom nom nom nom nom nom

GB"
by Ghost_Bear | Mar 19, 2010 11:59 PM
 
"Hawkeye: So if noone said anything about it you wouldn't think anyone cared and you would leave ..."
by fliptopia | Mar 19, 2010 10:05 PM
 
"I really want to try one of these out.
If anyone has one let me know how it goes."
by Dan_2 | Mar 19, 2010 7:24 PM
 
1) Sony Ericsson Aino6 plans 17%
2) Nokia E7147 plans 17%
3) Apple iPhone 3GS 32GB36 plans 17%
4) Apple iPhone 8GB43 plans 1%
5) HTC Magic5 plans 17%
1) Optus41 plans 11%
2) Vodafone7 plans 7%
3) Telstra BigPond30 plans 3%
4) iiNet32 plans 8%
5) Dodo34 plans 1%

Mobiles | Broadband | Credit Cards

Haymarket - Atomic MPC
Latest User Reviews
Logitech MX518 Gaming-Grade Optical Mouse
90%
Good shape, design and Ergonomics
 
Coolermaster HAF 922
100%
A case to make a statment and give your pc the Heavy Hardcore Grunt it needs.
 
Coolermaster Excalibur
50%
Atomic is under attack
 
XFX 9300 Motherboard
40%
HUGE letdown
 
CM Storm Sentinel gaming mouse
90%
Sexy and instant geek respect.