3 videos 📅 2024-12-02 09:00:00 Africa/Blantyre
23:13
2024-12-04 09:19:26
1:05
2024-12-06 12:27:03
5:07
2024-12-06 12:31:46

Visit the Performance Engineering and Tuning course recordings page

                WEBVTT

00:00:17.860 --> 00:00:21.120
Who's is this one, this is yours.

00:00:23.280 --> 00:00:23.520
Yes.

00:00:24.720 --> 00:00:25.180
This one.

00:00:26.800 --> 00:00:30.680
Okay, so you unnumber, which one was the issue?

00:00:32.300 --> 00:00:36.220
If you do it from your machine, we'll be able to see whatever you're doing there.

00:01:00.120 --> 00:01:04.700
Yeah, the rest won't make sense.

00:01:07.560 --> 00:01:11.440
Then you don't create an index.

00:01:23.360 --> 00:01:24.760
Okay.

00:01:46.460 --> 00:01:49.260
It didn't work.

00:01:51.980 --> 00:01:53.140
Yeah.

00:01:56.520 --> 00:02:01.080
Let me quickly try it and see what's happening.

00:02:07.620 --> 00:02:10.520
Hold on, hold on.

00:02:12.700 --> 00:02:14.040
Okay, you can continue.

00:02:14.280 --> 00:02:16.760
I wanted to get off that screen.

00:02:26.900 --> 00:02:31.480
Okay, it is advanced SQL, correct?

00:02:34.520 --> 00:02:36.540
Let's see if that...

00:02:36.540 --> 00:02:37.120
Okay, cool.

00:03:15.180 --> 00:03:16.580
Okay.

00:03:19.420 --> 00:03:40.040
Okay, I think we can eat wireless to install this stuff, or it's going to take a bit

00:03:40.040 --> 00:03:41.580
of some minutes to install.

00:04:23.840 --> 00:04:25.240
Okay.

00:04:54.520 --> 00:04:55.000
Let's see if that works.

00:05:12.300 --> 00:05:13.700
Okay.

00:05:41.820 --> 00:05:43.620
Let's see if that works.

00:06:12.920 --> 00:06:13.360
Let's see if that works.

00:06:27.060 --> 00:06:28.460
Okay.

00:06:57.720 --> 00:06:58.260
Let's see if that works.

00:07:27.380 --> 00:07:28.060
Let's see if that works.

00:07:57.320 --> 00:07:57.840
Let's see if that works.

00:08:26.840 --> 00:08:27.820
Let's see if that works.

00:08:55.940 --> 00:08:57.800
Let's see if that works.

00:09:25.880 --> 00:09:27.620
Let's see if that works.

00:09:41.140 --> 00:09:57.600
Let's see if that works.

00:10:26.840 --> 00:10:27.400
Let's see if that works.

00:10:56.680 --> 00:10:57.540
Let's see if that works.

00:11:26.820 --> 00:11:27.360
Let's see if that works.

00:11:52.460 --> 00:11:57.340
Let's see if that works.

00:12:02.340 --> 00:12:04.100
Let's see if that works.

00:12:04.100 --> 00:12:09.320
right? And with hardware monitoring, you've got components like your CPU, your memory, your disk,

00:12:09.440 --> 00:12:15.760
your network, you know, but also you can have things like your temperature, you know,

00:12:16.100 --> 00:12:22.020
that you probably need to monitor. Most companies usually leave that to the data center guys

00:12:22.020 --> 00:12:27.160
to do the monitoring, you know, but they don't realize that sometimes the temperature

00:12:27.160 --> 00:12:33.660
of a server can actually cause issues. That's just an example. So with Windows,

00:12:33.660 --> 00:12:38.540
you've got what you call performance monitor or perfmon, which more or less

00:12:39.820 --> 00:12:47.360
takes, collects the real time data and some live data about the system performance at that time,

00:12:47.800 --> 00:12:52.920
some data logging, and then customizable counters. So you can customize the counters

00:12:53.500 --> 00:13:00.460
like your CPU usage, memory usage, descriptivity, network activity, and also you can set up

00:13:02.420 --> 00:13:08.500
thresholds out there. Well, the below part is just how to have it up and running.

00:13:08.960 --> 00:13:16.420
I wouldn't go through that. And then, as I said, some of the counters, CPU usage,

00:13:18.280 --> 00:13:25.080
memory usage, disk IO, network activity, right? And

00:13:26.220 --> 00:13:30.400
more or less, those are the things that you'd monitor in any basic, as a basic,

00:13:30.740 --> 00:13:36.340
you know, and then in Linux, you've got what you call a NIDOS monitor.

00:13:37.300 --> 00:13:43.540
A NIDOS monitor, we just developed by IBM. So one, it does the real time process,

00:13:44.040 --> 00:13:50.840
resource monitoring, right? Which is like live monitoring. And then some geographical,

00:13:52.320 --> 00:13:57.620
graphical and textual outputs, right? So you choose what you want. You want either graphic

00:13:57.620 --> 00:14:05.660
or textual output. It also can generate logs that you can use later on. And then it does

00:14:05.660 --> 00:14:10.980
a multiple system resource monitoring, which is more or less the same things. But when it comes

00:14:10.980 --> 00:14:16.780
to this one in Linux, it also includes system processes, right? But more or less,

00:14:16.780 --> 00:14:21.880
you can interact with the different resources that you want to monitor, like your CPU,

00:14:22.580 --> 00:14:26.560
your memory, your disk, your processes, you know, when you're running to be able to have

00:14:26.560 --> 00:14:31.160
the option of, you know, just the disk, for example, you want to monitor the disk,

00:14:31.220 --> 00:14:36.300
so it will show you statistics of just the disk, right? But also you can log and then

00:14:38.240 --> 00:14:46.240
log everything to a file, right? Or to, you send it to a file for further analysis,

00:14:46.240 --> 00:14:51.600
maybe later on, you know, and you can actually give it for how many times should it do it,

00:14:52.500 --> 00:14:56.580
how many times should it run, how many times should it log. So for example,

00:14:56.920 --> 00:15:03.640
they, on that red command, it's saying log data every 60 seconds for 720 intervals,

00:15:03.780 --> 00:15:09.020
which means it's 12 hours. So every 60 seconds, every one minute, it has to log information

00:15:09.020 --> 00:15:14.680
onto it, you know, and the common metrics that obviously will be monitored, the normal ones,

00:15:14.680 --> 00:15:21.680
your CPU, your memory, your disk, or your network, right? Which obviously then helps you

00:15:21.680 --> 00:15:28.100
to be able to see what could be happening exactly, right? So your default output,

00:15:28.360 --> 00:15:33.860
for example, if you press C for CPU, right, you get the percentage of time the CPU spends

00:15:33.860 --> 00:15:40.680
on a user process, and you get the percentage of CPU time spent on system or kernel processes,

00:15:40.680 --> 00:15:47.920
right? You also have things like your waiting, what time the CPU spends waiting for I.O.

00:15:47.940 --> 00:15:54.880
operations, like accessing the disk, for example, or the network. It will show you that,

00:15:54.940 --> 00:16:01.300
or some idle, not executing any process, it will also show you that time. Also this time

00:16:01.300 --> 00:16:08.680
the CPU spends handling hardware interrupts, and sometimes it's sometimes spent on software

00:16:08.680 --> 00:16:14.700
interrupts. So it sort of gives you a whole lot of times that are happening, which you can be

00:16:14.700 --> 00:16:23.580
able to use to determine what could be happening, you know? Time the CPU spends on tasks not

00:16:23.580 --> 00:16:29.420
visible to the host OS, you know, maybe due to virtualization or something like that,

00:16:29.420 --> 00:16:35.500
you know? So those are some of the stuff that you can be able to see. But when you see

00:16:35.500 --> 00:16:44.860
high percentages in places like wait time, right, for I.O. operations, wait time for

00:16:45.760 --> 00:16:50.040
system or kernel processes, you know, you should worry about it because then there's something

00:16:50.040 --> 00:16:54.200
that's holding it. It should be quick. Those operations should be quick. It shouldn't take

00:16:54.200 --> 00:16:59.220
time, you know? And then when you look at memory, you look at the total amount of memory

00:16:59.220 --> 00:17:04.680
in the system, and then you look at the used, the amount of memory currently in use, the free

00:17:04.680 --> 00:17:09.460
memory, and then the shared memory between processes, you know, especially when they're

00:17:09.460 --> 00:17:17.800
used by shared libraries, and then your buffers, memory used to block I.O. caching,

00:17:19.160 --> 00:17:24.100
memory used by cache itself for storing frequently accessed files, right? Remember the

00:17:24.100 --> 00:17:30.180
in-memory cache? And then swap space used. It also shows you that, which would then help

00:17:30.180 --> 00:17:36.140
you to look at what is it that you can change. Then you also have VM start. When you have

00:17:36.140 --> 00:17:46.020
a virtualized environment especially, VM start, you monitor your virtual memory statistics,

00:17:46.180 --> 00:17:53.360
your CPU activity, your disk I.O. paging and processing. Did your colleagues come?

00:17:53.360 --> 00:17:55.980
Or is it?

00:18:01.660 --> 00:18:03.120
Did you catch a bug?

00:18:09.320 --> 00:18:14.360
And the tooth is not the, it's not the best. The other week when your colleagues were here,

00:18:14.360 --> 00:18:20.200
I had to get a tooth taken out. So I took it out the Friday. They were coming over the

00:18:20.200 --> 00:18:24.920
weekend, right? I took it out the Friday. But when they took it out, they didn't know

00:18:24.920 --> 00:18:29.620
that there's some pieces that were left inside. So I would come in, I came in Monday,

00:18:29.820 --> 00:18:34.040
Tuesday, Wednesday, and it was so painful. Like it didn't make sense. I would survive

00:18:34.040 --> 00:18:39.180
on painkillers. I had to go back and so that they clean, you know, because it

00:18:39.180 --> 00:18:45.880
wasn't healing even if I was on antibiotics, but still it wasn't healing. So they had to

00:18:45.880 --> 00:18:50.880
go back and actually clean it, but now it's better. I took this, tooth is very painful.

00:18:55.520 --> 00:19:04.720
I had Tramadol. Tramadol. Yes, Tramadol. Yes, they gave me Tramadol. I can always

00:19:04.720 --> 00:19:14.260
drink one tomorrow, one thing. It's a very, it's a, it's a, it's a very powerful painkiller.

00:19:14.420 --> 00:19:20.780
Yeah. But also it can, it can cause drowsiness. So he's going to sleep.

00:19:21.160 --> 00:19:30.800
Yeah. And after are they going to come? Are they going to come here? Oh, they only

00:19:30.800 --> 00:19:44.120
leave him from, okay. Okay. But Tramadol, Tramadol is a good one. And the only other

00:19:44.120 --> 00:19:48.940
issues, he might not get it over the counter, but for over the counter, you can look for one

00:19:48.940 --> 00:19:56.280
that's good. You can buy grandpa. It's called grandpa. Yes, grandpa. Yeah. You can even get

00:19:56.280 --> 00:20:04.600
it at a, at a garage. It's a, it's a very good painkiller. Like it's, it's very good. We,

00:20:04.600 --> 00:20:09.720
we usually, we use it a lot when we are hungover because it takes care of the headache,

00:20:10.040 --> 00:20:16.420
takes care of the pains. But for now, until he gets home to get it removed, if he's

00:20:16.420 --> 00:20:20.760
getting it removed, he can buy grandpa. It usually subsides in a few minutes.

00:20:22.520 --> 00:20:28.540
Yeah. All right. Cool. So then with, with VM start, you get your,

00:20:30.020 --> 00:20:36.540
things like your CPU activity for your virtual machine, your IO, your paging, you know,

00:20:37.520 --> 00:20:46.060
and you get real time, obviously performance, historical data, you can track back over time

00:20:46.390 --> 00:20:54.330
um, by running VM stats and intervals. So like three minutes or five minutes, you need to

00:20:54.330 --> 00:21:01.350
log every one minute or something, you know, um, you can be able to do that. And then

00:21:01.350 --> 00:21:07.310
the output of VM stats, usually it's prox, which is the processes, um, waiting for memory

00:21:07.310 --> 00:21:14.830
in the running state. And then information about the physical memory usage, right. Uh,

00:21:14.830 --> 00:21:22.430
include free memory, subspace and buffers, and then swap information about swap your

00:21:22.430 --> 00:21:29.090
disk IO, your number of interrupts and contact switches, and then your CPU usage.

00:21:30.270 --> 00:21:35.130
Uh, that, that example is not as clear as I've wanted it, but on the exercise,

00:21:35.290 --> 00:21:41.250
you should be able to see it right. And just some explanation on the columns for VM

00:21:41.250 --> 00:21:47.770
stats. So your prox, your processes, um, where it says R is the number of processes waiting

00:21:47.770 --> 00:21:55.010
for time run for runtime, right, ready to run. And then where it's B, it's an, um,

00:21:55.130 --> 00:21:59.530
number of processes, an uninterruptible slip. They are waiting for IO, right.

00:21:59.790 --> 00:22:03.510
When you get to the memory section, there's, there's your swap, there's your free,

00:22:03.590 --> 00:22:07.570
there's your buffer, there's your cache, of which I think we are familiar with it.

00:22:07.570 --> 00:22:14.750
And then the swap, we've got the SI, which is the memory swapped in from disk and SO memory

00:22:14.750 --> 00:22:19.890
swapped out of disk. And then you've got the IO. So number of blocks received from a block

00:22:19.890 --> 00:22:25.670
device, which is the reads and number of blocks sent to a block device, which is the writes.

00:22:26.490 --> 00:22:32.070
And then we've got the system where you've got number of interrupts per second. Um,

00:22:32.210 --> 00:22:36.710
and then context, number of context switches per second. And then your CPU obviously has

00:22:36.710 --> 00:22:44.550
all those, all that information, CPU time spent in user space, system space is spent idle.

00:22:45.290 --> 00:22:49.230
You know, most of these tools more or less talk about the same thing. If you look at it,

00:22:49.890 --> 00:22:54.370
you know, they more or less talk about the same thing. The common metrics you monitor

00:22:54.370 --> 00:23:01.270
in, um, using VM stats, your memory, your CPU, your IO, your processes, you know,

00:23:01.270 --> 00:23:08.630
that's, that's more or less it. I think with, with, um, with,

00:23:10.650 --> 00:23:13.290
with these tools, it depends which one works for you.