-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Linbo,
On 3/9/17 7:31 PM, linbo liao wrote: > 1、The load-generating vm has 2 cores. With only 2 cores, you can only actually do 2 things at once. Perhaps you need more load-generating computers. > 2、Can I use currentThreadsBusy to monitor the performance of Tomcat > using APR connector? Yes, you can use that with any connector. The threads are Java threads. Only the underlying file descriptors are being managed by APR versus Java's BIO/NIO/2 stream managers. - -chris > 2017-03-10 0:42 GMT+08:00 Christopher Schultz > <ch...@christopherschultz.net> : > > 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 >>>>> >>>>> >>>> >> >> --------------------------------------------------------------------- >> >> 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/ iQIcBAEBCAAGBQJYwuuvAAoJEBzwKT+lPKRYfCUP/1OEAoFvKMAY2Rmh9X0Gy+WN ZIfnZOOUnC3onnEpgCGxucxXzfkf9jGljhIIqr+mXYu1urbhpgUaoGXT8CS7S4bn SSE7GSQwaQ0dyqdzhc4F2/4LzMZ1J1u+Jakn/uQhlDv4eIrYMo4tNVGEaGdVA7jo hU6Auy4ATY5NW/0zeefnukq8fp+CyyMGPESJGsCDL5czVjZ8zXyHo/4Px2kGyryt 7GM/R+8RpapnrA3WFQs65MTMn7cQAbAZOSgvzUfCC6VQicn/rMuND07OgN7I4MUG soEpRDjwY/41ynEUL5wID6uHsWJ9KrRldybhSQzwpI3FVNPHDCe3hRxNWPN0eULT /u8fCK2jyswscRqfTuk1NKEQGJ4XQqMVo+Y0cJ9BAncUPA5OUN2zD/DLnIa06yLv OXs3HjyFgwwEN9wMBxQyMedam5BkcjzjD6A5zdIV0isHyROa3idVl3B8HYyslhk5 seLlCPOehr2MJsluzZjiciv4estnUf2Dm43aTc8c/1I12AMmLudAxkbGB5a4bkUt mb4LXpV+pPuQ/rdWrBAuyvfAXYvlgjKmcWrKltrpzFuTU+VLW8GC/1IsLwYlDcpW oilPZtfKEUp1hnsT8bKC1pywT3lX5MYT4acxbXcOAw1cSY+ocwPmum4J3NKBfcQP mR5U4hKAZ926OQYwC/f6 =E3ng -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org