Re: [PATCH] speed up SATA

Timothy Miller
2004-03-30T15:36:04Z

Jens Axboe wrote:

>
>
> Here's a quickly done patch that attempts to adjust the value based on a
> previous range of completed requests. It changes ->max_sectors to be a
> hardware limit, adding ->optimal_sectors to be our max issued io target.
> It is split on READ and WRITE. The target is to keep request execution
> time under BLK_IORATE_TARGET, which is 50ms in this patch. read-ahead
> max window is kept within a single request in size.
>
[snip]

Awesome patch!

One question I have is about how you are determining optimal request
size. You are basing this on the _maximum_ performance of the device,
but there could be huge differences between min and max performance.
Would it be better to compute optimal based on worst-case performance?
Or averaged over time?

Idealy, we'd have a running average where one hit of worst-case will
have an impact, but if that happens only once, it'll drop out of the
average, and best-case events will be considered but tempered as well.

If we're going for real-time, then we want to avoid any latency over
50ms. In that case, we'd want to go based on worst-case, although it
would still be good to let, say, an occasional hardware glitch which had
slow response to not have permanent impact.