Jruby 1.5 + jboss 5.1.0.GA performance issues

I have a moderately sized Rails application which I have been packaging
with the latest warbler to run it in JBoss 5.1.0GA. I am using jruby
1.5.

I have been running into a lot of performance issues and its very
unstable. Sometimes the server starts up reasonable quickly, under 2
min, but then other times it take between 8 and 12 minutes. I can live
with a slow server start, but, what gets me is that sometimes the pages
take ages to load, and sometimes they are very quick. I have also been
running into the dreaded “RackInitializationException: timeout: all
listeners busy”.

The hardware I am running on is:

Installed Memory: 4 GB

Swap: 4094 MB

  CPU: Intel(R) Xeon(R) CPU           E7320  @ 2.13GHz

  CPU: Intel(R) Xeon(R) CPU           E7320  @ 2.13GHz

OS: Red Hat Enterprise Linux Server release 5.5 (Tikanga)

OS ARCH: x86_64

OS KERNEL: 2.6.18-194.3.1.el5

Disk /dev/sda: 17.1 GB, 17179869184 bytes

DF:

    Filesystem Size Used Avail Use% Mounted on

    /dev/mapper/VG00-LVROOT 12G 5.6G 5.5G 51% /

    /dev/sda1 99M 19M 75M 21% /boot

in jboss, these are the java vm options I am using while starting the
app server:

if [ “x$JAVA_OPTS” = “x” ]; then
JAVA_OPTS="-Xms2048m -Xmx2048m -Xmn512m -XX:MaxPermSize=256m
-Dorg.jboss.resolver.warning=true "
JAVA_OPTS="$JAVA_OPTS -Dsun.rmi.dgc.client.gcInterval=3600000
-Dsun.rmi.dgc.server.gcInterval=3600000"
JAVA_OPTS="$JAVA_OPTS -verbose:gc -XX:NewRatio=3 -XX:+UseParallelGC
-XX:ParallelGCThreads=2 "
fi

JAVA_OPTS="$JAVA_OPTS -Djboss.server.log.threshold=INFO "


Any performance tips or suggestions would be really helpful - does
anyone see anything in my setup that jumps out and could be causing
performance issues?

Thanks

Are you running the latest version of Java and using the server VM?
I’m guessing you are but you didn’t mention anything about it.

The only think I can think of which is likely to stabilize your app
both in startup time, request time, and memory usage is to go
thread-safe. Depending on your application and the plugins you use,
set config.threadsafe! in config/environments/production.rb and set
jruby.min.runtimes and jruby.max.runtimes both to 1.

/Nick

On Wed, Jun 23, 2010 at 4:16 PM, Venka A. [email protected]
wrote:

listeners busy".
CPU: Intel(R) Xeon(R) CPU E7320 @ 2.13GHz

app server:
JAVA_OPTS="$JAVA_OPTS -Djboss.server.log.threshold=INFO "


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email