Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 20545 invoked from network); 14 Aug 2009 11:53:16 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 14 Aug 2009 11:53:16 -0000 Received: (qmail 34419 invoked by uid 500); 14 Aug 2009 11:53:18 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 34368 invoked by uid 500); 14 Aug 2009 11:53:18 -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 34357 invoked by uid 99); 14 Aug 2009 11:53:18 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 14 Aug 2009 11:53:18 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of peter.crowther3@googlemail.com designates 209.85.219.216 as permitted sender) Received: from [209.85.219.216] (HELO mail-ew0-f216.google.com) (209.85.219.216) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 14 Aug 2009 11:53:07 +0000 Received: by ewy12 with SMTP id 12so921305ewy.0 for ; Fri, 14 Aug 2009 04:52:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to :content-type:content-transfer-encoding; bh=rmEnKSItOk62xuHzHPXl4UFizuxcAngy2aDIhEy8/vo=; b=ZspJexH/ONLP0UwJMBzIHDwNwEiyZv+P9U4JjvnA0Nzgr3ItrVcxIcA5Fw2M5nCxCe hZ3n95Bko7PHQm37C/83O8LKPyuryC5NfU4aHtzNgVupoe13V+rcKX073cu8r+LxBhWC uQcHkl62xaycvIw4DfWKGCVCKybbPrK5z3mus= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type :content-transfer-encoding; b=eiy/aftowAqoNF0pdAFk4LNE781b/KfUHb1VkO8vKa/b9fmKItE69QJ31h2w7N8IfQ x5p7WGfKhXrqheC7vla8QO0eud1svbeg94F1U/BBNxNIHliI9LxmAgq4Z19BwsZN4fm+ 6TbRAq2m/2a2bPz+ILaIBJgkVSdMAGuek7xRI= MIME-Version: 1.0 Sender: peter.crowther3@googlemail.com Received: by 10.216.50.198 with SMTP id z48mr380129web.227.1250250766608; Fri, 14 Aug 2009 04:52:46 -0700 (PDT) In-Reply-To: <24969731.post@talk.nabble.com> References: <24969731.post@talk.nabble.com> Date: Fri, 14 Aug 2009 12:52:46 +0100 X-Google-Sender-Auth: 2f54b724ae9368d0 Message-ID: Subject: Re: How to run Tomcat on Multiple Cores in Windows 2003 server? From: Peter Crowther To: Tomcat Users List Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org 2009/8/14 shivram.raj : > Our application deployed in Tomcat running in Windows 2003 server is very > slow. Whenever the user tries page navigation, more CPU is used (15 - 25%) > in the server and it seems only 2 cores out of 8 in the processor is used by > Tomcat. How many concurrent requests are you sending, and how are you sending them? If you're testing your app using a single Web browser, most browsers will not send more than two concurrent requests to the same server. > Can any one suggest me how to fix this issue? 1) Make sure you know which Tomcat version you're running, and tell us in your next post - we're not psychic, and there have been a lot of versions over the last ten years! 2) Make sure you know what you're testing, and verify that your test *should* produce more than two concurrent requests. 3) Take a thread dump. This is easier if you start Tomcat using its startup scripts than if you run it as a service - you don't tell us how you've started Tomcat. If you're currently running it as a service and you installed it from the .exe setup, then (for some odd reason) you won't have the startup script. The easiest way to fix this is to download the zip file for the version of Tomcat you're running, unzip that, and copy the .bat files over to your running Tomcat's installation directory. Then stop the service, and instead run startup.bat from a cmd window to start Tomcat. Now you can take a thread dump by pressing ctrl-break in that window. It'll usually appear in one of the log files, depending on how the logging's set up. 4) Examine the thread dump and see what's actually running! > FYI, while configuring Tomcat, > I have set the Java settings such that the Initial Memory pool to 256 MB and > Maximum memory pool to 512 MB. I did not mention anything for Thread stack > size. These may or may not be appropriate, depending on your application. Only you, as the application developer, can know. They're certainly large enough for Tomcat's own structures for any reasonable load. > Do I need to change anything in the server.xml to add any thread setting > parameters? Generally, no. Tomcat will make use of as many cores as it can get its sticky hands on, unless something's been configured to stop it! > Also, does any one know how to create a thread stack? jstack is > not available in my environment as I am running java 1.5 in Windows 2003. See above. - Peter --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org