Return-Path: X-Original-To: apmail-tomcat-users-archive@www.apache.org Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 609983FB7 for ; Mon, 2 May 2011 09:04:06 +0000 (UTC) Received: (qmail 2631 invoked by uid 500); 2 May 2011 09:04:02 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 2577 invoked by uid 500); 2 May 2011 09:04:02 -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 2568 invoked by uid 99); 2 May 2011 09:04:02 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 May 2011 09:04:02 +0000 X-ASF-Spam-Status: No, hits=3.7 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of simran4u2@gmail.com designates 209.85.214.45 as permitted sender) Received: from [209.85.214.45] (HELO mail-bw0-f45.google.com) (209.85.214.45) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 May 2011 09:03:56 +0000 Received: by bwz16 with SMTP id 16so6613417bwz.18 for ; Mon, 02 May 2011 02:03:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=X+c9b5Zw9+WJYyezTgVyaphSurDCY8J1Y28hXU8LN0E=; b=EJ2DhxvAr5gQX7NP6XvQ0MKm5j/RvwBDlxmg/iqZxxSrwJ/hlcRMwyAogLFaSXRGEi Nfn8l2AR0h2H/KTh1xQvoQQjmd8/ERTlheP2PSCVjdwP0Bwd87KM3r/Xc+erhEW332tT GklGpHouVW5At6ri9qD4f5BiFnjJ2uTZ/djmU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=USWyDbK9mZedYtDRC5wQV38zwIvwEKFD98CtueHEolOKOyqDAaIk8Iej01Vet/HPw2 Z+HGt0g6x/bg8K6CEH4lWe14e23+7v1XpEhjcol2O9DMnB2TZTpT4uhWiv11bbP1CXqb PPpt9R/64za8lLIzLIaXA3oEpjRXHrqRVs0gg= MIME-Version: 1.0 Received: by 10.204.19.83 with SMTP id z19mr3265746bka.191.1304327015648; Mon, 02 May 2011 02:03:35 -0700 (PDT) Received: by 10.204.115.131 with HTTP; Mon, 2 May 2011 02:03:35 -0700 (PDT) In-Reply-To: <4DBE69B4.8070702@ice-sa.com> References: <4DBE69B4.8070702@ice-sa.com> Date: Mon, 2 May 2011 14:33:35 +0530 Message-ID: Subject: Re: modjk apache response questions From: Harsimranjit singh Kler To: Tomcat Users List Content-Type: multipart/alternative; boundary=00032555a3da704f6604a2474cde X-Virus-Checked: Checked by ClamAV on apache.org --00032555a3da704f6604a2474cde Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hey Load balancing is perfect.Same number of requests are distributed among number of tomcats. Only thing what may possible some requests in queue like why only 500 requests proccessed. tool is able to hit concurrent requests,LB is disrtibuting among each tomca= t as well. worker.balancer.sticky_session=3D1 so indivdual requests is completly proccessed by one tomcat.tool taking car= e of sessions.this is fine i willl surly back you with following tests as well Thanks a lot ! Regards Harsimram On Mon, May 2, 2011 at 1:52 PM, Andr=E9 Warnier wrote: > Harsimranjit singh Kler wrote: > >> Hi >> Yes , it seems wrong configuration .New one is: >> >> >> worker.list=3Dbalancer >> >> #For tomcat 1 >> >> worker.worker1.type=3Dajp13 >> >> worker.worker1.host=3D10.58.116.20 >> >> worker.worker1.port=3D8009 >> >> worker.worker1.lbfactor=3D1 >> >> #For tomcat 2 >> >> worker2.worker2.type=3Dajp13 >> >> worker.worker2.host=3D10.58.116.20 >> >> worker.worker2.port=3D8010 >> >> worker.worker2.lbfactor=3D1 >> >> #For tomcat 3 >> >> worker.worker3.type=3Dajp13 >> >> worker.worker3.host=3D10.71.10.231 >> >> worker.worker3.port=3D8011 >> >> worker.worker3.lbfactor=3D1 >> >> >> >> worker.balancer.type=3Dlb >> >> worker.balancer.balance_workers=3Dworker1,worker2,worker3 >> >> worker.balancer.sticky_session=3D1 >> Is this fine Now? >> >> One more thing i observe .When i changing with with maxthreads.Httpd >> status >> following o/p >> >> Apache Server Status for Server Version: Apache/2.2.17 (Unix) DAV/2 >> mod_jk/1.2.30 Server Built: Apr 19 2011 08:35:28 >> ------------------------------ >> Current Time: Tuesday, 03-May-2011 02:13:57 IST Restart Time: Tuesday, >> 03-May-2011 01:56:50 IST Parent Server Generation: 0 Server uptime: 17 >> minutes 7 seconds Total accesses: 16534 - Total Traffic: 7.2 MB CPU Usag= e: >> u3.4 s1.79 cu0 cs0 - .505% CPU load 16.1 requests/sec - 7.2 kB/second - >> 459 >> B/request 1 requests currently being processed, 499 idle workers >> . >> . >> 501 requests currently being processed, 149 idle workers >> Why always 501 requests processed??.i mean if i increase number of >> concurrent requests on apache loadbalancer this value never increses >> beyond >> 500? >> >> 149 (i.e idle worker increses)change if i increase maxspareThreads from >> worker MPM configurations. >> >> > I am not really familiar with the Apache "worker MPM" and its exact > ramifications in the way that mod_jk handles the number of connections to > Tomcat. > So I don't know. > But the limit of 500 requests being processed, looks suspiciously the sam= e > as the maxThreads value of /one/ Tomcat. > So maybe it is not really balancing the load, but sending it all to one > Tomcat only. > This may have something to do with the following setting : > > > > worker.balancer.sticky_session=3D1 > > and with the way in which your test application is working (with regard t= o > sessions). > You say that you are issuing 4 requests in sequence. Are those requests > part of a session at the Tomcat level ? Does your test tool take this int= o > account ? > > I think you should really (re-)read this page : > http://httpd.apache.org/docs/2.2/mod/worker.html > and this page : > http://tomcat.apache.org/connectors-doc/reference/workers.html > (see in particular "connection_pool_size") > > and use logic to determine what may be happening. > > Also, for us to really help you, there are too many unknowns in your test > setup (for example, we do not know your test application). > > To eat an elephant, do it a little bit at a time (African proverb). > > So let me suggest the following plan, to simplify the analysis : > > 1) at the Tomcat level, create one static html page inside your webapp > (for example : tomcat_dir/webapps/my-webapp/test.html) > 2) /from another server/, use the Apache "ab" program (*) to issue a numb= er > of test requests to the front-end load-balancer, for this static page > 3) note the settings and the results > 4) re-do the same test with other settings, changing one setting at a tim= e > > If you see the same behaviour as with your own test application, then > indeed there is something strange going on, worthy of more analysis. > If you do not see the same behaviour, then you know that what you are > seeing has something to do with your test application. Then you need to > figure out what is different between your test application, and a standar= d > request for a static page. > > > (*) see : http://httpd.apache.org/docs/2.2/programs/ab.html > Example test : > /usr/sbin/ab -n 150 -c 50 "http://frontend.company.com/my-webapp/test.htm= l > " > (to issue a total of 150 requests, with 50 in parallel; in other words, 5= 0 > ab instances will issue 3 requests each) > and then change gradually to > /usr/sbin/ab -n 3000 -c 1000 " > http://frontend.company.com/my-webapp/test.html" > (to issue a total of 3000 requests, with 1000 in parallel; in other words= , > 1000 ab instances will issue 3 requests each) > > Run this from another server, so that running "ab" itself does not > interfere with the resources of your load-balancer and tomcat hosts. > > > > >> >> >> why no error logs if something wrong configured in worker.properities? >> > > 1) unknown directives are just being ignored. Maybe if you set the log > level very high (e.g. debug) it will print a warning. > 2) the 2 directives > worker.list=3Dbalancer > worker.list=3Dworker1 > were not illegal. They just add up, so you end up with a worker list > containing "balancer,worker1". > on the other hand, you had > > worker.balancer.balance_workers=3Dworker1,worker2,worker3 > So you ended up with worker1 in both lists : the non-balanced list of > mod_jk itself (2 workers : worker1 and balancer); and the internal list o= f > the balancer worker. That was inconsistent and may be the cause for the > strange behaviour you were seeing. > > > > > >> >> >> On Wed, Apr 27, 2011 at 8:57 PM, Harsimranjit singh Kler < >> simran4u2@gmail.com> wrote: >> >> Hi >>> >>> >>> I need some observations on loadbalancer with mod jk, such as >>> How to check utilization of each httpd workers? How to check what is t= he >>> number of connections active on the each separate >>> Tomcats when there is load?.How i can increase response time?AJP port >>> should unique in worker.properities? >>> >>> Whenever i am increasing concurrent requests on LB response time >>> decreases? >>> Using apache 2.2.17+modjk1.2.31+tomcat 5.5.27 >>> >>> >>> regards >>> harsimran >>> >>> >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org > For additional commands, e-mail: users-help@tomcat.apache.org > > --00032555a3da704f6604a2474cde--