Since you say CPU usage on your machine is around 5% during those tests, and your database is on same machine as tomcat server, i doubt the bottleneck really is on database. The first ting i'll suggeste is to take all queries run by your application, make an sql script of them, and run this script using a mysql client. If the script returns in less than a second, it's your application the bottleneck at some point. If it takes 10 seconds, improve your database designs, add indexes, reduce queries. Check the database type (myisam, innodb?) If database is used at same time for writing purpose, check it's not your query that has to constantly wait for other to commit, due to isolation level being to strict. Check you are using the same connection during all you report operation, instead of creating a new one for each information bits. Creating a new connection to a db has an overhead in time. Check you use 127.0.0.1 as ip for localhost database and not the network card ip if there are huge amount of datas to pickup. On unix environments, using network card ip mean the datas goes from memory to network card to wire, back to network driver, back to memory. Am not sure for wire part, but it's anyway a bottleneck you can avoid with 127.0.0.1 which is all in memory.

Last but not least, when you check cpu load, on unix environment, check
1) User CPU time (time taken by your application)
2) System CPU Time (time taken by kernel, as a result of application request, like accessing files)
3) Idel time (sleeping time of CPU, it's what is not used)

keglius a écrit :
Hi, Chris!

Thanks for your response!
I can't say that the reporting function is a primary function of the server,
however
the web application includes a lot of statistical reports about
views/visitors/sales, etc
for long time periods (up to 1 year).

As I told, the server has 2GBs of RAM. 1.6GB is constantly used, meaning
that Tomcat
uses only 800MB while the rest 800MB are used by the OS and other software
running on the
background. The memory is not used all because Tomcat is not allowed to use
more than 800MBs.
I guess it would easily eat up the remaining 400MB of free RAM. So, I would
like to know if increasing the Tomcat heap would help me to increase a server speed -
application page
loading speed?

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.

The Tomcat Java application and MySQL database runs on one machine, so I
guess it'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?

Thanks,
Keglius


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to