diff options
author | Omar Sandoval <osandov@fb.com> | 2018-09-27 15:55:54 -0700 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2018-09-27 17:34:57 -0600 |
commit | 6e25cb01ea206362616a2be469d4f3635f58ca63 (patch) | |
tree | 4910f9e2fcfe20267e6337394080cc489cbdd150 /drivers/block/xen-blkfront.c | |
parent | fa2a1f609e6491383ab63ff6329e0aaa2db2b9f7 (diff) | |
download | linux-stable-6e25cb01ea206362616a2be469d4f3635f58ca63.tar.gz linux-stable-6e25cb01ea206362616a2be469d4f3635f58ca63.tar.bz2 linux-stable-6e25cb01ea206362616a2be469d4f3635f58ca63.zip |
kyber: implement improved heuristics
Kyber's current heuristics have a few flaws:
- It's based on the mean latency, but p99 latency tends to be more
meaningful to anyone who cares about latency. The mean can also be
skewed by rare outliers that the scheduler can't do anything about.
- The statistics calculations are purely time-based with a short window.
This works for steady, high load, but is more sensitive to outliers
with bursty workloads.
- It only considers the latency once an I/O has been submitted to the
device, but the user cares about the time spent in the kernel, as
well.
These are shortcomings of the generic blk-stat code which doesn't quite
fit the ideal use case for Kyber. So, this replaces the statistics with
a histogram used to calculate percentiles of total latency and I/O
latency, which we then use to adjust depths in a slightly more
intelligent manner:
- Sync and async writes are now the same domain.
- Discards are a separate domain.
- Domain queue depths are scaled by the ratio of the p99 total latency
to the target latency (e.g., if the p99 latency is double the target
latency, we will double the queue depth; if the p99 latency is half of
the target latency, we can halve the queue depth).
- We use the I/O latency to determine whether we should scale queue
depths down: we will only scale down if any domain's I/O latency
exceeds the target latency, which is an indicator of congestion in the
device.
These new heuristics are just as scalable as the heuristics they
replace.
Signed-off-by: Omar Sandoval <osandov@fb.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/block/xen-blkfront.c')
0 files changed, 0 insertions, 0 deletions