Java Concurrency Interview – What is an Ideal Threadpool size?

Answer – the size depends on number of CPU cores and whether the task is CPU bound or IO bound.

For CPU bound (CPU intensive) tasks, the ideal size is same as number of CPU cores.

For IO bound tasks, ideal size depends on the wait time of the IO task. More the wait time, more number of threads can be used to ensure maximum CPU utilization.

Complex concepts explained in short & simple manner. Topics include Java Concurrency, Spring Boot,…

Related Posts


  1. One of the best explanations for thread pooling I have seen so far which many have failed to do. It would be great if you can extend the discussion on how hyperthreading works along with thread pools.

  2. Excellent ? explanation. Please do more videos on java concurrency.
    Also my suggestion is it would be great if you create videos which covers java concurrency book with your animation and explanation Thanks again

Leave a Reply

Your email address will not be published.

© 2022 Code As Pro - Theme by WPEnjoy · Powered by WordPress