-----------------------------
Please read the FAQ!
<http://java.apache.org/faq/>
-----------------------------

Brian Claus wrote:
> Hi,
> 
> I thought I'd mention this, as others may find it useful.  I'm not sure if
> this is worth submitting a patch or not, but would be more then happy to do
> so, if someone can tell me how :-)  (or point me to the right page).
Welcome. Join the java-apache list, and we'll discuss it there. This
idea is good IMO, but the default behavior should remain unchanged if
the parameter is not present.
> 
> We recently completed  work on a site using Apache(1.3.6)/JServ(1.0 Final),
> Oracle (7.3.x), JSDK (2.0) and Sun JDK (1.1.6).  (It is not yet in
> production, but should be soon).  Towards the end of the the project, we
> configured load balancing to improve performance.
> 
> The site runs on a dual processor sun box with a gigabyte of ram.  Once we
> started load testing, we found that the default configuration of apache
> produced a bottle neck because only one instance of the jvm was ever
> running, and thus only ever used one cpu.  As a result, we configured load
> balancing in order to run multiple jvms.
> 
> Our solaris box has a number of ip interfaces configured.  When we first
> configured load balancing, we could not connect to any running jserv
> instances.  After digging through the code for a while, we found that jserv
> does not bind to a specific ip address when it creates server sockets during
> start-up.  In order to get around this, we made changes to three files:
> 
> [jserv conf file].properties (the file used to configure jserv instances) to
> include an "address" argument, along with the port argument.
> JServ.java to pass the address information through to
> AuthenticatedServerSocket
> AuthenticatedServerSocket.java to use the address to bind to the address
> information read from the [jserv conf file].properties
> 
> So far (for about 2-3 weeks now) this has solved our problem.  The only draw
> back is that the -s option no longer works when shutting down jserv.  This
> is likely because it is not aware of the "address" paramter and is not
> connecting properly.  We haven't gotten around to digging through this yet.
> (at the moment its just not a priority).
> 
> The second thing that we found, after load testing JServ with the load
> balancing, is that with multiple jserv instances performance tends to
> improve.  We think that the jvm (sun jdk 1.1.6) gets bogged down with too
> many threads and that load balancing tends to work better when it is
> randomized across more processes.  We are currently running 8 processes
> (over 2 processors).  We've found that for now, that provides more then
> enough performmance to meet our requirements.  Increasing the number of
> jserv processes beyond that will increase performance, but it starts to
> require more load testing time and complexity then we are willing to devote.
> (we need to start creating banks of machines :-p).
I (experimentally) found that balancing a heavy load between different
processes was interesting for different reasons :
security, reliability, performance. This is not true for light load,
because of process context switching time. Happy that you share my
views. And also, use enough RAM to avoid swapping. But there is a limit
in the number of JVM/CPU (is 4 a good choice ? I think 2/3 would be
better, or even 1 on low-cost PCs, but depends mainly of YOUR servlets !

> 
> Brian Claus
> Corelan Communications
> Application Development Specialist
> .

Jean-Luc


--
--------------------------------------------------------------
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