glassfish2 vs apache2.2/tomcat5.5

Radim Kolar kolar.radim at gmail.com
Thu Nov 1 18:26:57 CET 2007


pokud provozujete na BSD Java aplikace, je čas testnout Glassfish 2
AKA Sun Application server 9.1. Glassfish je fajn soft, alternativa k
JBOSS, jediny problem je ze to nema vlastni mod_rewrite a objektovou
cache.
Glassfish 3 (vyvojova verze) umi i PHP a Ruby.

Varovani: Glassfish potrebuje *minimalne* 500MB RAM pro sebe, takze
minimum RAM na serveru bych videl tak na 2GB. Verze 3 potrebuje
vyrazne mene RAMky.

Maly benchmark na AMD X2 4200+ 64bit, fbsd 6.2.

Pouzita stejna aplikace.
apache 2.2 + mod_ajp + Tomcat 5.5 - 21 req/s
glassfish 2.0 ur1 branch - 1107.8 req/s.

jen pro srovnani priblizne stejne slozita aplikace v php - 818 req/s.

mereno programem webbench, program ab pri mereni glassfish serveru
crashoval a navic v pripade apache/tomcat comba daval horsi vysledky
(ukazoval 15/sec).

vykon apache/tomcat je evidentne chyba BSD6, protoze masina je idle a
httpd procesy
cekaji v select()/accept(). V 7.x je select() prepracovan, dost to
zrychlilo pgsql, melo by
to pomoci i zde. Tezko rict, proc se chyba neprojevuje taky u php
scriptu. asi bude problem ve workloadu generovanym modulem mod_proxy.

ale 6.x je uz historie a navic ma i vice problemu ktere jsou uz v 7
opraveny napr. wakeup na semaforech je pomaly coz vyrazne brzdi pgsql,
tak to nema cenu resit. Jinak 7.0 vrele doporucuji, PGSQL na 8core
masine mne zrychlil o cca 250%. a dalsiho 17% zrychleni jsem dosahl
nainstalovanim pgsql 8.3 beta. Skoda jen ze se do 7.0 nedostal
ten novy instalak, ten stary neumi delat RAIDy, gjournal nebo
instalovat na ZFS to je fakt dneska ostuda.

--navod ke kompilaci glassfish na bsd, nefunguje ale SSL--
changes made to the default FreeBSD install:
    * added sunpkcs11.jar from sun-jdk-(linux) in
/usr/local/diablo-jdk1.5.0/jre/lib/ext/sunpkcs11.jar.
      - Glassfish depends on this jar, and it isn't included in the
"diablo" jdk.
      - The another way to solve this is to build the jdk from sources

Steps:

mkdir workspace
cd workspace
cvs -d :pserver:guillo at cvs.dev.java.net:/cvs checkout -r
SJSAS91_UR1_BRANCH glassfish/bootstrap

## Modify OS and cvs user in project.properties
#glassfish.os.name=Darwin
#glassfish.cvs.username=guest

maven checkout bootstrap-all build

maven configure-runtime
# or to fine tune the configuration
maven configure-runtime -Dinteractive




More information about the Users-l mailing list