You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Aadit Shah <aa...@mobileheartbeat.com> on 2019/04/09 19:19:04 UTC

Re: Help Needed : Increased amount of I/O - Tomcat 7.0.81 vs 8.5.32

Hello all,
We have recently upgraded our software to utilize Tomcat 8.5.32 from Tomcat 7.0.81.
With the upgrade, we are seeing an increased amount of I/Os happening between the Tomcat Server and the DB.
We are looking for help to understand the cause of the increased amount of I/Os and possible solutions to improve our software to get a workaround.

Issue:
Tomcat is one of the core components of our software. With 8.5.32 upgrade, due to the increased amount of I/Os, we are seeing a latency in our software.
Due to the latency, the overall performance of the software has been degraded and the end users are seeing issues like
- longer login times
- longer wait time to load/reload the data.

Troubleshooting:
We ran a bunch of tests and confirmed that our packet captures show that 20x increase in the I/O operations between Tomcat 7.0.81 and 8.5.32.

Here’s the matrix which shows number of I/O we captured between different versions of Our Software version and Tomcat versions.

Our Software Version

Tomcat 7.0.81

8.5.32

18

200

23,000

19

1200

240,000



Server Information:
OS: Windows Server 2012 R2
Java : JRE1.8.0.111
Initial Memory Pool: 512 MB
Maximum Memory Pool : 1024 MB
Note: There are other software running on the server.

DB Connection Configuration:
Here’s how the connection from the Tomcat Server to DB Server look like:

Tomcat 7.0.81:

<Resource name="jdbc/heartbeatdb" auth="Container" type="javax.sql.DataSource"
                                          maxActive="200" maxIdle="30" maxWait="10000"
                                          driverClassName="com.microsoft.sqlserver.jdbc.SQLServerDriver"
                                          url="jdbc:sqlserver://<Server>\<instance>;database=heartbeat;integratedSecurity=true"
                                          validationQuery="SELECT 1"
                                          testWhileIdle="true"
                                          timeBetweenEvictionRunsMillis="3600000"
                                          numTestsPerEvictionRun="30"
                                          minEvictableIdleTimeMillis="14400000"
                                          removeAbandoned="true"
                                          removeAbandonedTimeout="300"
                                          logAbandoned="true"/>

Tomcat 8.5.32:

<Resource name="jdbc/heartbeatdb" auth="Container" type="javax.sql.DataSource"
              maxTotal="200" maxIdle="30" maxWaitMillis="10000"
              driverClassName="com.microsoft.sqlserver.jdbc.SQLServerDriver"
              url="jdbc:sqlserver://<Server>\<instance>;database=heartbeat;integratedSecurity=true"
              testWhileIdle="true"
              validationQuery="SELECT 1"
              timeBetweenEvictionRunsMillis="3600000"
              numTestsPerEvictionRun="30"
              minEvictableIdleTimeMillis="14400000"
              removeAbandonedOnBorrow="true"
              removeAbandonedOnMaintenance="true"
              removeAbandonedTimeout="300"
              logAbandoned="true" />

Let me know if you need more information from our side. We can also provide full server.xml configuration from both the versions of the software.

We are new to Tomcat Support group, so let us know if this is the right way to request for help.

If you want to learn more about our company, you can click the links in the signature.

Thanks,
Aadit
--
Aadit Shah | Mobile Heartbeat<http://www.mobileheartbeat.com/>
Solutions Engineer
aadit.shah@mobileheartbeat.com<ma...@mobileheartbeat.com>
Phone: (781) 238-0000,,2036

Re: Help Needed : Increased amount of I/O - Tomcat 7.0.81 vs 8.5.32

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Aadit,

On 4/9/19 15:19, Aadit Shah wrote:
> We have recently upgraded our software to utilize Tomcat 8.5.32
> from Tomcat 7.0.81. With the upgrade, we are seeing an increased
> amount of I/Os happening between the Tomcat Server and the DB.
Do you have Tomcat configured to handle user-authentication? Id not,
then Tomcat is not contacting your database at all.

> We are looking for help to understand the cause of the increased 
> amount of I/Os and possible solutions to improve our software to
> get a workaround.
> 
> Issue: Tomcat is one of the core components of our software. With
> 8.5.32 upgrade, due to the increased amount of I/Os, we are seeing
> a latency in our software. Due to the latency, the overall
> performance of the software has been degraded and the end users are
> seeing issues like
> 
> - longer login times - longer wait time to load/reload the data.
> 
> Troubleshooting: We ran a bunch of tests and confirmed that our
> packet captures show that 20x increase in the I/O operations
> between Tomcat 7.0.81 and 8.5.32.
Did you change your database driver version at the same time? What
about the application? Did the application change at all?

> Here’s the matrix which shows number of I/O we captured between 
> different versions of Our Software version and Tomcat versions.
Your attachment and/or screenshot has been removed from the mailing
list. Please provide a text-only rendering in your follow-up post.

> Our Software Version
> 
> Tomcat 7.0.81
> 
> 8.5.32
> 
> 18
> 
> 200
> 
> 23,000
> 
> 19
> 
> 1200
> 
> 240,000

The above table didn't translate well. What is it supposed to be?

> Server Information: OS: Windows Server 2012 R2

Ouch. A 5-year-old abandoned Microsoft operating system? I hope you
pay a lot to your security provider for all the CYA you need.

> Java : JRE1.8.0.111 Initial Memory Pool: 512 MB Maximum Memory Pool
> : 1024 MB

Recommendation: set min and max to the same value. There is no
advantage to setting them to different values and some performance
advantages to setting them to the same value.

> Note: There are other software running on the server.
> 
> DB Connection Configuration: Here’s how the connection from the
> Tomcat Server to DB Server look like:
> 
> Tomcat 7.0.81:
> 
> <Resource name="jdbc/heartbeatdb" auth="Container"
> type="javax.sql.DataSource" maxActive="200" maxIdle="30"
> maxWait="10000" 
> driverClassName="com.microsoft.sqlserver.jdbc.SQLServerDriver" 
> url="jdbc:sqlserver://<Server>\<instance>;database=heartbeat;integrate
dSecurity=true"
>
> 
validationQuery="SELECT 1"
> testWhileIdle="true" timeBetweenEvictionRunsMillis="3600000" 
> numTestsPerEvictionRun="30" minEvictableIdleTimeMillis="14400000" 
> removeAbandoned="true" removeAbandonedTimeout="300" 
> logAbandoned="true"/>

200 connections is a lot of connections. How many concurrent requests
would you estimate that you actually handle at peak?

> Tomcat 8.5.32:
> 
> <Resource name="jdbc/heartbeatdb" auth="Container"
> type="javax.sql.DataSource" maxTotal="200" maxIdle="30"
> maxWaitMillis="10000" 
> driverClassName="com.microsoft.sqlserver.jdbc.SQLServerDriver" 
> url="jdbc:sqlserver://<Server>\<instance>;database=heartbeat;integrate
dSecurity=true"
>
> 
testWhileIdle="true"
> validationQuery="SELECT 1" timeBetweenEvictionRunsMillis="3600000" 
> numTestsPerEvictionRun="30" minEvictableIdleTimeMillis="14400000" 
> removeAbandonedOnBorrow="true" removeAbandonedOnMaintenance="true" 
> removeAbandonedTimeout="300" logAbandoned="true" />
> 
> Let me know if you need more information from our side. We can
> also provide full server.xml configuration from both the versions
> of the software.
> 
> We are new to Tomcat Support group, so let us know if this is the 
> right way to request for help.
> 
> If you want to learn more about our company, you can click the
> links in the signature.

Are you using Tomcat for container-managed authentication? That's not
clear from your configuration.

- -chris
-----BEGIN PGP SIGNATURE-----
Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/

iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlytJ80ACgkQHPApP6U8
pFhFkQ//fvNVhgRno2H7IOdULXN0BlAAE6kW6/wuClAYNB++t9Y+96lnEIoMgQx3
+W7Ind4g1TepwXBK9mVPuuS30i4O8/uCtBL9rCf6z5xJZGV113Gova/U04TIt2iO
jQ2neeBdsUg5abcCQH959qGGp0he4hibH7xeWXabp42a5WaFLNQFu4YtUj9wFWlw
A9/8EhWVOqRmkX/0vcSkj/MgE/kAR+C4dkQBHjZpQzKWRjGiWrJVXJ/Ujpp+AL3f
JY2S76d7IG+XQ1BngZcbX9k83IM7crfCcPWeNsQM4C/LgfJWHu0Jt7dVyDBbHU4Y
Jkyd1OWoAnNQCfvXbkb8C6mdCtjVjCrlziBd6JJ8QJTBkhMW2L9v0clMJvL4U9yY
aEDKCEhAOLlsYtcWIyv2hLvUFmjKmjbRm7pv1N1+TQXSw+1qDsCHNQC+KLyN5kI/
ac/fxxArQ0fxsanTSh3jI8qCcsLKx5kwDxjtB2u1IiPlYaxi9zCG11lIEsCn9BQz
ALnnFKDODEiyAYkzjau82rrToWgootsUmgLUMpN3prOuyXwawfq9GMyMcEA6zzGT
P51LU4dvIWjeBtI+W8mTZ/yxV882prJZtBCeBk/WOeTeKNN/Jrd2VeUE7ROvM9Lh
firIRCsm5oVcu5miRBw2kU49NTmEE/pqHWhMjduOLW2+lXDBxKw=
=95f+
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org