From: Ming Lei <ming.lei@redhat.com>
To: Josh Snyder <joshs@netflix.com>
Cc: Jens Axboe <axboe@kernel.dk>,
Mikulas Patocka <mpatocka@redhat.com>,
Mike Snitzer <snitzer@redhat.com>,
linux-block@vger.kernel.org, linux-kernel@vger.kernel.org,
Josh Snyder <josh@code406.com>
Subject: Re: [RFC 2/2] Track io_ticks at microsecond granularity.
Date: Tue, 9 Jun 2020 16:50:02 +0800 [thread overview]
Message-ID: <20200609085002.GB270404@T590> (raw)
In-Reply-To: <20200609040724.448519-3-joshs@netflix.com>
On Mon, Jun 08, 2020 at 09:07:24PM -0700, Josh Snyder wrote:
> Previously, we performed truncation of I/O issue/completion times during
> calculation of io_ticks, counting only I/Os which cross a jiffy
> boundary. The effect is a sampling of I/Os: at every boundary between
> jiffies we ask "is there an outstanding I/O" and increment a counter if
> the answer is yes. This produces results that are accurate (they don't
> systematically over- or under-count), but not precise (there is high
> variance associated with only taking 100 samples per second).
>
> This change modifies the sampling rate from 100Hz to 976562.5Hz (1
> sample per 1024 nanoseconds). I chose this sampling rate by simulating a
> workload in which I/Os are issued randomly (by a Poisson process), and
> processed in constant time: an M/D/∞ system (Kendall's notation). My
> goal was to produce a sampled utilization fraction which was correct to
> one part-per-thousand given one second of samples.
>
> The tradeoff of the higher sampling rate is increased synchronization
> overhead caused by more frequent compare-and-swap operations. The
> technique of commit 5b18b5a73760 ("block: delete part_round_stats and
> switch to less precise counting") is to allow multiple I/Os to complete
> while performing only one synchronized operation. As we are increasing
> the sample rate by a factor of 10000, we will less frequently be able to
> exercise the synchronization-free code path.
Not sure if we need so precise %util, and ~1M sampling rate may cause to run
cmpxchg() 1M/sec for each partition, which overhead might be observable.
Thanks,
Ming
prev parent reply other threads:[~2020-06-09 8:50 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-09 4:07 [RFC 0/2] Increase accuracy and precision of sampled io_ticks Josh Snyder
2020-06-09 4:07 ` [RFC 1/2] Eliminate over- and under-counting of io_ticks Josh Snyder
2020-06-09 8:08 ` Ming Lei
2020-06-10 1:41 ` Hou Tao
2020-06-10 7:26 ` Josh Snyder
2020-06-09 4:07 ` [RFC 2/2] Track io_ticks at microsecond granularity Josh Snyder
2020-06-09 6:23 ` kernel test robot
2020-06-09 6:36 ` kernel test robot
2020-06-09 8:50 ` Ming Lei [this message]
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=20200609085002.GB270404@T590 \
--to=ming.lei@redhat.com \
--cc=axboe@kernel.dk \
--cc=josh@code406.com \
--cc=joshs@netflix.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mpatocka@redhat.com \
--cc=snitzer@redhat.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.