Visit the Performance Engineering and Tuning course recordings page
WEBVTT
-->
Who's is this one, this is yours.
-->
Yes.
-->
This one.
-->
Okay, so you unnumber, which one was the issue?
-->
If you do it from your machine, we'll be able to see whatever you're doing there.
-->
Yeah, the rest won't make sense.
-->
Then you don't create an index.
-->
Okay.
-->
It didn't work.
-->
Yeah.
-->
Let me quickly try it and see what's happening.
-->
Hold on, hold on.
-->
Okay, you can continue.
-->
I wanted to get off that screen.
-->
Okay, it is advanced SQL, correct?
-->
Let's see if that...
-->
Okay, cool.
-->
Okay.
-->
Okay, I think we can eat wireless to install this stuff, or it's going to take a bit
-->
of some minutes to install.
-->
Okay.
-->
Let's see if that works.
-->
Okay.
-->
Let's see if that works.
-->
Let's see if that works.
-->
Okay.
-->
Let's see if that works.
-->
Let's see if that works.
-->
Let's see if that works.
-->
Let's see if that works.
-->
Let's see if that works.
-->
Let's see if that works.
-->
Let's see if that works.
-->
Let's see if that works.
-->
Let's see if that works.
-->
Let's see if that works.
-->
Let's see if that works.
-->
Let's see if that works.
-->
right? And with hardware monitoring, you've got components like your CPU, your memory, your disk,
-->
your network, you know, but also you can have things like your temperature, you know,
-->
that you probably need to monitor. Most companies usually leave that to the data center guys
-->
to do the monitoring, you know, but they don't realize that sometimes the temperature
-->
of a server can actually cause issues. That's just an example. So with Windows,
-->
you've got what you call performance monitor or perfmon, which more or less
-->
takes, collects the real time data and some live data about the system performance at that time,
-->
some data logging, and then customizable counters. So you can customize the counters
-->
like your CPU usage, memory usage, descriptivity, network activity, and also you can set up
-->
thresholds out there. Well, the below part is just how to have it up and running.
-->
I wouldn't go through that. And then, as I said, some of the counters, CPU usage,
-->
memory usage, disk IO, network activity, right? And
-->
more or less, those are the things that you'd monitor in any basic, as a basic,
-->
you know, and then in Linux, you've got what you call a NIDOS monitor.
-->
A NIDOS monitor, we just developed by IBM. So one, it does the real time process,
-->
resource monitoring, right? Which is like live monitoring. And then some geographical,
-->
graphical and textual outputs, right? So you choose what you want. You want either graphic
-->
or textual output. It also can generate logs that you can use later on. And then it does
-->
a multiple system resource monitoring, which is more or less the same things. But when it comes
-->
to this one in Linux, it also includes system processes, right? But more or less,
-->
you can interact with the different resources that you want to monitor, like your CPU,
-->
your memory, your disk, your processes, you know, when you're running to be able to have
-->
the option of, you know, just the disk, for example, you want to monitor the disk,
-->
so it will show you statistics of just the disk, right? But also you can log and then
-->
log everything to a file, right? Or to, you send it to a file for further analysis,
-->
maybe later on, you know, and you can actually give it for how many times should it do it,
-->
how many times should it run, how many times should it log. So for example,
-->
they, on that red command, it's saying log data every 60 seconds for 720 intervals,
-->
which means it's 12 hours. So every 60 seconds, every one minute, it has to log information
-->
onto it, you know, and the common metrics that obviously will be monitored, the normal ones,
-->
your CPU, your memory, your disk, or your network, right? Which obviously then helps you
-->
to be able to see what could be happening exactly, right? So your default output,
-->
for example, if you press C for CPU, right, you get the percentage of time the CPU spends
-->
on a user process, and you get the percentage of CPU time spent on system or kernel processes,
-->
right? You also have things like your waiting, what time the CPU spends waiting for I.O.
-->
operations, like accessing the disk, for example, or the network. It will show you that,
-->
or some idle, not executing any process, it will also show you that time. Also this time
-->
the CPU spends handling hardware interrupts, and sometimes it's sometimes spent on software
-->
interrupts. So it sort of gives you a whole lot of times that are happening, which you can be
-->
able to use to determine what could be happening, you know? Time the CPU spends on tasks not
-->
visible to the host OS, you know, maybe due to virtualization or something like that,
-->
you know? So those are some of the stuff that you can be able to see. But when you see
-->
high percentages in places like wait time, right, for I.O. operations, wait time for
-->
system or kernel processes, you know, you should worry about it because then there's something
-->
that's holding it. It should be quick. Those operations should be quick. It shouldn't take
-->
time, you know? And then when you look at memory, you look at the total amount of memory
-->
in the system, and then you look at the used, the amount of memory currently in use, the free
-->
memory, and then the shared memory between processes, you know, especially when they're
-->
used by shared libraries, and then your buffers, memory used to block I.O. caching,
-->
memory used by cache itself for storing frequently accessed files, right? Remember the
-->
in-memory cache? And then swap space used. It also shows you that, which would then help
-->
you to look at what is it that you can change. Then you also have VM start. When you have
-->
a virtualized environment especially, VM start, you monitor your virtual memory statistics,
-->
your CPU activity, your disk I.O. paging and processing. Did your colleagues come?
-->
Or is it?
-->
Did you catch a bug?
-->
And the tooth is not the, it's not the best. The other week when your colleagues were here,
-->
I had to get a tooth taken out. So I took it out the Friday. They were coming over the
-->
weekend, right? I took it out the Friday. But when they took it out, they didn't know
-->
that there's some pieces that were left inside. So I would come in, I came in Monday,
-->
Tuesday, Wednesday, and it was so painful. Like it didn't make sense. I would survive
-->
on painkillers. I had to go back and so that they clean, you know, because it
-->
wasn't healing even if I was on antibiotics, but still it wasn't healing. So they had to
-->
go back and actually clean it, but now it's better. I took this, tooth is very painful.
-->
I had Tramadol. Tramadol. Yes, Tramadol. Yes, they gave me Tramadol. I can always
-->
drink one tomorrow, one thing. It's a very, it's a, it's a, it's a very powerful painkiller.
-->
Yeah. But also it can, it can cause drowsiness. So he's going to sleep.
-->
Yeah. And after are they going to come? Are they going to come here? Oh, they only
-->
leave him from, okay. Okay. But Tramadol, Tramadol is a good one. And the only other
-->
issues, he might not get it over the counter, but for over the counter, you can look for one
-->
that's good. You can buy grandpa. It's called grandpa. Yes, grandpa. Yeah. You can even get
-->
it at a, at a garage. It's a, it's a very good painkiller. Like it's, it's very good. We,
-->
we usually, we use it a lot when we are hungover because it takes care of the headache,
-->
takes care of the pains. But for now, until he gets home to get it removed, if he's
-->
getting it removed, he can buy grandpa. It usually subsides in a few minutes.
-->
Yeah. All right. Cool. So then with, with VM start, you get your,
-->
things like your CPU activity for your virtual machine, your IO, your paging, you know,
-->
and you get real time, obviously performance, historical data, you can track back over time
-->
um, by running VM stats and intervals. So like three minutes or five minutes, you need to
-->
log every one minute or something, you know, um, you can be able to do that. And then
-->
the output of VM stats, usually it's prox, which is the processes, um, waiting for memory
-->
in the running state. And then information about the physical memory usage, right. Uh,
-->
include free memory, subspace and buffers, and then swap information about swap your
-->
disk IO, your number of interrupts and contact switches, and then your CPU usage.
-->
Uh, that, that example is not as clear as I've wanted it, but on the exercise,
-->
you should be able to see it right. And just some explanation on the columns for VM
-->
stats. So your prox, your processes, um, where it says R is the number of processes waiting
-->
for time run for runtime, right, ready to run. And then where it's B, it's an, um,
-->
number of processes, an uninterruptible slip. They are waiting for IO, right.
-->
When you get to the memory section, there's, there's your swap, there's your free,
-->
there's your buffer, there's your cache, of which I think we are familiar with it.
-->
And then the swap, we've got the SI, which is the memory swapped in from disk and SO memory
-->
swapped out of disk. And then you've got the IO. So number of blocks received from a block
-->
device, which is the reads and number of blocks sent to a block device, which is the writes.
-->
And then we've got the system where you've got number of interrupts per second. Um,
-->
and then context, number of context switches per second. And then your CPU obviously has
-->
all those, all that information, CPU time spent in user space, system space is spent idle.
-->
You know, most of these tools more or less talk about the same thing. If you look at it,
-->
you know, they more or less talk about the same thing. The common metrics you monitor
-->
in, um, using VM stats, your memory, your CPU, your IO, your processes, you know,
-->
that's, that's more or less it. I think with, with, um, with,
-->
with these tools, it depends which one works for you.