The ~200 Line Linux Kernel Patch That Does Wonders


It only improves stuff under heavy load, do you run everything on your pandora while doing heavy processing tasks in the background?
 
notaz said:
It only improves stuff under heavy load, do you run everything on your pandora while doing heavy processing tasks in the background?

"It's an improvement for things like smooth scrolling around, but what I found more interesting was how it seems to really make web pages load a lot faster. Maybe it shouldn't have been surprising, but I always associated that with network performance. But there's clearly enough of a CPU load when loading a new web page that if you have a load average of 50+ at the same time, you _will_ be starved for CPU in the loading process, and probably won't get all the http requests out quickly enough."

I understand this as: Loading a webpage can bring enough CPU load to make this useful...
 
Last edited by a moderator:
mcobit said:
notaz said:
It only improves stuff under heavy load, do you run everything on your pandora while doing heavy processing tasks in the background?
I understand this as: Loading a webpage can bring enough CPU load to make this useful...

"that if you have a load average of 50+ at the same time" - that's what this patch fixes, not some magical speed boost but a way to get the most out of an otherwise busy machine. A load average of 50 is pretty serious - for comparison, an (underspecced) server I have here is running two fax modems (with PDF/Postscript conversion and email->fax gateways), two ADSL2+ connections (filtered, for 450 school desktops - and firewalling, caching and complete logging of every access), two 3G modems (emergency backup for the ADSL), Gigabit local network storage on a 3Tb Software RAID, a VPN server, an SMS gateway, a HTTP server for local intranet (refreshed from every desktop in the building every 30 seconds) with PHP/MySQL and Mediawiki-based pages, and multiple other tasks (VLC transcoding of DVB-T streams for network access etc.) and barely hits a load average of 2 even in peak periods.

Currently: 11:19:02 up 5 days, 22:05, 7 users, load average: 0.13, 0.14, 0.10

(ignore users - that's people logged into that machine, i.e. all my SSH sessions for monitoring it, and 5 days up because of upgrades to the Internet load-balancing to make it failover to the other ADSL properly) - the last three numbers reflect load in the last 1 min, 5 min, 15 mins. I just took that from the server in the middle of the working day at a peak period. It's barely a 2GHz machine and is doing lots of things for myself in the background as well as being an extremely vital piece of the school infrastructure. A load average of 50+ is, basically, 'king ludicrous unless you have some enormously large machine with enormous amounts of processors doing an enormous amount of work (or someone fork-bombs a computer to make it completely unusable.

This patch is not for normal usage. If you're hitting 50+ load average on normal usage you need to either upgrade or stop running so much on that machine. Highest I ever saw was 20-something on a production machine that went haywire with its antivirus scanning of incoming webpages, but it's trivial to make it go higher just by basically fork-bombing the system. Highest I would ever expect on a production machine? I'd worry if it went above 2 or 3 on a server, I've seen it hit four of five on a desktop that was booting and that had large stuff like Firefox loading on boot (but to be honest, it's hard to even SEE the load average on a machine that busy).

This patch will help you click buttons on a desktop to shut down if your system suddenly spawns a few thousand processes. That's it.

Edit:

"Both videos show the Core i7 970 system running the GNOME desktop while playing back the Ogg 1080p version of the open Big Buck Bunny movie, glxgears, two Mozilla Firefox browser windows open to Phoronix and the Phoronix Test Suite web-sites, two terminal windows open, the GNOME System Monitor, and the Nautilus file manager. These videos just show how these different applications respond under the load exhibited by compiling the latest Linux kernel using make -j64 so that there are 64 parallel make jobs that are completely utilizing the Intel processor."

The last line is the killer - that's 64 gcc processes running simultaneous while trying to play a HD movie with all sorts of memory-heavy and benchmark-type programs running. Hell, a single gcc process can easily hit 100% usage of its thread with just a small C++ source file -j 4 is the max my brand-new dual-core laptop can handle before you see no speed benefits (but get 100% CPU and the fans go to max straight away). -j 64 is just ludicrously high (i.e. designed to run on an ~64 processor computer. Yes, the machine is much more responsive when the patch is loaded on that sort of load but if you're doing that to ANY computer you're going to really hurt performance - that's like trying to run 64 Playstation emulators or something simultaneously (i.e. each one could easily hit 100% CPU all the time) and have an ordinary desktop usage.
 
Last edited by a moderator:
Hi,

Good article, thanks Lomaxx for the link :)

Nice to see improvements to the Linux kernel, I don't know if the Pandora will make use of them though...

Bye, Magic Sam
 
BFS would be more likely to have actual tangible benefits on something like the Pandora. It's used in some of the custom Android ROMs and a few desktop Linux distros, and people at least claim that it noticeably increases responsiveness.

BFS - The Brain Fuck Scheduler by Con Kolivas.

Goals.

The goal of the Brain Fuck Scheduler, referred to as BFS from here on, is to
completely do away with the complex designs of the past for the cpu process
scheduler and instead implement one that is very simple in basic design.
The main focus of BFS is to achieve excellent desktop interactivity and
responsiveness without heuristics and tuning knobs that are difficult to
understand, impossible to model and predict the effect of, and when tuned to
one workload cause massive detriment to another.
 
Back
Top