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