Re: [PATCH 1/2] blk-throtl: make latency= absolute

From: Tejun Heo
Date: Tue Nov 14 2017 - 09:53:13 EST


Hello, Shaohua.

On Mon, Nov 13, 2017 at 02:08:04PM -0800, Shaohua Li wrote:
> I think this is what we don't agree with. The user doesn't really care about
> the IO latency. What user care about is 'read' syscall latency or 'fsync'
> syscall latency. The syscall could do several 4k IO or 1M IO or mixed. To meet
> the syscall latency target, we must control the latency for each IO. If we use
> absolute latency, it can only control some IOs. In this case, it's very likely
> the syscall latency requirement isn't met. So we do need to know what the
> underlying device is.

Hmmm... the IO pattern of a workload can often be pretty well defined,
so I don't think it'd be too difficult to say "as long as most IOs
that this workload issues finishes under Xms, this works fine". It of
course doesn't cover all use cases but all that's being argued is that
it is good enough for some use cases.

> That said, absolute latency is useful for HD. But on the other hand, HD
> baseline is always 4ms for any size IO. So absolute latency = 4ms + slack,
> unless you want to specify a smaller than 4ms absolute latency.

If you do small random IOs and then big ones, there are significant
differences in performance characteristics. I don't understand how
declaring that the baseline is always 4ms for harddisks would work.

Thanks.

--
tejun