Skip to main content

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.

ParameterDefault valueDescription
maxThreads200Maximum number of request processing threads
minSpareThreads10Minimum number of threads kept running

Thread prefix: http-nio-*

XML

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.

ParameterDefault valueDescription
threadCount20Number of threads in the scheduler pool

Thread prefix: MamboJobScheduler_*

Properties

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.

ParameterDefault valueDescription
mambo.async.core_pool_size-1Initial number of threads to create
mambo.async.max_pool_size-1Maximum number of threads allowed
mambo.async.queue_size-1Size 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.

Properties

JGroups

JGroup threads can be individually managed using the default-jgroups-* configuration files under the /WEB-INF/classes/cache directory.

ParameterDefault valueDescription
thread_pool.min_threads0Minimum number of threads to keep alive
thread_pool.max_threads200Maximum 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").

XML