guihecheng edited a comment on pull request #3168:
URL: https://github.com/apache/ozone/pull/3168#issuecomment-1060607501


   > > 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.
   
   Well, if we are discussing about a global shared thread pool for reconstruct 
read, then I agree that, ideally, a bounded elastic pool is better that a fixed 
thread pool. But we could take steps to do so:
   Step1: Make it a global thread pool, fixed.
   Step2: Make the pool to be a bounded elastic one, it should be easier to do 
this based on step1.
   
   > 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.
   
   Well, I understand the behavior mentioned above, then we should pay 
attention to the case: seek backward, upon which we'll have to reopen the 
closed BlockInputStream and insert it into the correct position in the 
KeyInputStream.
   I will +1 for this refactoring of the KeyInputStream, but it is a relatively 
a big change since it influences the non-EC path too, we may have to get more 
attention and comments about this part.
   


-- 
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]

Reply via email to