Skip to Content
Technical Articles
Author's profile photo John Shen

How to optimize Tomcat server utilization.

I write this article is aiming to help you understand how to ameliorate your Tomcat performance.
I’m going to write it as simple as possible so that you can understand what I’m talking about even with a glance.

Unlike other technical articles, you won’t be lost in a terminological jungle. Instead, you will stand on the top of a mountain so that you can see the full landscape of this field.

To make a long story short, let’s begin with a example below:

You could image Tomcat is a bottle, if you want to put more water into it and pour the water out as fast as possible within certain seconds, there are two factors that you need to consider:

  • The size of bottle neck.
  • The volume of the bottle itself.

So equally, tuning a Tomcat server, you could only focus on two factors.

  • Connector. –> The bottle neck, defined in server.xml.
  • JVM(Max Memory Pool). –> The volume, defined in Java Options.

To increase the bottle neck size, go to /conf/server.xml.

First, uncomment the following line to tell the system that you are going to use self-defined              executor(Executor is the guard of connector). By default, executor is disabled.

For executor and connector definitions, please go to for details.

Note: Generally, maxThreads=”500″ minSpareThreads=”20″ maxIdleTime=”60000″ are enough.

<Executor name=”tomcatThreadPool” namePrefix=”catalina-exec-” maxThreads=”500″ minSpareThreads=”20″ maxIdleTime=”60000″ />

Then, change connection timeout value like the following example.
<Connector executor=”tomcatThreadPool” port=”8080″ protocol=”HTTP/1.1″ connectionTimeout=”60000″ keepAliveTimeout=”15000″ maxKeepAliveRequests=”1″ redirectPort=”8443″ />


To increase the bottle volume, you can check the following two KBs due to OS type accordingly.

  • Windows:   1921501 – Default Java Options for Tomcat for BI4
  • Linux/AIX:  1750952 – BI4 Setting JAVA_OPTS for tomcat

Concerning the proper JVM size, please go to the following KB to know the details.

2405536 – Best Practice: The popular combinations of Tomcat Max Memory Pool size and MaxPermSize .

Assigned Tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo Pushpa Vijay
      Pushpa Vijay

      Thank you John!!!


      Author's profile photo Justin Glauber
      Justin Glauber

      Would you use an executor on SSL enabled connectors?

      Author's profile photo John Shen
      John Shen
      Blog Post Author

      It should no problem at all to use executor on SSL enabled connectors.
      It's just a thread pool.

      Author's profile photo Graham Day
      Graham Day

      Hi John, I've set up a Tomcat Server to run a few web services. What do I have to do to allow the Tomcat Server to be set up as the Target Host in SM59. Hopefully not too off subject. Kind regards Graham

      Author's profile photo John Shen
      John Shen
      Blog Post Author

      Hi Graham,


      I suppose SM59 is the transaction code of ABAP system. If I'm right, please let me clarify one thing.

      This Tomcat article is only related to Tomcat performance tuning, but not related to combination with other systems. Moreover, since I'm not familiar with SM59, so I'm afraid that I can not guide you through that configuration.


      Author's profile photo Satyabati Bhotra
      Satyabati Bhotra

      Could you advise how to increase the memory pool for Tomcat 9 for BO 4.3 SP1 version.

      Ours is windows 2016 server in cluster environment with 01 and 02 server

      01- 64 bit ram

      02- 64 bit ram

      Daily 300-400 users login and 700 reports are run

      Author's profile photo John Shen
      John Shen
      Blog Post Author

      Hi Satyabati Bhotra,


      According to KB 2405536 – Best Practice: The popular combinations of Tomcat Max Memory Pool size and MaxPermSize, I suggest you can setup 12GB as JVM max memory pool size in each Tomcat server. Then it should be 24 GB in total.
      In theory, it should fulfill your business demands.

      SAP Product Support