Maximum (client request) thread pool size in spring
By : Senthil Kumar
Date : March 29 2020, 07:55 AM
Hope that helps Assuming that you're using embedded Tomcat, Spring Boot uses the server.tomcat.max-threads property to control the size of the client request thread pool. Its default value is zero which leaves Tomcat to use its default of 200. To customise the size of this thread pool you should specify a non-zero value for the server.tomcat.max-threads property in your application.properties or application.yml file.
|
Akka: how to make number of actors in balancing pool relative to thread pool size
By : Remi
Date : March 29 2020, 07:55 AM
I wish this helpful for you It's best to get number of threads from your Akka config (reference.conf or application.conf). Here is the reference doc that explains how it's configured. You can have a custom dispatcher or a default one, so the best thing is to not blindly use the code below but to understand which dispatcher you are actually using. You could do something like this: code :
import akka.actor.ActorSystem
import com.typesafe.config.{Config, ConfigFactory}
val conf = ConfigFactory.load().getConfig("akka.actor.default-dispatcher.fork-join-executor")
def getThreadConf(conf: Config): (Int, Int, Int) = {
val parallelismFactor = conf.getInt("parallelism-factor")
val parallelismMin = conf.getInt("parallelism-min")
val parallelismMax = conf.getInt("parallelism-max")
(parallelismFactor, parallelismMin, parallelismMax)
}
println(getThreadConf(conf))
val system = ActorSystem()
println(getThreadConf(system.settings.config.getConfig("akka.actor.default-dispatcher.fork-join-executor")))
factor: 3, min: 8, max: 64
|
Java - When to use fixed size thread pool and variable size thread pool?
By : Mamourou Traore
Date : March 29 2020, 07:55 AM
it should still fix some issue The only difference is that the second setup allows your to run with a maximum of 10 threads; whereas the first one starts with 5; and will never create more than that. You would use the first setup when you understand that you don't gain more performance/throughput/... when going for more threads. On the other hand, keep in mind that fixed size also means: there will always be 5 (or 10) threads around. In that sense, this kind of threadpool makes most sense in a "static" environment; where your "load" isn't heavily changing over time. You don't want 5 threads to do work that would be good for 10 threads, but you also do not want 10 threads to be idling most of the time, because 5 would be good enough.
|
Which Java thread pool executor to use to easily resize pool size?
By : Madhur Bharadwaj
Date : March 29 2020, 07:55 AM
|
Spring AsyncRestTemplate connection pool and thread pool settings
By : Gwgw
Date : March 29 2020, 07:55 AM
|