On Thu, 14 Apr 2005, itamar wrote: > Itīs possible to use the same TMPDIR for all umlīs in the host ? > mkdir /tmp/uml > mount -t tmpfs -o mode=1777,size=512M none /tmp/uml > TMPDIR=/tmp/uml linux mem=512M ...<rest of linux command>
Certainly this is possible, but you've allowed space for only one guest. If there are two guests, sooner or later they will run each other out of virtual memory, fatally. Also you need to allow a few blocks of overhead -- the guest's mem= parameter should be less than, not equal to, the size of the tempfs. What do people think about this solution: First create a huge swap partition, let's say 5 GB. There used to be an addressing limit so swap files could be 2 GB max; is this still true in host kernel 2.6.x? If so, create several swap files (up to 32). Then create one tmpfs, so its size plus physical memory plus some extra for unplanned host processes comes out less than the size of the swap file. (Does tmpfs have an intrinsic limit to 2 GB or 4 GB?) (If there isn't enough swap space to swap out the tmpfs, the host kernel will panic in the middle of operation.) Then start all the guests, not overbooking the tmpfs. Alternatively, create a separate tmpfs for each guest. That way would wake fewer sleeping dragons, the overhead would be only microscopically greater, and there's still no commitment of physical memory or host swap until the guest actually uses it. But the sum of sizes of all the tmpfs's plus physical memory plus extra must still be less than the actual swap space; otherwise, sooner or later the guests *will* use it all up and the host will panic, being unable to swap out the tmpfs's to make room for host processes such as init. If you're giving 512 MB to each guest, remember to raise the memory mapping limit to match: echo 131072 > /proc/sys/vm/max_map_count (default is 65536 = 2^16, which is good for a 256 MB guest). Hope this helps! James F. Carter Voice 310 825 2897 FAX 310 206 6673 UCLA-Mathnet; 6115 MSA; 405 Hilgard Ave.; Los Angeles, CA, USA 90095-1555 Email: [EMAIL PROTECTED] http://www.math.ucla.edu/~jimc (q.v. for PGP key)