The MLN Project

Complex virtual machine management made easy


On this page we gather usefull tips on how to make User-mode-linux run as optimized as possible. Most of these tips are mentioned on other howtos around. The newest tricks are usually discussed on the uml mailing lists, so pay attention there if you want the latest news.

SKAS patch

Patching the host kernel with this patch gives a signifficant boost in both security and performance. Please correct me if i am wrong. You can find out more on this on blaisorblades homepage: It is my impression that most people who use uml for something also have this patch.

SuSe 9.2 ship their default kernel with this patch applied. If you know of other distributions which do that, please let me know.

TMPDIR using tempfs

User-mode-linux creeates files on /tmp for their memory. Making sure they are placed in a ram-based filesystem will increase the speed. This is easily done (as root):

mkdir /tmp/mln

mount -t tmpfs -o size=2048m,mode=1777 none /tmp/mln

echo "setenv TMPDIR /tmp/mln" >> /etc/screenrc

This little snippet assigns 2GB of virtual filesystem. Some say you should assign as much as all your UMLs have booked but not more than RAM + SWAP on your host system. Please adjust it to your own needs. We also assume that the projects use screen and not xterm. The last line will make sure the environment variable is exported to the screen process (since it sets up its own). If you want it to count for xterm too, make sure it is a environment variable for the shell which runs the mln command.