How to manage thread count with respect to available memory in Java. That means, I want to control the count of running threads, by coding, with respect to memory available in the server. Any types of suggestion, tips, tutorial, lib is welcome.
Yes use executorService. In Java Concurrency in Practice it is actually recommended to set the thread count based on the number of processors. I think the formula was thread count = number of processors + one, but I may remember wrong...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With