Re: Thread related MBean questions
Hi Pid, Which MBean are you reading that on? Name: java.lang:type=Threading modelerType: sun.management.ThreadImpl ThreadAllocatedMemoryEnabled: true ThreadAllocatedMemorySupported: true ThreadContentionMonitoringEnabled: false DaemonThreadCount: 84 ... Tomcat has lots of MBeans and more than one way to create a thread pool. The JVM has threads and can contain multiple thread pools. Yes, for sure. Thanks. Yes, as of Tomcat 6.0.x, without an Executor the Connectors will have a pool each, and this will not decrease in size when idle. Thanks for confirming. I will put an Executor pool in place. -Shanti
RE: Thread related MBean questions
All, All, Is it possible to remove an installation of a compiler on a production web server(tomcat)? If there is a way to remove the compiler or is it required in order for the system to function properly. Could you please send me a precise summary of why and any steps that can be taken to mitigate any potential risk associated with the compiler remaining in place. This is for s security issue on my production system. My email is: maxie.wi...@serco-na.com Thanks for your time and support! Maxie Wiley III, Serco Inc -Original Message- From: Shanti Suresh [mailto:sha...@umich.edu] Sent: Monday, October 22, 2012 9:17 AM To: Tomcat Users List Subject: Re: Thread related MBean questions Hi Pid, Which MBean are you reading that on? Name: java.lang:type=Threading modelerType: sun.management.ThreadImpl ThreadAllocatedMemoryEnabled: true ThreadAllocatedMemorySupported: true ThreadContentionMonitoringEnabled: false DaemonThreadCount: 84 ... Tomcat has lots of MBeans and more than one way to create a thread pool. The JVM has threads and can contain multiple thread pools. Yes, for sure. Thanks. Yes, as of Tomcat 6.0.x, without an Executor the Connectors will have a pool each, and this will not decrease in size when idle. Thanks for confirming. I will put an Executor pool in place. -Shanti - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Thread related MBean questions
From: Wiley, Maxie [mailto:maxie.wi...@serco-na.com] Subject: RE: Thread related MBean questions All, Don't hijack threads. Start a completely new thread for a new topic. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Thread related MBean questions
And while you're at it : 1) http://www.catb.org/esr/faqs/smart-questions.html 2) don't top-post 3) don't hijack threads Wiley, Maxie wrote: All, All, Is it possible to remove an installation of a compiler on a production web server(tomcat)? If there is a way to remove the compiler or is it required in order for the system to function properly. Could you please send me a precise summary of why and any steps that can be taken to mitigate any potential risk associated with the compiler remaining in place. This is for s security issue on my production system. My email is: maxie.wi...@serco-na.com Thanks for your time and support! Maxie Wiley III, Serco Inc -Original Message- From: Shanti Suresh [mailto:sha...@umich.edu] Sent: Monday, October 22, 2012 9:17 AM To: Tomcat Users List Subject: Re: Thread related MBean questions Hi Pid, Which MBean are you reading that on? Name: java.lang:type=Threading modelerType: sun.management.ThreadImpl ThreadAllocatedMemoryEnabled: true ThreadAllocatedMemorySupported: true ThreadContentionMonitoringEnabled: false DaemonThreadCount: 84 ... Tomcat has lots of MBeans and more than one way to create a thread pool. The JVM has threads and can contain multiple thread pools. Yes, for sure. Thanks. Yes, as of Tomcat 6.0.x, without an Executor the Connectors will have a pool each, and this will not decrease in size when idle. Thanks for confirming. I will put an Executor pool in place. -Shanti - 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
Re: Thread related MBean questions
On 18/10/2012 14:39, Shanti Suresh wrote: Hi Pid, Thanks for your comments! I would like a representative metric of how many active threads are in Tomcat at a given time. currentBusyThreads may or may not be a good counter because at the time of poll, there is one current operation or none - giving me a value or 1 or 0 consistently. And again, that may just be the case. In the middle of the night, though, I sometimes get a currentBusyThreads=50 value, perhaps due to a spidering of the site or another batch operation on the server. What is DaemonThreadCount=85 please? Which MBean are you reading that on? Is that the current size of the ThreadPool? Tomcat has lots of MBeans and more than one way to create a thread pool. The JVM has threads and can contain multiple thread pools. I looked at our server.xml, and an Executor ThreadPool is not in use for the 8080 and 8443 HTTP connectors. Could that mean that idle threads are not expired properly? So at one point, the thread pool size could have gone up to 85. Yes, as of Tomcat 6.0.x, without an Executor the Connectors will have a pool each, and this will not decrease in size when idle. --server.xml snippet:--- Connector port=8443 clientAuth=false connectionTimeout=6 disableUploadTimeout=true emptySessionPath=true enableLookups=false maxHttpHeaderSize=8192 maxSpareThreads=75 maxThreads=256 minSpareThreads=25 protocol=HTTP/1.1 scheme=https secure=true SSLEnabled=true sslProtocol=TLS URIEncoding=UTF-8 acceptCount=100 SSLCertificateFile=cert.cer SSLCertificateKeyFile=cert_key.key / --end of snippet-- A quick browse on Google showed up the following discussion: http://tomcat.10.n6.nabble.com/Managing-Tomcat-6-threads-How-to-make-tomcat-destroy-threads-when-idle-td2114714.html I might need to change the server.xml to use the executor Thread Pool, I think. Enable the Executor to manage the thread pool size when idle, yes. p Thanks. -Shanti On Wed, Oct 17, 2012 at 9:07 AM, Pid p...@pidster.com wrote: On 16/10/2012 17:52, Shanti Suresh wrote: Greetings. I have some questions on finding the number of active threads in Tomcat. (1) On our QA system, I notice that the currenthreadsBusy MBean is either zero or one for the 8443 and 8080 connectors. ThreadCount != currentThreadsBusy One is the count of threads, one is the threads that are doing work. Why then is ThreadCount = 93 when there is not much going on on QA? Because you've previously done enough work for Tomcat to maintain 93 threads. (2) When I want to graph the thread activity in Tomcat (the thread Pool usage), which is a better counter to look at - currentThreadsBusy or ThreadCount? Depends what you want know. It seems like ThreadCount is what JConsole displays as Live Threads. (3) Why is TotalStartedThreadCount: 264? Is that a cumulative total since Tomcat was restarted? Yes. p --Thread-related MBean snippet:- Name: Catalina:type=ThreadPool,name=http-apr-8443 currentThreadsBusy: 1 ... Name: Catalina:type=ThreadPool,name=http-apr-8080 currentThreadsBusy: 0 ... Name: java.lang:type=Threading DaemonThreadCount: 85 PeakThreadCount: 99 AllThreadIds: Array[long] of length 93 135 119 118 117 ... CurrentThreadCpuTime: 46 CurrentThreadUserTime: 402000 ThreadCount: 93 TotalStartedThreadCount: 264 ThreadCpuTimeSupported: true ... ---end of snippet Thanks! -Shanti -- [key:62590808] -- [key:62590808] signature.asc Description: OpenPGP digital signature
Re: Thread related MBean questions
Hi Pid, Thanks for your comments! I would like a representative metric of how many active threads are in Tomcat at a given time. currentBusyThreads may or may not be a good counter because at the time of poll, there is one current operation or none - giving me a value or 1 or 0 consistently. And again, that may just be the case. In the middle of the night, though, I sometimes get a currentBusyThreads=50 value, perhaps due to a spidering of the site or another batch operation on the server. What is DaemonThreadCount=85 please? Is that the current size of the ThreadPool? I looked at our server.xml, and an Executor ThreadPool is not in use for the 8080 and 8443 HTTP connectors. Could that mean that idle threads are not expired properly? So at one point, the thread pool size could have gone up to 85. --server.xml snippet:--- Connector port=8443 clientAuth=false connectionTimeout=6 disableUploadTimeout=true emptySessionPath=true enableLookups=false maxHttpHeaderSize=8192 maxSpareThreads=75 maxThreads=256 minSpareThreads=25 protocol=HTTP/1.1 scheme=https secure=true SSLEnabled=true sslProtocol=TLS URIEncoding=UTF-8 acceptCount=100 SSLCertificateFile=cert.cer SSLCertificateKeyFile=cert_key.key / --end of snippet-- A quick browse on Google showed up the following discussion: http://tomcat.10.n6.nabble.com/Managing-Tomcat-6-threads-How-to-make-tomcat-destroy-threads-when-idle-td2114714.html I might need to change the server.xml to use the executor Thread Pool, I think. Thanks. -Shanti On Wed, Oct 17, 2012 at 9:07 AM, Pid p...@pidster.com wrote: On 16/10/2012 17:52, Shanti Suresh wrote: Greetings. I have some questions on finding the number of active threads in Tomcat. (1) On our QA system, I notice that the currenthreadsBusy MBean is either zero or one for the 8443 and 8080 connectors. ThreadCount != currentThreadsBusy One is the count of threads, one is the threads that are doing work. Why then is ThreadCount = 93 when there is not much going on on QA? Because you've previously done enough work for Tomcat to maintain 93 threads. (2) When I want to graph the thread activity in Tomcat (the thread Pool usage), which is a better counter to look at - currentThreadsBusy or ThreadCount? Depends what you want know. It seems like ThreadCount is what JConsole displays as Live Threads. (3) Why is TotalStartedThreadCount: 264? Is that a cumulative total since Tomcat was restarted? Yes. p --Thread-related MBean snippet:- Name: Catalina:type=ThreadPool,name=http-apr-8443 currentThreadsBusy: 1 ... Name: Catalina:type=ThreadPool,name=http-apr-8080 currentThreadsBusy: 0 ... Name: java.lang:type=Threading DaemonThreadCount: 85 PeakThreadCount: 99 AllThreadIds: Array[long] of length 93 135 119 118 117 ... CurrentThreadCpuTime: 46 CurrentThreadUserTime: 402000 ThreadCount: 93 TotalStartedThreadCount: 264 ThreadCpuTimeSupported: true ... ---end of snippet Thanks! -Shanti -- [key:62590808]
Re: Thread related MBean questions
On 16/10/2012 17:52, Shanti Suresh wrote: Greetings. I have some questions on finding the number of active threads in Tomcat. (1) On our QA system, I notice that the currenthreadsBusy MBean is either zero or one for the 8443 and 8080 connectors. ThreadCount != currentThreadsBusy One is the count of threads, one is the threads that are doing work. Why then is ThreadCount = 93 when there is not much going on on QA? Because you've previously done enough work for Tomcat to maintain 93 threads. (2) When I want to graph the thread activity in Tomcat (the thread Pool usage), which is a better counter to look at - currentThreadsBusy or ThreadCount? Depends what you want know. It seems like ThreadCount is what JConsole displays as Live Threads. (3) Why is TotalStartedThreadCount: 264? Is that a cumulative total since Tomcat was restarted? Yes. p --Thread-related MBean snippet:- Name: Catalina:type=ThreadPool,name=http-apr-8443 currentThreadsBusy: 1 ... Name: Catalina:type=ThreadPool,name=http-apr-8080 currentThreadsBusy: 0 ... Name: java.lang:type=Threading DaemonThreadCount: 85 PeakThreadCount: 99 AllThreadIds: Array[long] of length 93 135 119 118 117 ... CurrentThreadCpuTime: 46 CurrentThreadUserTime: 402000 ThreadCount: 93 TotalStartedThreadCount: 264 ThreadCpuTimeSupported: true ... ---end of snippet Thanks! -Shanti -- [key:62590808] signature.asc Description: OpenPGP digital signature