From Newsgroup: rec.music.classical
<div>You are welcome to use the graphics and other metricsprovided by the fastThread tool in your blog post or companyreport by specifying accreditation "Generated by fastthread.io" atthe bottom of the graphics.</div><div></div><div></div><div>I often use Java Thread Dumps for post-mortems and server slowdown analysis. The problem is that the thread dumps are often long, and understanding the concurrency relationship between the threads might be tedious.</div><div></div><div></div><div></div><div></div><div></div><div>Download Thread Dump Analyzer For Mac</div><div></div><div>Download:
https://t.co/VjwpMkdUU7 </div><div></div><div></div><div>But how can we easily derive useful data from the thread dumps to find where the problem is? The server application that I've been working with produces very long thread dumps, because it is an EJB architecture and thread dumps contains many container threads that I'm not sure I should be looking at (i.e. threads that are not running my application code, but JBoss's code).</div><div></div><div></div><div>Yesterday I tried the Thread Dump Analyzer tool. The tool is definitely better than looking at the raw thread dumps in a text editor, because you can filter out threads that you're not interested in, see the thread list, click on a thread to see its details, compare thread dumps to find long running threads, etc.</div><div></div><div></div><div>But there's still too much data to analyse - almost 300 threads. I don't know of any criteria that I could use to filter out all the JBoss threads, in which I'm not interested. I'm not sure if I should be looking at threads that are currently in "runnable" state only or if "waiting on condition" and "in Object.wait" are also important.</div><div></div><div></div><div>This makes it a bit quicker to find the interesting threads amongst the tens or hundreds of JBoss threads which spend most of their time waiting for work at the same place in the code and therefore all have the same stack trace.</div><div></div><div></div><div>The trick is to take 4 or 5 sets of thread dumps at an interval of 5 seconds between each. so at the end you will have a single log file which has around 20 - 25 seconds worth of action on the app server.</div><div></div><div></div><div>What you want to check is when a stuck thread or long running transaction happens, all the thread dumps will show a certain thread id is at the same line in your java stack trace. In simpler terms, the transaction (say in an EJB or database) is spanning across multiple thread dumps and hence needs more investigation.</div><div></div><div></div><div>The latter two are actually the things to look for when diagnosing a deadlock, as you seem to be doing. "Runnable" means the thread is doing something right now (or waiting to get the CPU). "blocked" and "waiting" is what deadlocks are made of.</div><div></div><div></div><div></div><div></div><div></div><div></div><div>Of course, an application container will have plenty of threads waiting legitimately. To filter out the interesting cases, look at the stack trace. If it's framework classes (and especially ones called "Worker" or "Queue") it's probably OK. If it's application code, you should look at it more closely.</div><div></div><div></div><div>The tool is a prerequisite for detecting faulty threads degrading your Java Virtual Machine performance. Issues such as deadlocks, lock contention and excess CPU utilization by individual thread dumps can be resolved by visualizing the states of individual thread dumps. Maximum throughput from the app can be achieved by rectifying the status of each thread provided by the tool.</div><div></div><div></div><div>Thread dumps are primarily used in performance analysis as a lowfrequency, sampling profiler. They are a lightweight and generallynon-intrusive way to get a picture of what the JVM is doing. For moredetails about profilers, see the JavaProfilers chapter. The IBM Java andHotSpot Java troubleshooting sections list all of the ways togenerate thread dumps.</div><div></div><div></div><div>There will be a lot of threads that will be irrelevant in 90% ofcases. Focus on the threads where your application work occurs, such asthe WebContainer thread pool. In this example, all of the threads arewaiting for work (either parked in the WAS BoundedBuffer or in IBM AIOcode waiting for the next event). Remember that only the full stack ismeaningful. In some cases, a parked thread, or a thread waiting inObject.wait may be a problem, so it's best to look methodically throughthe stacks.</div><div></div><div></div><div>Monitor analysis is also important to find Java lock bottlenecks.Click the Monitor Detail or Compare Monitors buttons to explore thehierarchy of blocked threads. Remember that some blocked threads arenormal, such as threads in a thread pool waiting for the next piece ofwork.</div><div></div><div></div><div>On versions of IBM Java I recently started analyzing thread and heap dumps. Was wondering if there are any good tools like Eclipse MAT for Thread Dump analysis. I know fast thread is good but are there any good standalone applications for analyzing thread dumps?</div><div></div><div></div><div>GC Viewer is used for analyzing garbage collection logs ( see Capturing heap dumps before FullGCs to troubleshoot memory problems ). Garbage collection logs can help identify whether performance is impacted by application pause times caused by large memory objects.</div><div></div><div></div><div>Thread Dump Analyzer is used for analyzing thread dump files ( see Troubleshooting Jira performance with Thread dumps ). Each thread dump file can be thought of as a snapshot in time and details the specific JVM threads that were running at the time the thread dump was captured.</div><div></div><div></div><div>In this example we have six thread dump files captured approximately 10 seconds apart with the first three expanded to detail when they were taken. 10 seconds of application time is really long in regards to thread execution time so unless a thread is executing a long-running service or something similar we don't expect to see the same thread running across multiple thread dumps in general.</div><div></div><div></div><div>In a real-world scenario with lots of actively running threads you will want to start looking at the CPU top files first which will depict how much CPU time each thread is using. From there you can find the specific thread in TDA using the Native-ID column.</div><div></div><div></div><div>Eclipse Memory Analyzer Tool ( MAT ) is used for analyzing heap dump files which contain objects in memory. Each heap dump file can be thought of as a snapshot in time and details the memory occupied by specific JVM threads.</div><div></div><div></div><div>Running the Leak Suspects report is a good place to start which will depict the largest objects in the heap dump. Typically a few large objects occupy most of the available JVM memory, causing performance problems.</div><div></div><div></div><div>fastThread is a fine thread dump analyzer, having all the basic features required to analyse a simple as well as a complex thread dump. It is an online open-source tool and can be accessed via URL. Basically, fastThread comes under the analysis tool category and is majorly used for performance engineering to find out the exact root cause of the issue, produced by Java Thread. Software developers or performance engineers use this tool to identify the issue in the thread processing and resolve them (if found). The possible issues have already been discussed in the Thread Dump Analysis topics.</div><div></div><div></div><div>2. Browse and Upload the Thread Dump file. You can upload a maximum of 5 thread dump files at a time. fastThread supports .zip, .gz, .tdump, .txt etc. file formats. It is a good practice to upload a .zip or .gz file to avoid file size issues.</div><div></div><div></div><div>Daemon Thread: Daemon thread is a low-priority thread and runs in the background to perform tasks such as garbage collection etc. A Daemon thread has a number of non-daemon threads and it dies when all the associated non-daemon thread completed their execution or died.</div><div></div><div></div><div>10. In the next section, you can see get the thread count having the same stack trace. The individual bar shows the number of threads with the identical stack. You can also refer to the table beneath this chart to get more details on the stack trace.</div><div></div><div></div><div>Stack Trace is helpful when there is a performance bottleneck in the application then most of the threads start to accumulate on the problematic bottleneck area and form the same stack trace. Thus whenever a significant number of threads exhibit identical/repetitive stack trace then look into the stack trace and do the further investigation.</div><div></div><div></div><div>11. The list of the frequently used method is available in the next section i.e. Most used methods. In case you see, several threads in a thread dump end up working on one single method then it might be of concern. Most of the time, if there is a problem like a poorly responding data source, un-relinquished lock, infinite looping threads etc. then a significant number of threads end up in one single method. That particular method has to be analyzed in detail.</div><div></div><div></div><div>13. The Blocked thread can be identified by a Transitive Graph. Refer to Figure 13, you can understand how pool-1-thread-1 blocked the pool-1-thread-2 and pool-1-thread-3 threads. The blocked threads make the application unresponsive, so proper diagnosis should be carried out for root cause analysis.</div><div></div><div></div><div>16. The importance of Finalizer Thread in the GC can be ignored. Because after the execution of finalize() method, the object becomes eligible for Garbage Collection. The poor implementation of finalize() method can block the Finalizer thread which may have a severe detrimental cascading effect on the JVM.</div><div></div><div></div><div>fastThread is a very useful online tool to analyse the thread dump and shows a detailed picture of each thread. With a single click, you can find out the existing issue and highlight to the client or development team. I would say all the performance testers or engineers can enhance their knowledge about Thread Dump and its analysis using the fastThread tool.</div><div></div><div></div><div>Find runnable threads that are part of the application, for example, background job threads or request threads (request threads have names like this - 127.0.0.1 1347028187737 GET /content/sites/global/en/sitemap.static-delivery.httpd.html HTTP/1.1).</div><div></div><div> dd2b598166</div>
--- Synchronet 3.21a-Linux NewsLink 1.2