More threads



Hi All,

I been benchmarking a Java servlet I have created and I want to be able to handle a massive amount of simultaneous connections.
So far using benchmarking tools I have been able to get around 2,565 threads on the Tomcat 5.5 Java process (with native 1.4.2 Java) according to ps -auxwH | grep -c 'java'


But I just can't seem to get past that mark, I have a lot of memory currently the Tomcat is allocated 2gigs of memory.

When I max it out with my benchmarks I get this in catalina Tomcat 5.5 but there is still plenty of free memory to the Tomcat process.
SEVERE: Caught exception (java.lang.OutOfMemoryError: unable to create new native thread) executing org.apache.jk.common.SocketAcceptor@f36e59, terminatingthread


I have been testing with my libmap.conf with these different types of implementations.

[/usr/local/jdk1.4.2/]
#libpthread.so           libc_r.so
#libpthread.so.2           libc_r.so.6
libpthread.so.2         libthr.so.2
libpthread.so           libthr.so
libc_r.so.6             libthr.so.2
libc_r.so               libthr.so

I have been getting the best performance with libthr and have been using the above libthr and with these settings below.

I have set my max_threads in /etc/sysctl.conf to a massive amount.

kern.threads.max_threads_per_proc=40000
kern.threads.max_groups_per_proc=40000

ps -auxwH | grep -c 'java'
2565

I am using Apache2.2 with the new built in AJP module which has been a great addition to Apache 2.2.
I have been able to get the setup performing most stable (no 503 status errors) but with less performance / threads with the libmap.conf below.
[/usr/local/jdk1.4.2/]
libpthread.so libc_r.so
libpthread.so.2 libc_r.so.6


I am on 6.0 Release i386, dual Intel P4, generic SMP kernel.

With Tomcat on Windows XP I have been able to get it running better.
Does any one know of some other sysctls that increase the amount of threads in libthr which I am assuming utilizes the above sysctls. Does any one know how many threads can be created in Java on FreeBSD?


Cheers,
Mike





_______________________________________________
freebsd-performance@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-performance
To unsubscribe, send any mail to "freebsd-performance-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Tomcat on OpenVMS - Is source code available?
    ... Is the Java source code for Tomcat [as built by HP for the CSWS_JAVA v2.1 ... I know it is based on Tomcat v4.1.24, which is the version that it reports ... "WEB-INF" subfolder of a webapp to enable them to be protected from being ... The JSP files in the "WEB-INF" subfolder do not get compiled into Java ...
    (comp.os.vms)
  • Cannot install / uninstall alternate signal stack
    ... Java HotSpotClient VM warning: ... Please check ERROR REPORT FILE for further information, ... Tomcat was restarted, and I have not seen these messages since. ... happened twice in the last year on a production machine. ...
    (comp.lang.java.help)
  • Re: tomcat and the working directory
    ... >>>do this so that some dlls I am using, which are invoked via jni from my ... The working directory is the directory the Java process ... This is good news as it hasn't been getting me anywhere. ... (whether inside or outside tomcat). ...
    (comp.lang.java.programmer)
  • Java / Tomcat / Jython Problem running on FC4
    ... I have an interesting problem trying to deploy a Java web application to ... my instance of Tomcat running on my FC4 machine. ... nested exception is org.springframework.beans.FatalBeanException: Could ... not instantiate class; ...
    (Fedora)
  • Java Webservices - newbie question.....
    ... And i moved onto Java side recently - and am pretty new to tomcat / ... why would people use it on top of apache http server, ... web services, they mainly explain what webservices are, what is ...
    (comp.lang.java.programmer)