Thread Dump Analysis Fundamentals - Part 2

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello everyone this is the part 2 or jvm term analysis fundamentals so what we're going to be seeing next essentially is the troubleshooting analysis goals okay so we'll do a quick overview of such goals and and then we'll start to have a look at a tread um that overview so for that we'll take a small sample of a tread dump that we'll review quickly together before we jump to our next session okay so that's our the goals so first first question you may want to ask yourself or even more experienced developers or support engineer essentially why do you need to learn how to retread them stop so try it I think it's a fairly good question because that task can be a bit complex at the at first so I listed a few goals right that will help well first of all this is many to identify the application and Java concurrency problems right basically you do an assessment at the treads level of course not you may want to identify the root cause a performance related problem so I tread them is all about getting the deep performance stability availability these are the in these type of context I will start truly doing deep dive into that the data of course you could be looking at the tread them for different goals your application could be functioning probably but you may want expose the primary response time contributors or performance bottlenecks right because for example if an application requests let's say it's taking 15 seconds right to fetch some data from a database so obviously that slow down behavior will show up in a tread dump right so you will see which code what Java code is a culprit including the stack raise and everything with the which interface to the database right so though definitely performance bottlenecks and contributors will show up in their tread down now the more advanced goals also will include for example an assessment of the impact of the JVM past time right on application threads again if you have JVM problems these symptoms will show up also net red thumbs right because the JVM or past time will also trigger some Shred suspension right at a JVM level and overall the tread them will help with your knowledge significant improve your knowledge and Orsi skills obviously because I want you able to master that skill pretty much will help effort everything else right because it's forcing you to learn quite deep the internals of the JVM and also middleware technologies and more insight into the troubleshooting well and of course much more as we will see in the more advanced course with the problem patterns you will see you can definitely identify much more problems than then you think by having a techniques that shred them alone and especially when you combine it with other tools including APM technologies ok so now what we're going to do next is have a look at a very short overview of at read them simple so I don't want to start too fast so we'll just start to do a quick brief overview so what you see here essentially just the raw data of a simple trade damn right that was captured on the hotspot JVM so that the keyword that you always see here right full tread down Java hotspot so that snapshot is applicable for the Oracle hotspot not IBM right g9 which has a separate format I will see later ok so shred them at the end of the day it's it's it's pretty much right a snapshot of all the data the actual trails right so if we scroll down you'll see essentially you see multiple stack trees of all the active or the created treads right in their JVM and you can see some time depending on the size of the application if you have just a few and some for large enterprise application depending if it was captured during a problem you will see quite a few trees like sometimes hundreds or even thousands of Java threads right so basically the first portion is always the listing of all these threads and at the very end you will get also more native trees like the garbage collection threads depending on the policy that you're using and also the the hotspot format starting with jdk 1.6 plus you also get the utilization the Java heap at that time which I found extremely useful right that you get the data in the in the single view because again remember right by from our goals can assess the health of the JVM just quickly the utilization and see from the JVM is in good shape or not at the time of tread down generation ok so going back as I said nothing to be concerned about so we keep it simple for now so listing of all the treads native trails at the bottom and then keep usage which will sit together ok that's essentially a bit of word run on each of the treads is that essentially for each of the treads you will get the same type of information right for hotspots so typically you'll get the tread name ok like in this example that sample was taken to a GDQ 1.6 environment using our call WebLogic ok the actual WI product so that's why you will see it really depends the middleware so we'll see that more in profile when we have a look at multiple snapshot between multiple so we'll cover that in future sessions right the differences between format let's see if you take try them from Apache Tomcat versus G bus or circle robotics so we'll cover quite a few Joey containers we can help help you differentiate the pattern this one just to keep in mind this is using our record logic so that's why you will see separate red pool name pattern depending on which the servlet Java container or service engine technology that your application is using or of course if you're just taking shredder from a standalone java application well you won't see it probably just a few treads like in this case you may just see a main thread right from your main Java class where you will see your application code showing up here right so that being said as I mentioned to get a tread name here and you get the information on native and we'll get back to this but most importantly get the stack trace right that's the key value of the tread dump the stack trace is a essentially write the runtime execution right snapchat or stock where the tread is at that point right so this is the key piece of information because essentially if you're having trouble with response time or the server's unresponsive then the stack trace will tell you where the treads what the treads are doing right already waiting for some resources are you waiting to acquire a lock right which will be in this case lock contention or they just for some reason they seem suspended right and not doing anything which again could be symptom of a garbage collection problem so you see the trailer will definitely give you a lot of feedback right and potential symptoms should be so as you're gaining experience to be able to differentiate between symptom and source of the problems so that's that's what we'll learn in the the advanced training so right now one as I said we won't start to go too fast with that so just keep that in mind for now try names on the information then you get the actual stack trace which is the key data itself and then after that we'll start to the analysis so I'll I'll dedicate a separate session and just to show you hi analyze the data and some tips and tricks so you can quickly filter out the data and and don't lose too much time because at the end buddy I mean if you go one by one and can get lost and can probably spend an hour without even knowing okay all these are doing something but how how can I know what they're doing complexity will come if the the problem is showing outside your application code so now that it's forcing you to course some knowledge of a Java container so we'll get back to that to this right like in this example right if we do a quick exam actual treads right there's no it's it just strength acquire a lock from Allah on the logger right so and again this type of issue can be quite confusing because they are showing up outside of your application code and these are the type of patterns that will view together how we strategies and how to progress with the analysis for these more complex scenarios okay so just give that a mess and all that overview of a sample and we'll get back so the next session which is part three will focus injury on the fundamentals on how to get the tread down itself different technique so we'll use different OS different tools to achieve that so this is what I'm going to show you because first you need to understand how to generate the tread them and also best practices around it so not just getting a tread them when things or healthy ones that he give you a lot of that so you need to be very strategic about how you want to capture the data and and that's why I'll dedicate the poetry to do the technique generation and also strategy around which narrow you want to generate the data okay all right thank you so I hope you enjoyed this short tutorial today and we'll get back with the poetry
Info
Channel: Pierre-Hugues Charbonneau
Views: 19,952
Rating: undefined out of 5
Keywords: Java (Programming Language), Java Virtual Machine (Video Game Platform), Java Monitoring, JVM, Java, Java EE, Performance, Thread, Thread Dump, Programming Language (Software Genre)
Id: H34ZEkrJV1k
Channel Id: undefined
Length: 9min 27sec (567 seconds)
Published: Fri Aug 07 2015
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.