From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41853) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XN1Ck-0007bY-8y for qemu-devel@nongnu.org; Thu, 28 Aug 2014 11:01:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XN1Ce-0001Lh-H3 for qemu-devel@nongnu.org; Thu, 28 Aug 2014 11:01:38 -0400 Received: from lputeaux-656-01-25-125.w80-12.abo.wanadoo.fr ([80.12.84.125]:58208 helo=paradis.irqsave.net) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XN1Ce-0001Ld-Af for qemu-devel@nongnu.org; Thu, 28 Aug 2014 11:01:32 -0400 Date: Thu, 28 Aug 2014 17:00:44 +0200 From: =?iso-8859-1?Q?Beno=EEt?= Canet Message-ID: <20140828150044.GE28789@irqsave.net> References: <20140828123635.GQ26741@stefanha-thinkpad.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <20140828123635.GQ26741@stefanha-thinkpad.redhat.com> Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] block IO latency tracker without using QMP socket. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: Anshul Makkar , qemu-devel The Thursday 28 Aug 2014 =E0 13:36:35 (+0100), Stefan Hajnoczi wrote : > On Wed, Aug 27, 2014 at 04:58:12PM +0200, Anshul Makkar wrote: > > I am writing a block IO latency tracker. > >=20 > > As obvious, I am calculating the latency by tracking the interval be= tween > > start of IO and end of IO. > > (firing my latency tracker from function BlockDriverAIOCB *raw_aio_su= bmit() > > raw-posix.c when job is submitted). > >=20 > > The latency data per QEMU process will be written to shared memory an= d then > > another app uses this shared memory to read the data. That's a simple > > architecture. > >=20 > > Can't use "info blockstats" QMP command as qmp socket is used and blo= cked > > by some other process in our subsystem. > >=20 > > Just want a suggestion whether my approach is correct given the const= raint > > that I can't use qmp socket or if any alternative is possible. >=20 > Simplest option: use iostat(1) inside the guest. >=20 > Or you can use tracing tools to measure block I/O request latency. >=20 > An example from a few years ago: > http://www.linux-kvm.org/page/Virtio/Block/Latency >=20 > It depends what you are trying to achieve. Stefan: ProfitBrick is a cloud provider. This means they could prepare AMI (Virtual machine images) with stuff in = it but they never would access the shell of a running VM. What happen in the guest after the AMI instanciation into a running VM is= the end user business and the cloud provider should not violate the end user = territory. I also agree that having QEMU collecting latencies statistics would be ve= ry useful. Best regards Beno=EEt >=20 > Stefan