guihecheng commented on pull request #3168:
URL: https://github.com/apache/ozone/pull/3168#issuecomment-1060468393


   > OK, I see some more details in the Jira.
   > 
   > > But as I read the code, the BlockExtendedInputStream for each block is 
only closed altogether when the KeyInputStream is closed(This design may be 
intended to support seek backward during read).
   > 
   > I think this is a bug. Keeping the blocks open for backward seek was never 
something I thought about. The block stream for a given block should ideally be 
closed when its read is completed. If that bug was fixed, I wonder if a shared 
thread pool is still necessary. I'd like to avoid needing to change 
configuration depending on how many files are being read concurrently in the 
same client. I will have a look at the block closing issue.
   
   OK, I'll wait until you have checked the closing issue with block streams.
   
   But here is a problem, even the block streams are closed, then at least 
we'll have one thread pool per open file/key, right?
   So imagine that we have 1000 concurrent reads for 1000 big files(EC:10+4) 
from a client, then we may get 1000 thread pools with 10 threads per each, that 
is 10000 threads in total.
   More concurrent file reads we have, more threads we get, it absolutely does 
not scale well.


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