Latent Kernality

Geeky post – move along.

The PC I shipped from the UK to the states turns out to have, as a result of my unrelenting parsimony, a PSU that *only* supports 220V. So, in a fit of reckless abandon, I bought a brand new HP bargain-bucket barrel scraper with a nice 19″ flat screen. The days of building my own are over because:

  • I really can’t be arsed with all of that tedious Lego crap any more
  • Building your own is now more expensive than buying new if, like me, you buy older (ie cheaper) technology. As has been mentioned before, I don’t have a lot of regard for people who insist on living on the edge
  • If it doesn’t work, I can get it fixed without having to wait for the next computer fair and then trying to find the vendor
  • HP kit is infinitely better than the similarly priced competition (cough…cough…Dell)

So, I took the hard drive out of my old machine (teapot), slapped it into the new one, and powered up. Bam, worked first time and came up perfectly except for sound and X – I expected that. The sound was dead easy – NVidia MCP61 uses the intel hda sound driver ; new kernel module built and installed. But the video is more of a bugger. Weirdly, the problem was with the monitor. It was widescreen and nothing I tried would give me the correct resolution. This still isn’t fixed and so the picture is big and beautiful but blurry in detail… BTW – yes I did Google the bugger out of it and no-one appears to have found a proper solution. If you have, let me know (HP w2007).
The next problem was quite surprising; the machine regularly locked up for seconds at a time, particularly when a lot of I/O was going on. Now, as someone who isn’t too bothered about performance I usually won’t care but latency problems were so pronounced that I was getting annoyed. Even giving the asterisk process top priority didn’t help. After doing some reading it became apparent that the “Completely Fair Scheduler” in modern kernels really needs to be tuned to your exact requirements for it to be of any use at all. This is the first time I’ve ever had the need to mess around with kernel tunables for my home machine; in the past the defaults were fine 90% of the time.
More reading. It turns out things are very different now. Not only are there a bunch of very useful tunables (eg vm.dirty_background_ratio and vm.swappiness)
but you can even configure ‘cgroups’ which let you assign priorities to groups of processes, even by username! So now I have a box that is neatly tuned to what we need, which is great, but who is normally going to bother ? Distributions are really going to have to take this seriously, otherwise they are going to be a lot of pissed off desktop users. Some sort of simple tuning tool with enough smarts to do the job properly.


Leave a Reply