Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 65322 invoked from network); 8 Apr 2010 14:50:00 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 8 Apr 2010 14:50:00 -0000 Received: (qmail 53147 invoked by uid 500); 8 Apr 2010 14:49:53 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 53090 invoked by uid 500); 8 Apr 2010 14:49:53 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 53045 invoked by uid 99); 8 Apr 2010 14:49:53 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Apr 2010 14:49:53 +0000 X-ASF-Spam-Status: No, hits=-0.4 required=10.0 tests=AWL,RCVD_IN_DNSWL_NONE,SPF_SOFTFAIL X-Spam-Check-By: apache.org Received-SPF: softfail (athena.apache.org: transitioning domain of pid@pidster.com does not designate 209.85.223.178 as permitted sender) Received: from [209.85.223.178] (HELO mail-iw0-f178.google.com) (209.85.223.178) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Apr 2010 14:49:45 +0000 Received: by iwn8 with SMTP id 8so1393181iwn.16 for ; Thu, 08 Apr 2010 07:49:23 -0700 (PDT) Received: by 10.142.9.33 with SMTP id 33mr175585wfi.0.1270738163141; Thu, 08 Apr 2010 07:49:23 -0700 (PDT) Received: from Phoenix.local (94-193-98-41.zone7.bethere.co.uk [94.193.98.41]) by mx.google.com with ESMTPS id j42sm88337ibr.13.2010.04.08.07.49.20 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 08 Apr 2010 07:49:21 -0700 (PDT) Message-ID: <4BBDECED.2070902@pidster.com> Date: Thu, 08 Apr 2010 15:49:17 +0100 From: Pid Reply-To: pid@pidster.com Organization: Pidster Inc User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.1.9) Gecko/20100317 Thunderbird/3.0.4 MIME-Version: 1.0 To: Tomcat Users List Subject: Re: Tomcat scalability setting - need help please References: <4bbdbbcf.e402be0a.3320.1d5c@mx.google.com> In-Reply-To: <4bbdbbcf.e402be0a.3320.1d5c@mx.google.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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