Linux Performance Analysis - Understandng vmstat

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
nobody to you Frank today I'm talking about the Endicott so this is part of the series of video about performance analysis of the Linux operating system so performance analysis you know there are activities that you do when you want to understand what is going on in your system or when you want to understand maybe why a particular application which crashing running slowly the system is slow the network or is congested so you want to analyze the system to know what's going on so here instead is actually one of the tool you know in it is one of you know a lot of tools that are out there so and that is what I'll be talking about today so let me start my timer and or let's go to the examiner audience that freaking game start ordinarily and it gives you some output so this output you know captures a lot of things you know that is going on on the system so if I run command on the create tab or it tells me so for example a dispatch report information about processes memory paging glow coyote traps disk CPU activity so you know this captures a lot of all the things you know about about the system under so each of this parameter they have their own unique meaning and we'll be going over the many of these so it is important that you understand you know the importance of each of this parameter or you know from the standpoint of your daily activity and even maybe you need to go for an interview like it has happened to me I went for an interview and I was given this output you know like and I was pulled through explained into the meaning of each parameter so it is important for you you know other maybe a DevOps engineer also suspension engineers performance and junetta you you know understand you know this hot food so it was all go through then home by one so like I said there are ways there are like very common way that you're on the Internet one of them is running games but on early another way is you know you can run it with an interval so for example what this means is interval of two seconds and for count that means I won't for output you know each interval of two seconds so you going to give me four output you know interval of two seconds basically so that I will doing to get an average or in more or average value of you know what's going on actually sustain so I don't know whether you can rhodium status a another come on like this - a so that a you know give information about on active and inactive if you look at the difference you know the above gave information about buffer cache both this gives information about inactive and active so to do that like the three common ways of running the insta so let's go pick start again since totally risco through these parameters and to understand what each of them needs so the first one is are shows you look at the in statistics are a are then you see number four on diet this stands for rank you rock you you know stand for indicates the number of processes that are within the four CPU time they are ready to run you know and they want to take on the CPU so they are waiting for CPU time so that is the meaning of the holiday CD to the PC three now a serial that if you want to both in a high from us environment or in the survivor island if you see is high number if you see high number for how that's you know points to from performance issues or your system so the something that is related to that you know how maybe what is all load average through that bridge also gives an indication of you know the utilization of your CPU if you have very high load average and also very high wrong to use that point truth or some issues is escape so let's go back so the next one I will be talking about is B so B you know also stands for processes are waiting for resources but in this case they are waiting for input from to my computer's pools disk or network so if you have a high number on that B that means maybe you have some performance issues you know with you maybe your disk i/o your network i/o so that does the download that is worth damning so let's keep going the next one is swap so swap a amount of you swap space that is being used so swap space so if you another ways by which you can see saw space if you want three so three we tell you the amount of swap space as being used so right now I'm not using a swap space and you see here so it's reported zero so in a very high performance environment you did you sought to use you ash to actually be zero if you see if you see any uses your swap space in a high performance environment that points through problem so panda are 183 to the food refers to a month of unused memory so good flora being start would be free so this is the unused memory so if we look at this output and compared to the three output you know they are roughly all the same so it refers to the amount of unused of member of one use memory so the next thing is after run this with game - a because to see this output inactive and active so what inactive means is oh so energy means you know recently unused memory that can be reclaimed you know digital ID an application that has run enough it has closed so the memory only one used by the application can be reclaimed so that is inactive so at ease you know is recently used memory hidden may be an application is running it will touch to be Scali memory it has been used recently whoo Bopha is good for her to see papa you see you have to get used to you know this absolute some of them you see it seems that some of them have to run it would be mean that mean start - a almost or prominently not even active so Bopha so that is you know the the buffer cache in wrap - you know buffer you know the Linux operating system users prefer because when you do something if you write something when you write maybe a couple of bite oh it isn't the system to write immediately - maybe the disk it's right you know first to buffer to dusty is basha memory profile a full well the next one is cache to cache is a fish education but to cache with all those cash means to cache is behavioral memory way you know recently used you know big memory or you recently use data object you know because they might reused in a very strong flu that is the cache to the next one you know all on that swap so you can see that the dissolute are broken down into segments first will be named processes the next one was memory now go to swap to swap we see to a solution that swapping swap out that is what that stands for so swap in that is the a bunch of data you know from swap area you know from the swap memory to the lab so swap out is in the data from run through the superior if you see my in case I have a zero for both of them like I said in a very I am performance environment you know this value should actually be zero if you start seeing very high numbers on the swapping swap out you know it points to the fact that maybe you need more memory on that system so also high values of you know swapping swap out you know means you know maybe you need more memory more on the system the next one you know is I Oh hi-ho so this Kyuubi Scully so a blocking block out this is that is what business so block for blocking refers to number of block a second from the block devices oh when number block the block out friend means number bloke in a friendly little devices so if you are holding something like a database if this server know or is running like a database he might see some very high numbers on the looking block out or maybe he sustained that although maybe the first fella he did ADIZ you may see a large number on that the looking block out food in it segmented all the system through the system hunger they cannot be sustained you are something like I think what does I mean I ins control Intel to interrupt that is the number of internal a second so in terms per second oh-hoo you if you have a high number of intervals you know that may also point to maybe add waiting fellow of maybe so all that from from the links article to know what I from so like what it is for example on the AAF there in South is 312 so you can look into the typical proc incorrupt so it's going to give you details or you know the kind of impact that you are having you know very high involving Charles and I also be a kind of senile I be good in a hat I know higher performance environment yeah maybe but so the air times you may not be what you want to body tells you still see the interrupt a second so the next one is context switches so complexity switches you know is the number of times you know the CPU need to move out in move some processes out of the city you are moving that process to basically switching context so this high number of these also my point to you know Mike you know decree do the performance of your system you have the load you know maybe for an application but school application you have a lot of context switches you know that might be something you need to know take care of because context switches are expensive nothing to do from the nation we are with you us us to that us a chalice can show this percentage this is actually like percentage percentage also CPU you know used for you know in the user space as you know the UT Linux system is divided into the user space and the kernel space so the next one is sy which is sustained substantial percentage also a scintilla CPU or percentage of CPU for the same space that is basically kernel space so IB is the next one here ID stands for high the time so like the percentage of time that the CPU is high do so you see here I have it fixed that means my system is actually very high do or my system is this class system is not doing a lot of work so in high performance element you see this might be very low because this appears to in a little walk so they make the last two is is w a which is all the time you know that was lost you know from waiting for imported food also that is tiny used to wait for input/output mini look I know disk IO or Network IO to this last one but you see these on the physical machine most times it was pulling time by virtual machine so if you are running a virtual machine on your system so you see all this time is refers to the tangles paint you know tradition the virtual machine is first what tool in time so yeah that is Hall unknown I hope if you want to lighten understand you can watch this video again so that you basically have a understanding food like I said you know each of these parameter the point to you know how L do on LT system is so for example some of the most important so maybe they want Q if you have very high above around Q yeah maybe a problem for you you have a high number of you know or P block higher so waiting for input/output basically waiting for something yeah let me would be prob'ly if you sort of start seeing a lot of swapping so about yeah so this should point to the overall you know health of your system so and I hope maybe you learn one or two things if you have a comment or question you can put it in the comment section so that you can learn about it so thank you for watching our series in some other videos bye
Info
Channel: dolastack devops
Views: 9,904
Rating: 4.6585364 out of 5
Keywords: vmstat, sysstat, pidstat, linux performance
Id: j-yDDfmtGQc
Channel Id: undefined
Length: 17min 26sec (1046 seconds)
Published: Mon Mar 27 2017
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.