Thanks. I got the dump of the running JVM (only the benchmark is running at dump time). I tried to take a look at it, but as am not familiar with java, I prefer talk about it here.
-first I noticed the number of TP-Processor is twice the number of concurrent resquests send by ab (why twice? i don't know). About half of them are in Object.wait state "TP-Processor40" daemon prio=1 tid=0xdef53168 nid=0x646f in Object.wait() [0xda729000..0xda7291b8] at java.lang.Object.wait(Native Method) - waiting on <0xe17bc808> (a org.apache.tomcat.util.threads.ThreadPool$ControlRunnable) at java.lang.Object.wait(Object.java:429) at org.apache.tomcat.util.threads.ThreadPool $ControlRunnable.run(ThreadPool.java:661) - locked <0xe17bc808> (a org.apache.tomcat.util.threads.ThreadPool$ControlRunnable) at java.lang.Thread.run(Thread.java:534) and the other half is waiting for a monitor entry. "TP-Processor34" daemon prio=1 tid=0xdef3edc0 nid=0x6469 waiting for monitor entry [0xdaa28000..0xdaa291b8] at java.sql.DriverManager.getConnection(DriverManager.java:158) - waiting to lock <0xeff0b350> (a java.lang.Class) at com.mana.oc.DBConnection.getConnectionCRM(DBConnection.java:155) at org.apache.jsp.Login_jsp._jspService(Login_jsp.java:192) ...... And only 5 runnable processors. To me this sounds like a pool of database connection that is full but I'm not sure of it and I don't really know how/where to deal with it. If someone has the kind willing to take a look at the full dump here it is: http://pastebin.com/2v3PVTDm Regards Le jeudi 26 août 2010 à 21:36 +0200, Rainer Jung a écrit : > On 26.08.2010 21:00, Alexandre Chapellon wrote: > > Le jeudi 26 août 2010 à 09:25 +0200, Rainer Jung a écrit : > > > >> On 26.08.2010 03:28, Alexandre Chapellon wrote: > >>> Hello, > >>> > >>> I'm quite new to tomcat and have an old webapps running on tomcat 4.1 > >>> and jvm 1.4.2 with apach2.2 in front ofthem (using modjk). > >>> I'm trying to get ready for a comming pick load I will have to face. > >>> I Try to do some benchmark using ab and the jkstatus worker. > >>> Whatever the configuration of my connecter (both on the apache or tomcat > >>> side) I never go upper than 20 requests / second. > >>> Here are few parameters I changed in order to get better performances: > >>> > >>> -Apache2 (worker): > >>> increased ServerLimit (64), ThreadLimit (256), MaxClients (2048), > >>> ThreadsPerChild (128) > >>> set to a non zero value MaxRequestsPerChild (500) > >>> > >>> - modjk (1.2.30): > >>> set to non-zero value worker.selfcare.connection_pool_timeout=60 > >>> > >>> -Tomcat AJP13 Connector: > >>> acceptCount="50" enableLookups="false" maxProcessors="500" > >>> bufferSize="4096" socketBuffer="20000" > >>> > >>> Unfortunately this doesn't help and am still stuck with 20req/s when the > >>> machines' load is not that high and 60% of CPU at most is used during > >>> stress test. > >>> I've googled around but can't find anything else about increasing > >>> performances of apache/tomcat... Help much appreciated > >>> > >>> Regards > >>> > >>> P.S: right now am using ab to send 2000 request with 50 concurrents. > >> > >> Take thread dumps of the Tomcat JVM and check what your applicaion is > >> actually doing (like waiting for locks or externals components). > >> > > > > > > This sounds an excellent idea indeed, and it's surely what I would have > > done if I new it was possible and how I could do it :) > > What's the way to do it? > > http://wiki.apache.org/tomcat/HowTo#How_do_I_obtain_a_thread_dump_of_my_running_webapp_.3F > > Regards, > > Rainer > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org >