In multi-user, high-concurrency environments it pays to tune Tomcat to use more threads to process HTTP requests. If the thread count isn't high enough, you may see HTTP requests going from the browser to the server that aren't being fulfilled; with a tool such as WireShark, you may notice that HTTP requests are going to the server but responses may not be coming back, depending on the load.
If the server doesn't have enough threads, the server will wait until a thread becomes available before processing a request. In extreme cases, those requests that get queued may never get processed, if the wait time exceeds a server timeout value.
To increase the maximum thread count, you can set it in the object in the Tomcat <js-install>/apache-tomcat/conf/server.xml file. By default, if the maximum threads value is not set, Tomcat uses a default value of 200 maximum threads. Here is an example:
<connector connectiontimeout="20000" maxthreads="400" port="8080" protocol="HTTP/1.1" redirectport="8443" />
- minSpareThreads
- maxSpareThreads
- acceptCount
- maxKeepAliveRequests
Documentation on these settings can be found here, among other places: https://tomcat.apache.org/tomcat-9.0-doc/config/http.html
Other Performance Tips:
Measure and Test
Ad Hoc
- Set query limits on the "Ad Hoc Options" page
- Modify the Ad Hoc caching values if your data does not update constantly
Tomcat
- Compress HTTP responses at the Tomcat level
- Set up a cache filter for Tomcat or JBoss
- Disable automatic deployment on production servers using Tomcat
Database
- Index columns in the database to speed up domain-based reports
- Set the fetch size in the jasperreports.properties file to modify the number of rows to fetch
JasperReports Configuration Items
- Modify Virtualizer Settings for Very Large Reports
- Modify the jasperreports.properties file to disable multi-line data processing
Recommended Comments
There are no comments to display.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now