tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <>
Subject Re: How to increase Tomcat webserver speed?
Date Fri, 05 Oct 2007 17:47:12 GMT
Hash: SHA1


keglius wrote:
> So, I would like to know if increasing the Tomcat heap would help me
> to increase a server speed - application page loading speed?

No. More memory will simply allow you to handle more users. Unless your
server is thrashing (which it might be), an increase in memory is
unlikely to help.

> I guess the most slowest parts of the webapp (mostly statistical
> reporting section) relies heavily on MySQL database, since it has to
> extract quite much data and call a lot of requests to database in
> order to show the report.

I would get a DBA to look at your tables and make sure you have
appropriate indexes, etc. to support those queries. Look for "slow"
queries (that's a technical term, really), overly complex queries, or
queries that you run many of that you might be able to reduce to fewer

> The Tomcat Java application and MySQL database runs on one machine,
> so I guess it's a one-box wonder.

Yep, that's a one-box wonder.

> I performed tests on members area and found that in most cases all
> pages are loaded within 4-10 seconds. The slowest pages (e.g. reports
> to view longer period time data) sometimes takes 20-180 seconds to
> load.
> How can I increase this speed?

I'm guessing that your Java code is doing very little work, and that the
database is basically doing everything. In that case, you have two

1. Your queries/indexes suck and you need to adjust them appropriately.


2. Your database needs are not being satisfied by your hardware.
   You may need a beefier machine to do the kinds of reporting that you
   are trying to do. More CPU power on a database never hurts, but what
   a database really needs is memory, memory, and more memory. You
   should get a good book on MySQL performance optimization and spend
   some time reading it. You can adjust many things such as the query
   cache, indexes, etc. If you have more memory, you can store more
   index data in memory, which tends to speed things up dramatically.

Hope that helps,
- -chris
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla -


To start a new topic, e-mail:
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message