From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39718) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XN3HB-0006dr-2S for qemu-devel@nongnu.org; Thu, 28 Aug 2014 13:14:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XN3H6-00087c-Hj for qemu-devel@nongnu.org; Thu, 28 Aug 2014 13:14:21 -0400 Received: from mx1.redhat.com ([209.132.183.28]:28607) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XN3H6-00087Q-7o for qemu-devel@nongnu.org; Thu, 28 Aug 2014 13:14:16 -0400 From: Markus Armbruster References: <20140828123635.GQ26741@stefanha-thinkpad.redhat.com> <20140828150044.GE28789@irqsave.net> Date: Thu, 28 Aug 2014 19:14:07 +0200 In-Reply-To: <20140828150044.GE28789@irqsave.net> (=?utf-8?Q?=22Beno=C3=AE?= =?utf-8?Q?t?= Canet"'s message of "Thu, 28 Aug 2014 17:00:44 +0200") Message-ID: <87fvggsfj4.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 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: =?utf-8?Q?Beno=C3=AEt?= Canet Cc: Stefan Hajnoczi , qemu-devel , Anshul Makkar Beno=C3=AEt Canet writes: > The Thursday 28 Aug 2014 =C3=A0 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 bet= ween >> > start of IO and end of IO. >> > (firing my latency tracker from function BlockDriverAIOCB *raw_aio_sub= mit() >> > raw-posix.c when job is submitted). >> >=20 >> > The latency data per QEMU process will be written to shared memory and= 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 bloc= ked >> > by some other process in our subsystem. >> >=20 >> > Just want a suggestion whether my approach is correct given the constr= aint >> > 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 > very useful. For what it's worth, query-blockstats already reports the sum of certain latencies.