----------------------------------------------------------------
BEFORE YOU POST, search the faq at <http://java.apache.org/faq/>
WHEN YOU POST, include all relevant version numbers, log files,
and configuration files.  Don't make us guess your problem!!!
----------------------------------------------------------------


I have an observation/question with regards to differences between
running the IBM JVM (1.1.8) and the JRockit JVM to run the JServ 1.1
servlet engine on Win NT.

I have noticed that under heavy loads mod_jserv starts reporting errors
as it cannot successfully make a socket connection to the JServ server
running under the JVM.

I have only noticed this being a problem under Windows NT.  On other
platforms (Solaris, Linux) this socket connection problem doesn't seem
to occur.

Now to the point.  In my testing of JRockit vs. the IBM JVM, it seems
that JRockit exhibits this problem much more than the IBM JVM (also in
tests I have done between the IBM and Sun JVMs, IBM also fairs better
than the Sun JVM in this same regard).

So is there something I can configure in JRockit to eliminate, or at
least minimize these socket connect errors?  Other that this problem,
JRockit seems to run my servlets faster than the IBM JVM (which until
now had been the fastest I had tested on WinNT).  However with the
significant increase in errored requests under heavy load the increase
in performance of JRockit is not worth the decrease in stability.


Testing Results:
                            # of Simulated Clients (via Microsoft Web
Application Stress Tool)
                                  10            20           
40            70
                            JRockit  IBM  JRockit  IBM  JRockit  IBM 
JRockit  IBM
                               ---- ----     ---- ----     ---- ----    
---- ----
Total Requests                 1499 1403     1592 1408     1827 1343    
2052 1449
Total Successful Requests      1492 1403     1452 1408     1375 1343    
1338 1446
Total Errored Requests            7    0      140    0      452   
0      714    3
Successful Requests/Sec        49.7 46.8     48.4 46.9     45.8 44.8    
44.6 48.2

These tests where run with Apache 1.3.12, JServ 1.1, (JRockit 1.0 or IBM
JVM 1.1.8), Microsoft Web Application Stress Tool all running on a
450MHz Pentium II with 128M RAM running WinNT 4.0 SP5. (note that both
client and server load were running on the same machine).


The specific error from the JServ log (both JRockit and the IBM JVM
produced the same error, although the IBM JVM errors much less
frequently) is:

[28/03/2000 19:05:14:823] (EMERGENCY) ajp12: can not connect to host
127.0.0.1:8007
[28/03/2000 19:05:14:823] (EMERGENCY) ajp12: connection fail
[28/03/2000 19:05:14:823] (ERROR) an error returned handling request via
protocol "ajpv12"


The source code for the mod_jserv routine that originates this error is:

static int ajpv12_open(jserv_config *cfg, pool *p, unsigned long
address,
                       unsigned short port) {
    struct sockaddr_in addr;
    int sock;
    int ret;

    /* Check if we have a valid host address */
    if (address==0) {
        jserv_error(JSERV_LOG_EMERG,cfg,"ajp12: %s",
                    "cannot connect to unspecified host");
        return -1;
    }

    /* Check if we have a valid port number. */
    if (port < 1024) {
        jserv_error(JSERV_LOG_INFO,cfg,"ajp12: %d: %s",
                    port,
                    "invalid port, reset to default 8007");
        port = 8007;
    }
    addr.sin_addr.s_addr = address;
    addr.sin_port = htons(port);
    addr.sin_family = AF_INET;

    /* Open the socket */
    sock=ap_psocket(p, AF_INET, SOCK_STREAM, 0);
    if (sock==-1) {
        jserv_error(JSERV_LOG_EMERG,cfg,"ajp12: %s","can not open
socket");
        return -1;
    }
    jserv_error(JSERV_LOG_DEBUG,cfg,"ajp12: opening port %d",port);

    /* Tries to connect to JServ (continues trying while error is EINTR)
*/
    do {
        ret=connect(sock,(struct sockaddr *)&addr,sizeof(struct
sockaddr_in));
#ifdef WIN32
        if (ret==SOCKET_ERROR) errno=WSAGetLastError()-WSABASEERR;
#endif /* WIN32 */
    } while (ret==-1 && errno==EINTR);

    /* Check if we connected */
    if (ret==-1) {
        jserv_error(JSERV_LOG_EMERG,cfg,"ajp12: %s %s:%d",
                    "can not connect to host",
                    inet_ntoa(addr.sin_addr),
                    port);
        return -1;
    }
#ifdef TCP_NODELAY
    {
        int set = 1;
        setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, (char *)&set, 
        sizeof(set));
    }
#endif

    /* Return the socket number */
    return sock;
}



Does anyone have any suggestions on how to get JRockit to perform better
under heavy load?

thanks,
--Barry


--
--------------------------------------------------------------
Please read the FAQ! <http://java.apache.org/faq/>
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Archives and Other:  <http://java.apache.org/main/mail.html>
Problems?:           [EMAIL PROTECTED]

Reply via email to