The processorCache setting you're referring to in the socketProperties section of JMX for Confluence relates to the internal workings of the Tomcat servlet container that Confluence runs on.
What is processorCache?
In the context of Tomcat connectors, the processorCache attribute specifies the number of request processor objects (also known as "processors") that the server will cache for reuse. These processors are responsible for handling incoming HTTP requests. By caching these objects, Tomcat aims to improve performance by reducing the overhead of creating and destroying processor instances for each request.
How does it work?
When a request comes into Tomcat, it's handled by a processor. Without caching, Tomcat would need to create a new processor instance for each incoming request, which can be resource-intensive and impact performance, especially under high load. By caching a pool of processors, Tomcat can quickly assign a free processor from the cache to handle a new request, then return it to the cache when done, reducing object creation and garbage collection overhead.
Applicability in Confluence 7.10:
However, it's important to note that:
- Connector Type Matters: The
processorCache attribute is relevant for the older Blocking IO (BIO) connectors in Tomcat. In modern versions of Tomcat (starting from Tomcat 8 and above), the default connector is the Non-Blocking IO (NIO) connector.
- NIO Connectors Don't Use
processorCache: For NIO and NIO2 connectors (which are used by default in Confluence 7.10), the processorCache setting is not utilized. Instead, NIO connectors use a different architecture that doesn't rely on the same processor caching mechanism.
- Default Settings Are Often Sufficient: For most deployments, the default connector settings provided by Confluence are adequate and have been optimized for general use cases.
Recommendations for Large Confluence Instances:
For optimizing a large Confluence 7.10 server instance, adjusting the processorCache is unlikely to have any effect due to the reasons mentioned above. Instead, consider the following steps:
-
Verify Connector Configuration:
- Ensure that you're using the default NIO connector, which is more efficient and scalable for handling a large number of concurrent connections.
- Check your
server.xml file (located in <confluence-install>/conf/) to confirm the connector type.
-
Adjust Connector Threads:
-
maxThreads: Increase the maxThreads attribute in your connector configuration to allow Tomcat to handle more concurrent requests. This is especially important for large instances with many simultaneous users.
-
Example:
<Connector port="8090" protocol="org.apache.coyote.http11.Http11NioProtocol"
maxThreads="400"
...
/>
-
Optimize JVM Settings:
- Heap Size: Increase the JVM heap size to accommodate the higher memory requirements of a large instance.
- Garbage Collector: Choose a garbage collection strategy that suits your workload (e.g., G1GC for large heaps).
-
Database Tuning:
- Ensure your database is properly tuned for performance. This includes optimizing connection pools, indexes, and query performance.
-
Application Tuning:
- Cache Settings: Adjust Confluence's internal caching mechanisms to better suit your instance size.
- Plugins: Review and optimize or disable any plugins that may impact performance.
-
Infrastructure Considerations:
- Load Balancing: If applicable, consider setting up a load balancer to distribute traffic.
- Clustering: For very large deployments, you might explore Confluence Data Center, which supports clustering for high availability and scalability.
-
Monitoring and Profiling:
- Use monitoring tools to track performance metrics, such as CPU usage, memory consumption, response times, and thread counts.
- Profiling can help identify bottlenecks in the application or infrastructure.
-
Consult Official Documentation and Support:
- Documentation: Review Atlassian's official documentation on performance tuning for Confluence Server.
- Support: Consider reaching out to Atlassian Support or an experienced Atlassian partner for personalized advice.
Conclusion:
The processorCache setting in the socketProperties is a remnant from older versions of Tomcat and is not applicable to the default connector used in Confluence 7.10. For optimizing a large Confluence instance, focus on adjusting the maxThreads, JVM settings, database performance, and other application-level configurations. Regular monitoring and adjustments based on observed performance will yield the best results.
References: