Business IT - Technology for your business

No. 1 Story

Telstra adds one million mobile services, but Sensis plummets

Telstra has revealed the addition of almost one million new mobile services in the six months to December 2011, but Sensis revenues plummeted 24 percent in 12 months.

read more

An Ubuntu guide to taming the Linux kernel

Business IT - Open Source

Tuning the kernel
Most pieces of software use configuration files to adjust how they function; the kernel is no different in this regard. One of its most important configuration files is /etc/sysctl.conf which sets the value of a wide range of kernel parameters.

Most every article on tweaking performance out of Ubuntu will invariably direct you to edit /etc/sysctl.conf. For example, broadband users might tweak TCP/IP settings. Or you might adjust how much of the system’s RAM is used for shared memory (which is utilised for inter-process communication between separate running apps.) These articles, and many others, are well worth reading, along with the sysctl.conf man page itself.

You don’t need to reboot to see your modifications take effect; Ubuntu handily provides a command called sysctl to adjust parameters directly on the running kernel. Note that although sysctl will act right away, it won’t persist the modification; if you are happy with it, you need to still modify /etc/sysctl.conf. An example of using sysctl to alter a running kernel is given in the Ubuntu Community Docs to adjust timer resolutions for MIDI purposes.

Compiling the kernel
All this said, there are times when you might want to install a new kernel. For most people this will not be necessary, as Ubuntu provides a range of kernels for different processor types as well as letting modules be manipulated and parameters be tweaked as we have discussed, but rebuilding does allow you to make use of the very latest compilers and libraries, and allows you to exercise full control.

If you wish to go down this route, be sure to make a working boot disk so you can boot back up to a known state should something go wrong. From here, the steps are basically a sequence of ‘make’ commands.

Begin with make mrproper to tidy up the source tree. This command will clear all previously compiled binaries as well as other intermediate files. Note carefully this will remove the essential .config file so either save a copy, or wait until after running mrproper to create it. You can use commands make menuconfig or make xconfig (for a GUI) to adjust this configuration file.
Use make dep to create code dependencies, make clean to prepare sources, and then make bzImage to actually generate a compressed binary image.

Execute make modules to compile modules; make modules_install to install the resulting binaries into /lib/modules. Run make install to copy your new kernel to /boot and to perform other important tasks.

You’ve finished with the source code at this point, but before rebooting to test your new kernel, be sure to verify that the /boot/grub/grub.conf or /etc/lilo.conf boot loader files have been updated to use your new kernel.

While rebooting, monitor the screen for any errors and be sure to inspect /var/log/messages after successfully logging in.

With this information all understood, you now have a good grounding to launch into the kernel and to take full control over how it operates on your own computer.

Loading comments ...



- sponsored feature -

The Death of Traditional BI: What’s Next?

How to Make Business Discovery Work for Your Business IP PABX BUYING GUIDE

Business Discovery takes its cues from consumer apps. Like Google, it encourages us- ers to hunt for and explore data without worrying about or even noticing the underly- ing technology. Their entire experience is working within an intuitive interface to get real-time, self-service results with only minimal training. ...more