sodonnel commented on pull request #3168: URL: https://github.com/apache/ozone/pull/3168#issuecomment-1060581431
> And one more thing, I don't think more threads help to increase IO throughput since the threads are usually asynchronously sending works and waiting the response which are not CPU-intensive works. The point of the thread pool is to read the pieces of the stripe in parallel, so we don't have to wait as long to perform the EC Decode. If we have many concurrent files being read, then we will need more than EC Datanum threads to handle these aysnc reads. Eg 10 files all trying to read the stripe at the same time will result in some of the file needing to queue to get a thread to perform that IO. A fixed thread pool is difficult for a user, as they have to (1) know there is a problem with throughput and (2) know there is a parameter to tune it and (3) decide on a best value. If we had an elastic pool with a min threads and max threads set to some high but reasonable number (maybe 5 and 100) then it removes any of these problems from the user. However I think we should try to fix the KeyInputStream first to stop it pre-allocating all the blocks up front and also make sure it closes a block after it finishes reading it. That would reduce the overall resources significantly and probably make the file start reading faster. Then take a benchmark and compare with different thread pool approaches. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
