From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from sog-mx-3.v43.ch3.sourceforge.com ([172.29.43.193] helo=mx.sourceforge.net) by sfs-ml-1.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1VA2lY-0006QM-FA for user-mode-linux-devel@lists.sourceforge.net; Thu, 15 Aug 2013 18:59:24 +0000 Received: from mx1.redhat.com ([209.132.183.28]) by sog-mx-3.v43.ch3.sourceforge.com with esmtp (Exim 4.76) id 1VA2lU-0001lg-GI for user-mode-linux-devel@lists.sourceforge.net; Thu, 15 Aug 2013 18:59:24 +0000 Date: Thu, 15 Aug 2013 19:59:10 +0100 From: "Richard W.M. Jones" Message-ID: <20130815185910.GQ5918@redhat.com> References: <20130809204355.GA10864@redhat.com> <20130814175911.GG10864@redhat.com> <20130815175945.GO5918@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: List-Id: The user-mode Linux development list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: user-mode-linux-devel-bounces@lists.sourceforge.net Subject: Re: [uml-devel] Performance tests (was: Using UML in libguestfs) To: richard -rw- weinberger Cc: "user-mode-linux-devel@lists.sourceforge.net" On Thu, Aug 15, 2013 at 08:41:53PM +0200, richard -rw- weinberger wrote: > Meant regarding fsync()... Ah right, see what you mean :-) It calls sync(2). Then it opens each /dev/ubdX device and calls fsync on the file descriptor: https://github.com/libguestfs/libguestfs/blob/master/daemon/sync.c#L54 The reason for this is a bit complicated, but has to do with write barriers. I believe this has been fixed since then. https://github.com/libguestfs/libguestfs/commit/c0a3c9ce70b98171e737e49e6dccc4457963f2ec In any case, we're calling sync & fsync in the guest, and that ain't causing the host cache to be flushed. It's pretty easy to show this with libguestfs: LIBGUESTFS_BACKEND=uml LIBGUESTFS_HV=~/d/linux-um/linux \ time ./run ./fish/guestfish -N fs:ext2:1G -m /dev/sda1 fallocate64 /data 800M time sync The first command finishes in 8 seconds, with barely any disk activity. The sync afterwards takes 9 seconds with the disk light on the whole time, while it actually writes the whole 800 MB of data. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones virt-top is 'top' for virtual machines. Tiny program with many powerful monitoring features, net stats, disk stats, logging, etc. http://people.redhat.com/~rjones/virt-top ------------------------------------------------------------------------------ Get 100% visibility into Java/.NET code with AppDynamics Lite! It's a free troubleshooting tool designed for production. Get down to code-level detail for bottlenecks, with <2% overhead. Download for free and get started troubleshooting in minutes. http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk _______________________________________________ User-mode-linux-devel mailing list User-mode-linux-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel