kernel

Soft scrollback for the Linux VGA console

If you're a heavy user of the Linux VGA console, you'll like this feature. Recent 2.6 kernels have added support for soft scrollback. This feature enables you to have much bigger scrollback buffer than the standard console has, at the price of slightly slower console output.

The scrollback buffer of the standard VGA console is located in VGA RAM. This RAM is fixed in size and is very small. To make the scrollback buffer larger, it must be placed instead in System RAM. We call this soft scrollback.

The feature and the size of the buffer are enabled/configured through kernel config options, during kernel compilation. Beside consuming kernel memory, enabling this feature will slow down the console by approximately 20%.

CFQ to become the default I/O scheduler in 2.6.18

Judging by this commit, CFQ (Complete Fair Queuing) I/O scheduler will become the default one in the upcoming 2.6.18 kernel. For a long time, anticipatory scheduler has been the default, although even back in late 2004 there was some thinking about replacing it with CFQ. And it seems the time has finally come. CFQ scheduler has been gaining adoption since then, to the point that it's the default I/O scheduler for RHEL 4, Suse, and other distros.

One of the coolest things about CFQ is that it features I/O priorities (since 2.6.13). That means you can set the I/O priority of a process so you can avoid that a process that does too much I/O (daily updatedb) starves the rest of the system, or give extra priority to a process that shouldn't be starved by other processes, by using the ionice tool included in schedutils (since version 1.5.0).

The adaptive readahead patch benchmark

One of the more interesting patches for the linux kernel lately has been Wu Fengguang's adaptive readahead patchset, currently at version 12. Talking about its performance benefits Wu says: "besides file servers and desktops, it is recently found to benefit postgresql databases a lot.".

So I decided to do a simple benchmark to see what difference would adaptive readahead make in my case. The idea was to test a very simple database query (random select) to the PostgreSQL database and see how it performs through time (while the memory is being primed with data from disk).

Syndicate content