Configuring Thread Pools
Tomcat
The default web app thread pool can be configured using the properties found in the relevant <Connector> found in the server.xml file. The location of the file will depend on the installation of Tomcat. Information regarding the available properties can be found here: https://tomcat.apache.org/tomcat-8.5-doc/config/http.html
maxThreads: 200
minSpareThreads: 10
Thread prefix: http-nio-*
Quartz Scheduler
The Quartz Scheduler thread configuration can be managed using the quartz.properties configuration file under the /WEB-INF/classes directory. The primary property to configure is the org.quartz.threadPool.threadCount which determines the number of threads in the pool. More information and properties can be found here: http://www.quartz-scheduler.org/documentation/quartz-2.2.2/configuration/ConfigThreadPool.html
threadCount: 20
Thread prefix: MamboJobScheduler_*
Asynchronous Processing
The Asynchronous Processing thread configuration can be managed using the mambo.properties configuration file under the /WEB-INF/classes directory. The 3 properties to configure are shown below. If the values are less than 1 then default system values will be used.
The way the properties work is as follows: as requests come in threads will be created up to the core_pool_size value, after that tasks will be added to the queue until it reaches queue_size. When the queue is full new threads will be created up to max_pool_size. Once all the threads are in use and the queue is full tasks will be rejected. As the queue reduces so does the number of active threads.
mambo.async.core_pool_size: -1
mambo.async.max_pool_size: -1
mambo.async.queue_size: -1
Thread prefix: MamboAsync-*
JGroups
JGroup threads can be individually managed using the default-jgroups-* configuration files under the /WEB-INF/classes/cache directory.
Each configuration file is set up with sensible defaults, but you can find out more about how to configure the thread pools here:
http://www.jgroups.org/manual/html/user-advanced.html
thread_pool.min_threads: 0
thread_pool.max_threads: 200
Thread prefix: transport-thread-* / timeout-thread-* / remote-thread-* / cluster-*
Infinispan Cache
The Infinispan Cache threads can be configured in the infinispan.xml configuration file under /WEB-INF/classes/cache directory.
Using an IDE will provide the relevant options for the configuration of threads. Detailed information about the different properties can be found here (search for threads):
https://docs.jboss.org/infinispan/9.0/configdocs/infinispan-config-9.0.html
0 Comments