Re: IO scheduler, queue depth, nr_requests
From: Nick Piggin
Date: Wed Feb 25 2004 - 19:40:29 EST
Bill Davidsen wrote:
linux.kernelNick Piggin wrote:
But the whole reason it is getting blocked in the first place
is because your controller is sucking up all your requests.
The whole problem is not a problem if you use properly sized
queues.
I'm a bit surprised that it wasn't working well with a controller
queue depth of 64 and 128 nr_requests. I'll give you a per process
request limit patch to try in a minute.
And there's the rub... he did try what you are calling correctly sized
queues, and his patch works better. I'm all in favor of having the
theory and then writing the code, but when something works I would
rather understand why and modify the theory.
In other words, given a patch which does help performance in this
case, it would be good to understand why, instead of favoring a
solution which is better in theory, but which has been tried and found
inferior in performance.
I am NOT saying we should just block, effective as Miquel's patch
seems, just that we should understand why it works well instead of
saying it is in theory bad. I agree, but it works! Hopefully
per-process limits solve this, but they "in theory" could result in
blocking a process in an otherwise idle system. Unless I midread what
you mean of course. Processes which calculate for a while and write
results are not uncomon, and letting such a process write a whole
bunch of data and then go calculate while it is written is certainly
the way it should work. I'm unconvinced that per-process limits are
the whole answer without considering the entire io load on the system.
Feel free to tell me I'm misreading your intent (and why).
No, I know Miquel's patch works and his analysis of what is happening
is correct (he proved it). The patch is a bit of a hack to get around
the specific problem he is seeing which should never happen with an
appropriately sized queue, and it might actually hurt in some cases.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/