On Sun, 6 Mar 2005, Krisztian PIFKO wrote:
> could someone please tell me how much memory an uml consumes
> if the temp dir for the unlinked temp files is on tmpfs?
> 
> for example does a 64M uml use 2*64 megs of ram this way?


My UML is configured with 120 MB simulated RAM.  Host and guest have kernel 
2.6.8, with SKAS on the host.  I made the UML hog the CPU plus do a lot of 
I/O and then ran "top", which says:

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND           
13191 jimc      17   0  123m  92m 122m S 89.7 36.9   0:56.64 linux              
13196 jimc      15   0   392   80  392 T  6.3  0.0   0:13.30 linux              

After all that, "df" on the tmpfs filesystem with the image file indicates 
that it occupies 96.4 MB.  So definitely the memory is not allocated twice.  
My understanding is that tmpfs allocates an I/O page for the data just as 
if it had been read/written to disc, but it wasn't.  Then the user (UML) 
maps (not copies) that page into its own address space.  

I imagine that the 31 MB difference between the virtual address space and 
the resident set (nearly equal to the image size) is occupied by 2.95 MB of 
UML kernel and the program text of various system daemons and their shared 
libraries, mapped from the host's file that's attached to /dev/ubda.  

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)


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user

Reply via email to