tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From
Subject Re: Optimizing Tomcat
Date Tue, 13 Mar 2001 13:27:56 GMT
Oops, the page is gone now... It's been a few weeks since I last saw it,
but you know the net....

Anyway, I'm just pasting the recommendations here, which were posted to
java-apache-users mailing list last year:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
From: "B. Flaumenhaft" <benf@bearriver.com>
Date: Tue, 14 Mar 2000 20:07:45 -0800

I've had some problems with JServ under high-load conditions which have
never been satisfactorily answered (here or elsewhere). I've managed to get
the problems to go away (see below), but the symptoms were very odd ...
Jserv unexpectedly restarting, "premature end of script headers", and no
other explanations.

The following fixes seem to do the trick.

1. Make sure you have enough memory in your VM (this is the easy one). You
can adjust this by setting the -Xmx parameter for your VM in
jserv.properties, e.g.

wrapper.bin.parameters=-Xmx96000000

to set it to 96 MB.

2. Communications can also get overloaded between mod_jserv and JServ. Two
things can cause this ...

A. JServ runs out of sockets to answer mod_jserv.

To raise this number, edit (in jserv.properties) the maxConnections
parameter, e.g.

security.maxConnections=200

Note that your OS must support this many file descriptors per process.

Linux, by default, supports 256. I've seen JServ satisfy unbelievably high
numbers of requests without requiring more than 200, and Linux seems to
handle this okay, so I've never figured out how to increase this number. I
believe that in order to increase Linux's descriptors per process, you need
to recompile the kernel (unlike Solaris, where you can edit /etc/system).

B. JServ takes too long to respond over APJServ to mod_jserv. To change
this, edit (in jserv.conf) the "APJServVMTimeout" parameter, e.g.

APJServVMTimeout    50

(default is only 10 sec)

All this has worked fine for me. I've handled between 600 and 1000
concurrent requests, sustained over time, on a relatively small machine
(133Mhz Pentium, 96MB RAM). Needless to say, performance suffers, but =
throw
this on a heavier machine and it performs with surprising scalability.

Hope that helps.

Regards,
Ben Flaumenhaft
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Hope this helps...

> >
> > Also you might have a look at:
> >
> > Configuration to allow 200 simultaneous users
> > http://www.magiccookie.com/bboard/do=list-containers/container=54222
> >
> > for many Tomcat optimization tips.
> >
>
> I look forward to reading this. The server seems to be down today,
> however... :-(




---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, email: tomcat-user-help@jakarta.apache.org


Mime
View raw message