Angus Mezick wrote:

I forgot to mention that I am using the following software:
Apache: apache_2.0.47-win32-x86-no_ssl.msi
JK2: mod_jk2-2.0.43.dll AND the 2.0.4 mod_jk.so from the jakarta site.
Tomcat: 4.1.27


-----Original Message-----
From: Angus Mezick Sent: Thursday, April 08, 2004 9:44 AM
To: [EMAIL PROTECTED]
Subject: I think lb_factor in JK2 is broken (or just backwards from JK)



Web01 is running apache Web01 and web02 are running tomcat I set web01 to lb_factor=1 I set web02 to lb_factor=15

From what I see in code, lb_factor is used as increment and not as load factor...

    if (rc != NULL) {
        /* It it's the default, it'll remain the default - we don't
           increase the factor
         */
        rc->in_error_state = JK_FALSE;
        if (rc->lb_value != 0) {
            int newValue = rc->lb_value + rc->lb_factor;

if (newValue > 255) {
rc->lb_value = rc->lb_factor;
/* Roll over. This has 2 goals:
- avoid the lb factor becoming too big, and give a chance to run to
workers that were in error state ( I think it's cleaner than looking for "max" )
- the actual lb_value will be 1 byte. Even on the craziest platform, that
will be an atomic write. We do a lot of operations on lb_value in a MT environment,
and the chance of reading something inconsistent is considerable. Since APR
will not support atomic - and adding a CS would cost too much, this is actually
a good solution.


Note that lb_value is not used for anything critical - just to balance the load,
the worst that may happen is having a worker stay idle for 255 requests.
*/
for (i = 0; i < lb->workerCnt[currentLevel]; i++) {
jk_worker_t *w = lb->workerTables[currentLevel][i];
w->lb_value = w->lb_factor;
}
}
else {
rc->lb_value = newValue;
}
}
}





--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to