-
1. Re: What is the default thread pool for http connector?
jaysensharma Dec 15, 2015 7:29 AM (in response to zhouqikun)Internaly executor can not be monitored. However it has some values like default MAX_THREADS value which is computed as following in EAP6.4 (which uses JBOSSWEB_7_5_0_FINAL )
MAX_THREADS computation for Java based connector.
512 * Runtime.getRuntime().availableProcessors()
- /**
- * Maximum amount of worker threads.
- */
- protected int maxThreads = (org.apache.tomcat.util.Constants.LOW_MEMORY) ? 64 : ((Constants.MAX_THREADS == -1) ? 512 * Runtime.getRuntime().availableProcessors() : Constants.MAX_THREADS);
If you want to really tune and monitor the threads statistics then you will need to define custom thread pool executor. It means f you do not want to use the default values then you got the right link which tell us exactly how to create an Executor and how to associate it with the connector:
Example:
<subsystem xmlns="urn:jboss:domain:threads:1.1"> <bounded-queue-thread-pool name="http-executor" allow-core-timeout="true"> <core-threads count="100"/> <queue-length count="100"/> <max-threads count="100"/> </bounded-queue-thread-pool> </subsystem> <subsystem xmlns="urn:jboss:domain:web:2.2" default-virtual-server="default-host" native="false"> <connector name="http" protocol="HTTP/1.1" scheme="http" socket-binding="http" executor="http-executor"/> <!-- NOTICE --> <virtual-server name="default-host" enable-welcome-root="true"> <alias name="localhost"/> <alias name="example.com"/> </virtual-server> </subsystem>
Then it can be monitored using CLI as following:
[standalone@localhost:9999 /] /subsystem=threads/bounded-queue-thread-pool=http-executor:read-resource(include-runtime=true)
Regards
Jay SenSharma
-
2. Re: What is the default thread pool for http connector?
jaysensharma Dec 15, 2015 7:32 AM (in response to zhouqikun)You can find more information in the current context in : https://developer.jboss.org/thread/228072?tstart=0
-
3. Re: What is the default thread pool for http connector?
zhouqikun Dec 17, 2015 10:36 AM (in response to jaysensharma)Hi SenSharma
Thanks a lot for your detail reply.
I refered to this link, I understood. It's JBoss specification that the default thread pool(internal executor)'s runtime attributes can't be monitored.
I think The default http connector's thread pool is generally the best pool to use for performance, but this pool's runtime attribute(for example currentThreadsBusy) can't be showed at any time.
Could you tell me more about the reason?