Performance optimisation
Performance optimization in Mambo involves configuring various thread pools to match your system requirements. Each component has specific configuration options that control resource utilization and processing capabilities.
Configuring thread pools
Tomcat
The default web application thread pool can be configured by modifying properties in the <Connector> section of the server.xml file. The location depends on your Tomcat installation.
| Parameter | Default value | Description |
|---|---|---|
| maxThreads | 200 | Maximum number of request processing threads |
| minSpareThreads | 10 | Minimum number of threads kept running |
Thread prefix: http-nio-*
For more configuration options, see the Tomcat HTTP Connector documentation.
Quartz scheduler
The Quartz Scheduler thread configuration is managed in the quartz.properties file under the /WEB-INF/classes directory. The primary property to configure is the thread count.
| Parameter | Default value | Description |
|---|---|---|
| threadCount | 20 | Number of threads in the scheduler pool |
Thread prefix: MamboJobScheduler_*
For additional configuration options, refer to the Quartz Scheduler thread pool documentation.
Asynchronous processing
The asynchronous processing threads are configured in the mambo.properties file under the /WEB-INF/classes directory.
| Parameter | Default value | Description |
|---|---|---|
| mambo.async.core_pool_size | -1 | Initial number of threads to create |
| mambo.async.max_pool_size | -1 | Maximum number of threads allowed |
| mambo.async.queue_size | -1 | Size of the task queue |
Thread prefix: MamboAsync-*
How it works:
- As requests arrive, threads are created up to the
core_pool_size - Additional tasks are added to the queue until it reaches
queue_size - When the queue is full, new threads are created up to
max_pool_size - Once all threads are in use and the queue is full, tasks will be rejected
- As the queue reduces, the number of active threads decreases
If any value is less than 1, the system will use default values.
JGroups
JGroup threads can be individually managed using the default-jgroups-* configuration files under the /WEB-INF/classes/cache directory.
| Parameter | Default value | Description |
|---|---|---|
| thread_pool.min_threads | 0 | Minimum number of threads to keep alive |
| thread_pool.max_threads | 200 | Maximum number of threads in the pool |
Thread prefix: transport-thread-*, timeout-thread-*, remote-thread-*, cluster-*
For more information about configuring JGroups thread pools, see the JGroups advanced user guide.
Infinispan cache
The Infinispan Cache threads can be configured in the infinispan.xml configuration file under /WEB-INF/classes/cache directory.
Configuration examples can be found in the Infinispan configuration documentation (search for "threads").