Lab 16 - Creating CPU Contentions
Video Activity
Creating CPU Contentions This lab focuses on resource pools. In this lab-based class, participants will receive step by step instructions in the following: Creating artificial CPU traffic Creating resource pools for tests and production Participants will get to see how these things work when a lot of CPU activity is being generated on a system.
Join over 3 million cybersecurity professionals advancing their career
Sign up with
Required fields are marked with an *
or
Already have an account? Sign In »

Video Description
Creating CPU Contentions This lab focuses on resource pools. In this lab-based class, participants will receive step by step instructions in the following:
-
Creating artificial CPU traffic
-
Creating resource pools for tests and production
Participants will get to see how these things work when a lot of CPU activity is being generated on a system.
Video Transcription
00:04
Hello and welcome to lab number 16.
00:07
And this lab, we believe, will be working with resource pools.
00:12
So we'll be creating some
00:15
artificial CPU traffic
00:18
and
00:19
creating a couple of resource pools, one for test, one for production
00:23
and see how those actually work
00:25
when we're generating a lot of
00:29
CPU activity on a system.
00:35
So let's let's get connected to our environment.
00:41
Log in as administrator.
00:52
Well, it was correct. Okay, just took a little moment there.
00:56
All right, So
00:57
I have
00:59
to virtual machines, which I've powered up for doing this lab,
01:03
my window seven
01:04
VM and
01:07
the clone that we made in an earlier lab.
01:11
So let's go ahead and open a console
01:15
for the Windows seven machine
01:17
and open one for
01:19
clone as well.
01:27
Okay. And you'll notice
01:32
that the both of these machines have a
01:36
program called CPU busier
01:38
on the desktop
01:40
so you can download this yourself. It's a free tool.
01:44
There's another choice. Would be
01:47
CPU busy dot VBS was a visual basic
01:49
scrip,
01:52
but I like this tool better. So we're gonna use this one,
01:56
and what we're going to do is right. Click.
02:00
You have to make sure that you
02:01
running as an administrator,
02:05
and the slider along the bottom here
02:07
actually controls
02:09
homered. CPU activity
02:12
gets gets created, the further to the right that you push the slider,
02:15
the more events will will happen every every second.
02:23
So it starts to list
02:23
how many
02:25
CPU events
02:28
it did and how long each one took.
02:30
We'll keep the slider in the middle. That's good enough for our purposes.
02:35
Go ahead, run the
02:37
same tool on the cloning machine.
02:39
It's taking a moment to come up.
02:43
This tool will just run until we until we manually stop it.
02:47
So if you're doing a lab like this, make sure that you remember to shut tool down when you're done. Otherwise you'll
02:53
have performance problems in your environment.
02:57
Okay, so both of these are running. So now what we can do is go back to our
03:01
host.
03:04
Yeah, we can
03:05
click performance.
03:13
You might notice that your CPU usage for the host
03:16
uh,
03:17
we'll be going up, as we would expect
03:22
by looking at the host, isn't giving us a whole lot of information? What way? Be better off doing? Is looking at
03:30
the performance of the V EMS themselves
03:32
so we can do that a couple different ways. One thing we can do
03:37
is to select the virtual machines tab,
03:40
and I can see that
03:44
Win seven and 17 clone,
03:46
both
03:47
demonstrating a large amount of CPU activity right now,
03:53
90% memory being used on the clone.
03:57
And we're at 58%
03:59
for
04:00
for the window, 7 p.m.
04:03
But let's look at this window. Seven vm specifically,
04:09
it's taking a few moments for
04:11
performance. Have to come up because the VM is actually very busy with
04:15
with that tool running.
04:18
Also select the same tab for
04:23
for my clone.
04:25
That's interesting.
04:27
Here we go.
04:30
And as you can see on the clone machine, the CPU level started around
04:34
12% and it's it's jumped up quite a bit.
04:40
We'll set this to real time, so it refreshes every 20 seconds.
04:43
That way we can
04:44
track
04:45
the fact that we have a lot of
04:47
CPU activity on both of these V m.
04:50
Let's go back to this
04:53
window. Seven. Have a look at it
05:00
clicking the refresh button.
05:03
And as you can see, I'm pretty much maxing out my CPU on this window. Seven v m.
05:10
I should see something very similar for
05:14
the clone,
05:15
and you can see that it's maxed out 100% as well.
05:18
Okay, so we know that our script is working.
05:21
That's that's the 1st 1st thing to get done.
05:26
Okay, Our next task
05:28
is too.
05:30
Create the resource pools.
05:33
So we can do is go to our host,
05:36
right click
05:39
and select new resource pool. Or, if you like, the shortcut, you can use control. Oh,
05:46
so this one we will call test
05:50
and for the CPU resource is
05:55
we will go ahead and pick the low range.
06:00
You'll notice that this number of shares increases as you select
06:05
the different choices.
06:06
Low gives us 2000 shares,
06:11
and that's the only thing that we're going to adjust. We're not going thio putting restrictions on memory.
06:15
So we'll go ahead and click okay there
06:17
And you know is that resource pool now shows up
06:23
and then we'll create a second resource pool.
06:28
This one will be called
06:30
production
06:31
and the shares for CPU usage and production Will. We'll let that go all the way up to the high level.
06:42
All right, so we have our two resource pools created.
06:47
Okay,
06:53
Okay. So we could We could right click
06:56
the
06:58
resource pools
07:00
to edit their settings if you wanted to change anything that you've already created,
07:03
or you can select the resource pool
07:06
and click the summary tab.
07:14
Okay. I've got some kind of warning about my certificate.
07:19
I'm going to just ignore that for right now.
07:25
So the resource pool is telling me some interesting information.
07:30
Uh,
07:30
is basically saying that I've got 8000 shares available.
07:34
I go to the test resource pool.
07:36
That should show me 2000 cause it's in the low range
07:41
and then these other stats.
07:45
Well, we'll show other features once
07:47
the
07:48
the resource pulls in use.
07:54
So I've got some alarms on my V EMS here.
07:58
What's probably happening as I'm getting a message
08:01
about, ah, high CPU usage, and there it is.
08:05
So hi, memory usage. Virtual machine CPU usage is very high.
08:09
That's to be expected.
08:11
Okay, So what I'm going to do
08:13
is
08:20
I'm gonna drag the win seven
08:22
VM to the production resource pool
08:26
and the clone. I will drag to the
08:30
test resource pool.
08:33
Okay,
08:35
So what should happen
08:37
is that the
08:39
the available
08:41
resource is for each of these CMEs will now be adjusted. The wind seven
08:46
vm should get
08:48
a lot more
08:48
performance because I'm telling.
08:52
I put it into a resource pool that had
08:54
Ojai shares.
09:00
The test resource pool, on the other hand,
09:03
has
09:05
lower shares.
09:07
So once wants Thea VMS have a chance to
09:11
settle down. Then we should see that
09:15
that the
09:16
the usage will be different.
09:18
If we select the resource pool and go to the summary.
09:22
I can see how much of the host CPI was being consumed by having this VM here tells me
09:28
I've got one powered on V m
09:31
shows me how much memories being used.
09:35
How much of the guest memories being used?
09:37
So 2.81 gigahertz
09:39
of CPU.
09:41
If I go to the test
09:43
uh,
09:45
resource pool,
09:46
I'm also using 2.81 gigahertz.
09:50
Okay, So the way to tell if if the machines are affected by their resource pools is to look at
09:56
the script that's running
09:58
and we can see
10:01
that
10:01
the amount of time
10:03
spent to do a 200 rice That's two million operations
10:09
for Window seven,
10:11
which is in the production pool.
10:13
Oh,
10:13
the number of seconds it's taking
10:16
you know, 2.85 seconds
10:22
to do 200 to do two million operations.
10:24
The machine that's in the lower resource pool,
10:28
the test resource pool. It's taking,
10:31
uh, 3.77 seconds.
10:35
So what that means is that
10:39
even though both
10:39
machines are doing the same number of operations,
10:43
the one in the lower resource pool,
10:46
the test resource pool
10:48
is taking longer to do it.
10:50
That's because we've restricted its,
10:54
um,
10:56
available usage of the CPU.
11:00
Now we can also
11:01
at the settings for the test pool.
11:05
We can put that one back to Let's see normal.
11:11
We'll go back to the consoles,
11:13
and that should get the
11:16
the numbers a little bit closer together.
11:20
It might take a little while for that. See, the numbers are going down a little bit. Went from 3.83 seconds. 23 point
11:26
79
11:28
I'm giving it a little bit more. Resource is now so that the two million operations will run a little bit quicker,
11:37
and if I wanted to make the match,
11:41
I could do that as well.
11:43
I could say that the sheep Cebu shares should be high for test.
11:46
This is just to demonstrate
11:50
the difference in the settings.
11:52
Now, if we give this a little bit of time to stabilize,
11:56
you'll notice that
11:58
the window seven V M that's in the production pool.
12:01
It's pretty steadily taking 2.83
12:05
seconds to do its work.
12:09
However,
12:11
the
12:13
the V M that's in the test pool,
12:16
it's still hovering closer to four seconds.
12:20
Uh, with enough time going by, these two
12:24
value should should more or less be the same,
12:26
this one. We should continue to drop until it gets down till about
12:30
2.83 or thereabouts.
12:31
Oh,
12:35
so a pretty useful. In order to use resource pulls, you can drag and drop as you saw,
12:41
and you can adjust the settings on the fly.
12:43
So if you've got a large environment
12:46
and your host is becoming overwhelmed, you can
12:50
put
12:50
V EMS into a ah resource pool with lower
12:54
resource is allocated
12:56
for those things that are not as critical
12:58
for the environment,
13:00
and then those systems that require more resource is because of their function.
13:05
You know, database servers, Web servers, things like that. You can put those into a high resource pool so that they get more of the available resources for their use.
13:16
Okay, that concludes lab number 16
13:20
in the next lab. We will be looking a little bit closer at
13:24
how to monitor the performance of our virtual machines.
13:28
So see you laugh 17. Thank you.
Up Next
Similar Content