All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Emilio G. Cota" <cota@braap.org>
To: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Cc: Stefan Hajnoczi <stefanha@gmail.com>,
	kwolf@redhat.com, qemu-block@nongnu.org, armbru@redhat.com,
	qemu-devel@nongnu.org, mreitz@redhat.com,
	nshirokovskiy@virtuozzo.com, den@openvz.org
Subject: Re: [Qemu-devel] [PATCH v2 0/2] block latency histogram
Date: Thu, 8 Mar 2018 13:56:38 -0500	[thread overview]
Message-ID: <20180308185638.GA25161@flamenco> (raw)
In-Reply-To: <482599db-65b7-ba5d-6784-72acf3486786@virtuozzo.com>

On Thu, Mar 08, 2018 at 14:42:29 +0300, Vladimir Sementsov-Ogievskiy wrote:
> Hi Emilio!
> 
> Looked through qdist, if I understand correctly, it saves each added (with
> different value) element. It is not effective for disk io timing - we'll
> have too much elements. In my approach, histogram don't grow, it initially
> have several ranges and counts hits to each range.

I thought about this use case, i.e. having a gazillion elements.
You should just do some pre-binning before inserting samples
into qdist, as pointed out in this comment in qdist.h:

/*
 * Samples with the same 'x value' end up in the same qdist_entry,
 * e.g. inc(0.1) and inc(0.1) end up as {x=0.1, count=2}.
 *
 * Binning happens only at print time, so that we retain the flexibility to
 * choose the binning. This might not be ideal for workloads that do not care
 * much about precision and insert many samples all with different x values;
 * in that case, pre-binning (e.g. entering both 0.115 and 0.097 as 0.1)
 * should be considered.
 */
struct qdist_entry {
    double x;
    unsigned long count;
};

Let me know if you need help with that.

Thanks,

		Emilio

  reply	other threads:[~2018-03-08 18:56 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-07 12:50 [Qemu-devel] [PATCH v2 0/2] block latency histogram Vladimir Sementsov-Ogievskiy
2018-02-07 12:50 ` [Qemu-devel] [PATCH v2 1/2] block/accounting: introduce " Vladimir Sementsov-Ogievskiy
2018-03-05 14:36   ` Vladimir Sementsov-Ogievskiy
2018-03-06 15:32   ` Stefan Hajnoczi
2018-03-08 17:31     ` Eric Blake
2018-03-08 18:14       ` Vladimir Sementsov-Ogievskiy
2018-03-08 18:21         ` Vladimir Sementsov-Ogievskiy
2018-03-08 18:58           ` Vladimir Sementsov-Ogievskiy
2018-03-08 19:49             ` Eric Blake
2018-02-07 12:50 ` [Qemu-devel] [PATCH v2 2/2] qapi: add block latency histogram interface Vladimir Sementsov-Ogievskiy
2018-03-06 15:58   ` Stefan Hajnoczi
2018-02-07 13:20 ` [Qemu-devel] [PATCH v2 0/2] block latency histogram no-reply
2018-02-07 13:29   ` Vladimir Sementsov-Ogievskiy
2018-02-15  9:38 ` [Qemu-devel] ping " Vladimir Sementsov-Ogievskiy
2018-03-02 10:27 ` Vladimir Sementsov-Ogievskiy
2018-03-06 16:00 ` [Qemu-devel] " Stefan Hajnoczi
2018-03-06 17:49   ` Emilio G. Cota
2018-03-08 11:42     ` Vladimir Sementsov-Ogievskiy
2018-03-08 18:56       ` Emilio G. Cota [this message]
2018-03-08 19:07         ` Vladimir Sementsov-Ogievskiy
2018-03-08 20:05           ` Emilio G. Cota
2018-03-08 17:32   ` Eric Blake

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180308185638.GA25161@flamenco \
    --to=cota@braap.org \
    --cc=armbru@redhat.com \
    --cc=den@openvz.org \
    --cc=kwolf@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=nshirokovskiy@virtuozzo.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@gmail.com \
    --cc=vsementsov@virtuozzo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.