1、The load-generating vm has 2 cores. 2、Can I use currentThreadsBusy to monitor the performance of Tomcat using APR connector?
2017-03-10 0:42 GMT+08:00 Christopher Schultz <ch...@christopherschultz.net> : > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA256 > > Linbo, > > On 3/8/17 8:13 PM, linbo liao wrote: > > Here is the Connector configuration: > > > > <Connector port="8080" > > protocol="org.apache.coyote.http11.Http11AprProtocol" > > maxHttpHeaderSize="8192" maxThreads="400" acceptorThreadCount="4" > > maxKeepAliveRequests="-1" enableLookups="false" > > disableUploadTimeout="true" connectionTimeout="20000" /> > > > > I use wrk, the currentThreadsBusy is higher than the value in ab > > testing, but most of time is less than 40. > > > > ./wrk -t100 -c 100 -d 10s http://10.211.55.4:8080/ > > I've never used wrk. How many CPU cores does your load-generating > computer have? > > > For APR connector, will it get one thread from the poll to deal > > with each request? > > For both NIO/2 and APR, you'll have one accepter thread (4 in your > case) and one poller thread for many (400 in your case) > request-processing threads. > > It's possible that your server is handling the requests fast enough > that they never pile-up enough to use more than 40 threads. > > Congratulations: you can handle the load you are putting on the server. > :) > > - -chris > > > 2017-03-08 22:45 GMT+08:00 Christopher Schultz > > <ch...@christopherschultz.net > >> : > > > > Linbo, > > > > On 3/7/17 10:14 PM, linbo liao wrote: > >>>> I setup local environment to test Tomcat monitor. > >>>> > >>>> The Environment: > >>>> > >>>> Tomcat: 8.5.5 VM: Ubuntu 14.04.1 LTS HTTP PORT: 8080 IP: > >>>> 10.211.55.4 > >>>> > >>>> Tomcat use APR connector, I test the tomcat via ab command, > >>>> find JMX currentThreadsBusy < 10 all of the time. > >>>> > >>>> ab -n 100000 -c 100 10.211.55.4:8080/ > >>>>> > >>>> > >>>> I tried to search the reason but without the result. For BIO > >>>> each thread to handle one connection, so currentThreadsBusy > >>>> can show the performance of tomcat. > >>>> > >>>> But for APR connector, what's the meaning of > >>>> currentThreadsBusy? > > > > Please post your <Connector> configuration. > > > > It seems that ab isn't a very good load-generator for several > > reasons. But you should be able to get more than Java 10 threads > > working at a tim e. > > > > You are probably expecting ~100 threads busy at all times, right? > > > > -chris > >> > >> --------------------------------------------------------------------- > >> > >> > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > >> For additional commands, e-mail: users-h...@tomcat.apache.org > >> > >> > > > -----BEGIN PGP SIGNATURE----- > Comment: GPGTools - http://gpgtools.org > Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ > > iQIcBAEBCAAGBQJYwYX2AAoJEBzwKT+lPKRYi2EP/1krL32JxAAkVa1C+lZiehoC > KCufHoT/t4YK8yZRth+3TXK7wSqINwuZf+6PQXlQaR+Vy6chacS+DGvebsvBj58S > q8Piu6kcTlnuK21nBBTW6pQ6vvLA7TpEaup8eCB3lVWIuUoTQlAL+OerAYP6M7pk > 8oVHMatIJLSzhdjWo1S7Hz90TonGZvPb9Mk5587Dp8G2dKTu78abMVbGiR7xOn7g > FMWS/k/HbAnGbkfwdTHww/inrXxfODfhcRuyyQW/j46PP6mQbzcjdjLuUGsKy6cm > 8yUuy0h88o4l95X8oDf3yaI5nWZXvYuIHvT/9+L9DVhzpllol9CzBY6vXSFyuvQD > Sd9GCNNgvQjN4CoKvlBeUIk7LOF7p4a15bBfDFnEAJVB7HGzU/Rx8Fp1+ON57pLA > gN+IBT7joqCWissmZyO/lsQ6erQR2jmFvHBodXOEYFIy3WF3zGgt4K8KPfSxSCXu > HtEuTR0enxBzSgfq0sx2nZxoetNn41BKPQo+T9E8zHTghoVGXHK8bpf1Z3/NZ2IP > /9FUix6rxj+y1RaeQqXZmfnHPwRDsl+RV0tO/nGyqiD4LB9Gb+bM7yNZxsSTs3Uk > YT6ZoZ1Dzys9Lifv+tFXK4pOWfeNAYo/3b58zGhHAlyEQySza8DgxTtsTql4i7TF > Ebqjos00OCr3EeLg5ODi > =6IxB > -----END PGP SIGNATURE----- > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > >