Ben, So I assume you have two web servers fronting two app servers - or there are two servers both of which have a web server and an app server? For the restart you talk about - did you restart both web servers? Do you have a good load balancer (local director, content director like an F5) in front of the two web servers?
If I am reading your JKStatus text correctly I noticed the following: Load balancer value on web server 2 ----------------------------------- = ~0.56 Load balancer value on web server 1 but Number requests on web server 2 ----------------------------------- = ~0.91 Number requests on web server 1 Now, if I am interpreting the meaning of "load balancer value" and "number of reuqests" correctly, that would imply that the number of sessions stuck to each app server from web server 1 is very roughly twice as high as from 2, but the total number of requests sent to each app server from both web servers is very roughly the same. (Can someone confirm I'm intrepreting those #s correctly?) According to the docs, each connect by default trys to keep the number of requests sent to each worker the same, which looks to be happening reasonably well. (I'm playing with trying the keep the number of sessions balanced since our apps tend to be more of a memory issue than a cpu issue. There is a setting on the connector for this.) With a some info on your setup we can try to figure out the load imbalance. As a note, I am playing with the jk1.2.x connector, but our productio systems use the old jk2.x connector. With that, I've seen a load imbalance on the app servers when one of the app serves has gone down for a while, and then has come back up. If the connectors are not reset, they will try to "catch up" the restarted app server in terms of the number of requests it has handled, thus loading it more heavily than servers that have been up the whole time. Brian -->-----Original Message----- -->From: ben short [mailto:[EMAIL PROTECTED] -->Sent: Thursday, August 23, 2007 4:51 AM -->To: Tomcat Users List -->Subject: JK Loadbalancer not balancing fairly --> -->Hi All, --> -->We are doing some load testing on our setup and find that -->the cpu use age of tomcat reported by top on the two systems -->is not equal. -->Typically we see figures like ~400% to 800% cpu on one -->machine and ~50% on the other machine for the java process. -->We would expect that the two cpu values to be equal. --> -->The jkstatus page on box one shows the following after a restart. -->Although before a restart the Max column was showing 250 for -->jcpres1 and 32 for jcpres2. --> -->Name Type Host Addr Act State D F -->M V Acc Err CE RE Wr Rd -->Busy Max Route RR Cd Rs --> jcpres1 ajp13 172.16.4.11:8009 -->172.16.4.11:8009 ACT OK 0 1 1 -->869 4276 2 4 0 939K 286M 1 -->11 jcpres1 --> 0/0 --> jcpres2 ajp13 172.16.4.12:8009 -->172.16.4.12:8009 ACT OK 0 1 1 -->869 4277 2 1 0 943K 280M 2 -->9 jcpres2 --> 0/0 --> -->and box 2 --> -->Name Type Host Addr Act State D F -->M V Acc Err CE RE Wr Rd -->Busy Max Route RR Cd Rs --> jcpres1 ajp13 172.16.4.11:8009 -->172.16.4.11:8009 ACT OK 0 1 1 -->484 3872 0 4 0 850K 256M 3 -->10 jcpres1 --> 0/0 --> jcpres2 ajp13 172.16.4.12:8009 -->172.16.4.12:8009 ACT OK 0 1 1 -->483 3871 0 4 0 850K 260M 1 -->10 jcpres2 --> 0/0 --> --> -->Our system setup. --> -->Both machines are running the the following software on RedHat 4ES --> -->Httpd 2.2.4 -->Mod JK 1.2.25 -->Tomcat 6.0.12 -->Java 1.6.0_01 --> -->Box 1. --> -->workers.properties --> --># JK Status worker config --> -->worker.list=jkstatus -->worker.jkstatus.type=status --> --># Presentaton Load Balancer Config --> -->worker.list=preslb --> -->worker.preslb.type=lb -->worker.preslb.balance_workers=jcpres1,jcpres2 -->worker.preslb.sticky_session=1 --> -->worker.jcpres1.port=8009 -->worker.jcpres1.host=172.16.4.11 -->worker.jcpres1.type=ajp13 -->worker.jcpres1.lbfactor=1 -->worker.jcpres1.fail_on_status=503,400,500,909 --> -->worker.jcpres2.port=8009 -->worker.jcpres2.host=172.16.4.12 -->worker.jcpres2.type=ajp13 -->worker.jcpres2.lbfactor=1 -->worker.jcpres2.fail_on_status=503,400,500,909 --> --> -->Box 2. --> -->workers.properties --> --># JK Status worker config --> -->worker.list=jkstatus -->worker.jkstatus.type=status --> --># Presentaton Load Balancer Config --> -->worker.list=preslb --> -->worker.preslb.type=lb -->worker.preslb.balance_workers=jcpres1,jcpres2 -->worker.preslb.sticky_session=1 --> -->worker.jcpres1.port=8009 -->worker.jcpres1.host=172.16.4.11 -->worker.jcpres1.type=ajp13 -->worker.jcpres1.lbfactor=1 -->worker.jcpres1.fail_on_status=503,400,500,909 --> -->worker.jcpres2.port=8009 -->worker.jcpres2.host=172.16.4.12 -->worker.jcpres2.type=ajp13 -->worker.jcpres2.lbfactor=1 -->worker.jcpres2.fail_on_status=503,400,500,909 --> -->--------------------------------------------------------------------- -->To start a new topic, e-mail: users@tomcat.apache.org To -->unsubscribe, e-mail: [EMAIL PROTECTED] -->For additional commands, e-mail: [EMAIL PROTECTED] --> --> --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]