PDA

View Full Version : Memory Problem running UML/MLN [SOLVED]



svenaron
08-22-2005, 03:07 PM
Hi

As part of a project I'm doing in school we have been remastering KNOPPIX and installing MLN (My Linux Network, mln.sourceforge.net). The goal is to create a virtual lab environment on a bootable CD for students to experiment with and do assignments in.
We have UML and MLN running in a slightly stripped down version of Knoppix 3.8 and we've created some projects in MLN for the different assignments. Everything is working fine as long as KNOPPIX is running from harddrive in uncompressed state, but when we compress and compile into a cd image memory usage explodes and everything crashes.

The MLN projects are using a small kernel of just a few MB and a filesystem template of 165MB. Projects consist of up to 5 virtual machines using COW (copy on write) to limit disk usage. The different projects use the same COW-master image through symlinks. When we're running the projects from a decompressed system on harddrive (using the UKUUG knoppix-remaster script) top shows a memory usage of about 256MB. When running the compiled version either from iso on harddrive or from my cd on my system (512MB ram and 1GB swap-space) the VM's crash about halfway through the booting process.

We're completely stuck as to what is causing this huge memory usage, we managed to get the project running on a computer with 2GB ram but even then top showed a memory usage of about 1.9GB which just seems completely insane.

If anyone has any ideas as to what might be the problem we'd be very happy if you could post here or email me.

Best regards
Sven Westergren
sven westergren at gmail com.

svenaron
08-23-2005, 09:18 PM
Just thought I'd let you know that we managed to solve the problem.
The culprit was the cow-files which at a glance (e.g. using ls) appear to be the same size as the filesystem template while they are really quite small (du shows a few MB each).
However, when compressed, placed on the cd and then decompressed when the system boots the blow up to be the actual full size and so running 4-5 virtual machines causes Knoppix to load 4-5 times 165MB into ram even though they only contain a few MB of data each.
We solved it by building the projects "live", thus the cow-files are created onto the ramdisk and are never compressed or decompressed. Result is a longer startup time but still completely acceptable.

Sven Westergren