performance question

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

performance question

Frédéric de la Goublaye
Hi,

I used FreeBSD 6.0.

I need to use Tomcat to serve jsp servlet and database.
I choose sqlite because the data will also
be accessible via a local C++ application on the user computer.

I wonder what is the fastest solution :
- use Tomcat alone on port 80
- use Tomcat with Apache22

What is the best combination for using Tomcat ?
Alone or with Apache ?

I know that not using Apache may avoid me from using all nice PHP solutions
like phpBB and so on ... also PHP5 can used sqlite

but I still wonder what is the fastest solution.

Thanks for help

Fr?d?ric

_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-java
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: performance question

Michael VInce-2
I sent an email to you about this for your last post
Here it is below, even though your kind of asking a slightly different
set of questions, but to answer some of your other questions here I go.

I have tested http Java direct over the Internet with 'ab' and for what
ever reason it just returns less requests/sec compared to using Apache
infront of it, one possibility of why this its like that is maybe Java
uses more CPU time dealing with a higher latency tcp connection.
There are many advantages of running Apache in front of tomcat, such as
being able to server static data directly, for example just put
ProxyPass        /static/ !
This will not pass anything in the whole static dir to Tomcat and have
Apache server it directly it self.

I have being using Apache/Tomcat setups in apache 1.3/2.0/2.1/2.2 and
Tomcats 3.x 4.1.x 5.0.x and 5.5.x
And I believe that the latest Apache 2.2 and Tomcat 5.5.9 are the best
combination, mod_proxy_ajp for connectors does give best performance but
your more likely to get the odd few 503 status errors to peoples
browsers under high load.
Also you can run php in Apache alongside Tomcat.

Old email
Use Apache2.2 which is the latest release stable version of Apache over
the 2.1 series which are just experimental betas and should never be
used in an production environment, but the 2.1 series have shown that
2.2 is really ready to go straight into production use as far as I am
concerned.

I have been testing with Apache 2.2 which seems to have tons of little
things that are much better about it over the old 2.0 Apache series, one
big one is the new built in AJP protocol module for Tomcat, I am using
Tomcat 5.5.9 which appears to work better with AJP then Tomcat 5.0.x.
As long as you aren't under extreme load AJP gives the best performance
but if you really push the load on the server you might get 503 status
errors in Apache logs, but using AJP does perform more requests/sec
because it uses less CPU over using mod_proxy HTTP style connectors to
Tomcat.

I use a portupgrade command for the apache22 port to install the proxy
modules and worker MPM via a single portupgrade command.
portupgrade -RrN -m 'WITH_MPM=worker -DWITH_PROXY_MODULES'
/usr/ports/www/apache22

Make sure you have 'LoadModule proxy_ajp_module
libexec/apache22/mod_proxy_ajp.so' enabled in httpd.conf

Then in the virtual host directive of Apache link it with Tomcat 5.5.9
like so
ProxyPass /javacontext ajp://127.0.0.1:8009/javacontext

Cheers,
Mike

Fr?d?ric de la Goublaye wrote:

> Hi,
>
> I used FreeBSD 6.0.
>
> I need to use Tomcat to serve jsp servlet and database.
> I choose sqlite because the data will also
> be accessible via a local C++ application on the user computer.
>
> I wonder what is the fastest solution :
> - use Tomcat alone on port 80
> - use Tomcat with Apache22
>
> What is the best combination for using Tomcat ?
> Alone or with Apache ?
>
> I know that not using Apache may avoid me from using all nice PHP
> solutions like phpBB and so on ... also PHP5 can used sqlite
>
> but I still wonder what is the fastest solution.
>
> Thanks for help
>
> Fr?d?ric
> _______________________________________________
> [hidden email] mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-java
> To unsubscribe, send any mail to "[hidden email]"


_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-java
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

mod_jk vs mod_proxy

Frédéric de la Goublaye
Hi,

To use Apache22 and Tomcat5.5.12, who is the best: mod_jk or mod_proxy ?
(for the best performances, only one tomcat, no server balancing)

It is normal that mod_proxy makes a big java process (235 Mo) ?
(mod_jk makes a lot of java process).

What is the best for Java on FreeBSD ?
One big process or a few "smaller" java process ?

Is FreeBSD a good operating system to run Java applications with a heavy
load ?
(a lot of sql request and code actions, like an AI kernel ...)

Thanks for your help feedback.

Best Regards
Frédéric

_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-java
To unsubscribe, send any mail to "[hidden email]"