tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pid <...@pidster.com>
Subject Re: Tomcat scalability setting - need help please
Date Thu, 08 Apr 2010 14:49:17 GMT
On 08/04/2010 12:19, Cin Lung wrote:
> Hi Pid
>
> My task is a web-based ERP application. It uses database and the number of
> user connection to it is up to 200 users. I use MySQL for the database.

Please post your DB config from server.xml, passwords should be omitted.

> I apply the -xmx1024m and -xms1024m because I once got a message about Java
> Heap Out Of Space, so I searched the web and some people suggested that
> settings and it worked... for a while. Now that the amount of data is
> increased and the user using the app increased as well, lagging has been
> happening.

You can use VisualVM and JConsole to examine the running JVM.
Find out what is actually going on inside your application before you 
fiddle with settings again.

Increasing the amount of memory can sometimes hide a memory leak, for 
example by not properly returning a database connection to a pool.

> The settings above I set it in the Tomcat Service monitor. And yes, I also
> set tomcat as service.

So when you said, "it didn't make any difference" did you mean that the 
settings weren't applied, or that they were but things haven't improved?


> It's running 32 Bit windows 2003 only With 8GB Ram. The tomcat version is
> 6.0.14.

The current version is 6.0.24.  Upgrading is a good idea.

> I am not assuming either tomcat is the problem or my software. I am merely
> trying to find a way out and I have exhausted my resources to make the
> software as fast as possible. Tomcat setting is the only thing that I have
> not explore extensively since I am not as expert as you guys. Maybe I can
> learn a tip or two to make things better.

I would say that 99% of the tweakable performance is related to your 
application and 1% is with Tomcat.

You need to establish if there's a bottleneck, and if so, where it is.

> By the way the number of data that is being processed by the heavy app is in
> millions of rows. I ran the SQL directly to the mysql server and it worked
> ok (within minutes and not freezing the server). Meanwhile, when the query
> is being run via tomcat, then it will freeze the server as well. It does not
> kill the server, just consume all the server resources, but eventually will
> come back to normal after two hours with the result.

So a single query is using up all the resources on the server?

Is the database running on the same server as Tomcat?

When you run the query in your application how are you doing it, e.g. by 
calling a stored procedure, or by executing exactly the same SQL statement?



> Thanks
> Rendra
>
> -----Original Message-----
> From: Pid [mailto:pid@pidster.com]
> Sent: Thursday, April 08, 2010 4:56 PM
> To: Tomcat Users List
> Subject: Re: Tomcat scalability setting - need help please
>
> On 08/04/2010 10:00, Cin Lung wrote:
>> Dear All Dev
>>
>> Sorry if repost, I got an error from the mailing list server.
>> Can anyone help me with my problem? I have two biggest problems as follow:
>   >
>> 1. Multi Connection Problem:
>> I have a web application that service to multiple users. Everytime the
>> users accessing the server reach 100 users at the same time, the
>> tomcat would slows down.
>
> What does your app do?
> What tasks is it performing?
> Does it use a database?
>
>> I tried to set -xmx1024 and -xms1024, but it did not have any impact
>> at all.
>
> Where did you apply those settings?
>
> Is Tomcat installed as a service?
>
>> I tried to set the memory cache to 2048 and above, but the tomcat
>> won't start.
>
> Where did you apply that setting?
>
>> My current server is running AMD Athlon 64 3000+ with 8GB memory
>> running windows server 2003 SP1.
>
> Is it running 64bit Windows?
>
>> I am running tomcat 6 for the app server.
>
> Exactly which version of Tomcat 6.0.NN?
>
>> Before upgrading to Windows 2003 SP1 I also had the same problem. I
>> thought by upgrading would make a difference, but it didn't.
>
> What makes you think Tomcat and not your application is the source of your
> problem?
>
> If upgrading the server doesn't make a difference, perhaps this points to
> something that isn't affected by the processing power of the server as the
> source of the problem.
>
>> Is there any way to improve tomcat's performance?
>
> It is possible to tune Tomcat, but in the vast majority of cases the
> application is the problem.  Tomcat is used in many high-load situations
> with great success.
>
>> Will there be any use of Java NIO Framework in tomcat?
>
> There is the NIO Connector.  It's not guaranteed to make a difference as the
> usual source of the problem is in the application.
>
>> I mean apache has Mina, why not combine with tomcat?
>
> Assuming there's anything wrong with Tomcat, which many people here would
> disagree with.
>
>
>> 2. User cancellation problem
>> Another thing that really bug me is that user would click on a web
>> application that perform a very extensive task. The user was not patient
> and
>> just close the browser accessing the app. This did not make that
> particular
>> job stop. In fact the job is still running until finish and then it got no
>> place to return the result since the user closed the browser. As the
> result,
>> my server is working really hard and takes up all the resources available,
>> and causes other users to lag.
>>
>> Is there any way to make that particular user task/thread stop working?
>
> Interrupt it?
>
>
> p
>
>
>> Thank you in advance
>> Rendra
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>


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


Mime
View raw message