From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Gm5sD-00044B-LG for qemu-devel@nongnu.org; Mon, 20 Nov 2006 04:55:33 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Gm5sA-00042U-MY for qemu-devel@nongnu.org; Mon, 20 Nov 2006 04:55:32 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Gm5sA-000428-7q for qemu-devel@nongnu.org; Mon, 20 Nov 2006 04:55:30 -0500 Received: from [66.54.152.27] (helo=jive.SoftHome.net) by monty-python.gnu.org with smtp (Exim 4.52) id 1Gm5sA-00089R-44 for qemu-devel@nongnu.org; Mon, 20 Nov 2006 04:55:30 -0500 From: Mulyadi Santosa Subject: Re: [Qemu-devel] -snapshot and tmpsfs Date: Sun, 19 Nov 2006 16:57:25 +0700 References: <964923.2721.qm@web52601.mail.yahoo.com> In-Reply-To: <964923.2721.qm@web52601.mail.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200611191657.25848.a_mulyadi@softhome.net> Reply-To: a_mulyadi@softhome.net, qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, Ottavio Caruso Hi Ottavio > Are the writes to tmpfs (in a *nix guest OS) recorded to the > snapshotted image? > > Example: /var/run on tmpfs > OS writes to /var/run. Bigger temp file or not? >>From what I saw, the temp file isn't bigger unless the tmpfs' size is exceeding the simulated RAM size, thus some of them are getting into the simulated swap...in this case, the snapshot image. Qemu itself already allocates a memory area as big as the argument you gave in -m. Here is something you see if you use -m 64 like I did: 42131000 (69968 KB) rw-p (00:00 0) (Because of the work of demand paging, this VMA size doesn't neccessarily reflect the size of the actual allocated pages). I also try to diff the lsof's output and pmap's output before and after I write 43 MB of zero-filled file in tmpfs-based directory (while the size of tmpfs itself is 44MB) and I only get these: # diff -u pmap{1,3}.txt --- pmap1.txt 2006-11-19 16:31:44.000000000 +0700 +++ pmap3.txt 2006-11-19 16:33:54.000000000 +0700 @@ -1,7 +1,7 @@ qemu(5017) 08048000 (688 KB) r-xp (16:02 897438) /usr/local/qemu080/bin/qemu 080f4000 (36 KB) rw-p (16:02 897438) /usr/local/qemu080/bin/qemu -080fd000 (27372 KB) rwxp (00:00 0) +080fd000 (27384 KB) rwxp (00:00 0) 40000000 (84 KB) r-xp (16:02 244393) /lib/ld-2.3.2.so 40015000 (4 KB) rw-p (16:02 244393) /lib/ld-2.3.2.so 40016000 (4 KB) rw-p (00:00 0) @@ -36,4 +36,4 @@ 4212e000 (12 KB) rw-p (16:02 651591) /lib/tls/libc-2.3.2.so 42131000 (69968 KB) rw-p (00:00 0) bfff4000 (48 KB) rwxp (00:00 0) -mapped: 102288 KB writable/private: 98144 KB shared: 564 KB +mapped: 102300 KB writable/private: 98156 KB shared: 564 KB My conclusion: temp file will get bigger if we write something bigger than simulated RAM size (but still smaller than tmpfs size, of course..). regards, Mulyadi