Java Concurrency Interview - What is an Ideal Threadpool size?

Опубликовано: 06 Сентябрь 2019
на канале: Defog Tech
62,302
2.1k

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.


Channel
----------------------------------
Complex concepts explained in short & simple manner. Topics include Java Concurrency, Spring Boot, Microservices, Distributed Systems etc. Feel free to ask any doubts in the comments. Also happy to take requests for new videos.

Subscribe or explore the channel -    / defogtech  

New video added every weekend.

Popular Videos
----------------------------------
What is an API Gateway -    • What is an API Gateway?  
Executor Service -    • Java ExecutorService - Part 1 - Intro...  
Introduction to CompletableFuture -    • Introduction to CompletableFuture in ...  
Java Memory Model in 10 minutes -    • Java Memory Model in 10 minutes  
Volatile vs Atomic -    • Using volatile vs AtomicInteger in Ja...  
What is Spring Webflux -    • What is Spring Webflux and when to us...  
Java Concurrency Interview question -    • Java Concurrency Interview Question: ...  


Смотрите видео Java Concurrency Interview - What is an Ideal Threadpool size? онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Defog Tech 06 Сентябрь 2019, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 62,302 раз и оно понравилось 2.1 тысяч людям.