0% found this document useful (0 votes)
47 views25 pages

VSphere OnSv67 Lab 08

Uploaded by

sybell8
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
47 views25 pages

VSphere OnSv67 Lab 08

Uploaded by

sybell8
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 25

VMWARE VSPHERE 6.

7: OPTIMIZE AND SCALE

Lab 8: Monitoring CPU Performance


Document Version: 2020-01-02

Copyright © 2020 Network Development Group, Inc.


www.netdevgroup.com

NETLAB Academy Edition, NETLAB Professional Edition, and NETLAB+ are registered trademarks of Network Development Group, Inc.

VMware is a registered trademark of VMware, Inc.


Lab 8: Monitoring CPU Performance

Contents
Introduction ........................................................................................................................ 3
Objectives............................................................................................................................ 3
Lab Topology....................................................................................................................... 4
Lab Settings ......................................................................................................................... 5
1 Run a Single-Threaded Program in a Single-vCPU Virtual Machine ........................... 6
2 Start esxtop and View Statistics................................................................................ 10
3 Record Statistics for Case 1: Single Thread and Single CPU ..................................... 14
4 Run a Single-Threaded Program in a Dual-vCPU Virtual Machine ........................... 16
5 Record Statistics for Case 2: One Thread and Two vCPUs........................................ 20
6 Run a Dual-Threaded Program in a Dual-vCPU Virtual Machine.............................. 23
7 Record Statistics for Case 3: Two Threads and Two vCPUs ...................................... 24
8 Analyze the Test Results ........................................................................................... 25

1/6/2020 Copyright © 2020 Network Development Group, Inc. www.netdevgroup.com Page 2


Lab 8: Monitoring CPU Performance

Introduction

In this lab, you will monitor CPU performance.

Objectives

 Run a Single-Threaded Program in a Single-vCPU Virtual Machine


 Start esxtop and View Statistics
 Record Statistics for Case 1: Single Thread and Single vCPU
 Run a Single-Threaded Program in a Dual-vCPU Virtual Machine
 Record Statistics for Case 2: One Thread and Two vCPUs
 Run a Dual-Threaded Program in a Dual-vCPU Virtual Machine
 Record Statistics for Case 3: Two Threads and Two vCPUs
 Analyze the Test Results

1/6/2020 Copyright © 2020 Network Development Group, Inc. www.netdevgroup.com Page 3


Lab 8: Monitoring CPU Performance

Lab Topology

1/6/2020 Copyright © 2020 Network Development Group, Inc. www.netdevgroup.com Page 4


Lab 8: Monitoring CPU Performance

Lab Settings

The information in the table below will be needed in order to complete the lab. The
task sections below provide details on the use of this information.

Virtual Machine IP Address Account Password

sa-esxi-01 eth0: 172.20.10.51 root Train1ng$

sa-esxi-02 eth0: 172.20.10.52 root Train1ng$

sa-esxi-03 eth0: 172.20.10.53 root Train1ng$

sa-aio eth0: 172.20.10.10 sysadmin vmware123

sa-student eth0: 172.20.10.80 sysadmin vmware123

sa-vcsa eth0: 172.20.10.94 [email protected] vmware123

1/6/2020 Copyright © 2020 Network Development Group, Inc. www.netdevgroup.com Page 5


Lab 8: Monitoring CPU Performance

1 Run a Single-Threaded Program in a Single-vCPU Virtual Machine

In this task, you will run a test program to generate continuous database activity on the
test virtual machine for statistical analysis. The test virtual machine is configured with
one vCPU.

1. Launch the sa-student virtual machine to access the graphical login screen.
2. Log in as sysadmin using the password vmware123.

3. Launch the Mozilla Firefox web browser by either clicking on the icon shortcut
found on the bottom toolbar or by navigating to Start Menu > Internet > Firefox
Web Browser.

1/6/2020 Copyright © 2020 Network Development Group, Inc. www.netdevgroup.com Page 6


Lab 8: Monitoring CPU Performance

4. Notice the homepage is automatically configured to load the URL address of the
VMware vCenter Server Appliance (sa-vcsa virtual machine). Click on the Launch
vSphere Web Client (HTML5) button to launch the HTML5-based vSphere client.

If you cannot successfully load the VMware Getting Started webpage,


then please wait an additional 3-4 minutes and refresh the page to
continue. During this time, the vCSA is still booting up and requires
extra time to initialize.

5. In the User name text field, type [email protected] and in the Password text
field, type vmware123. Click on Login.

You may ignore the “browser-OS combination” warning message


presented on the VMware vCenter Single Sign-On page and continue
moving forward with the lab.

1/6/2020 Copyright © 2020 Network Development Group, Inc. www.netdevgroup.com Page 7


Lab 8: Monitoring CPU Performance

6. In the left pane, click on Hosts and Clusters and expand the Datacenter inventory
object.

7. Expand sa-esxi-01.vclass.local, right-click on Linux01 and select Power > Power On.

1/6/2020 Copyright © 2020 Network Development Group, Inc. www.netdevgroup.com Page 8


Lab 8: Monitoring CPU Performance

8. Right-click on Linux01 and select Open Remote Console.

It is strongly advised to only utilize the remote console option and not
the web console as problems may arise when attempting to open a
virtual machine’s console through the web console.

9. When Linux01 has completely booted, log in as root with the VMware1! Password.

10. Type /root/starttest1, this script will generate database operations to a medium-
size database, and write the output to the screen. Allow the program to run
uninterrupted.

You will need to press Ctrl + Alt to release your mouse from the VM
Remote Console.

11. Leave vSphere Web Client open to continue with the next task.

1/6/2020 Copyright © 2020 Network Development Group, Inc. www.netdevgroup.com Page 9


Lab 8: Monitoring CPU Performance

2 Start esxtop and View Statistics

In this task, you will use the esxtop command to observe performance statistics for
supported objects.

1. Switch back to the vSphere Client tab.

2. In the left pane, select sa-esxi-01.vclass.local and click on the Configure tab.

3. Scroll down and select Services.

1/6/2020 Copyright © 2020 Network Development Group, Inc. www.netdevgroup.com Page 10


Lab 8: Monitoring CPU Performance

4. Select SSH and click the Start button.

5. Start an SSH session to sa-esxi-01.vclass.local.


a. On the sa-student desktop taskbar, open a terminal.

b. In the terminal window, type ssh [email protected] and press


Enter, when prompted for a password, use Train1ng$.

1/6/2020 Copyright © 2020 Network Development Group, Inc. www.netdevgroup.com Page 11


Lab 8: Monitoring CPU Performance

6. Start esxtop by typing esxtop and press Enter. (By default, esxtop starts with the
CPU screen.)

7. Change the update delay from the default (5 seconds) to 10 seconds.


a. Enter s.
b. Enter 10 and press Enter.

1/6/2020 Copyright © 2020 Network Development Group, Inc. www.netdevgroup.com Page 12


Lab 8: Monitoring CPU Performance

8. To filter the CPU screen output only to the virtual machines, enter uppercase V. (By
default, the CPU screen shows statistics for virtual machine processes and active
ESXi host processes). In the output table, find the Linux01 virtual machine statistics.

9. Leave vSphere Client open to continue with the next task.

1/6/2020 Copyright © 2020 Network Development Group, Inc. www.netdevgroup.com Page 13


Lab 8: Monitoring CPU Performance

3 Record Statistics for Case 1: Single Thread and Single CPU

In this task, you will record statistics for the first case.

1. After 30 seconds of running esxtop with Linux01 displayed, record the following
statistics:
a. %USED
b. %RDY
c. %IDLE

2. Switch back to the Linux01 remote console.

3. If the screen is blank, click inside the console to wake it up. Record the operations
per minute (opm) value in the test script.
4. Press Ctrl+C to stop the script.

1/6/2020 Copyright © 2020 Network Development Group, Inc. www.netdevgroup.com Page 14


Lab 8: Monitoring CPU Performance

5. Close the Linux01 remote console.

You will need to press Ctrl + Alt to release your mouse from the VM
Remote Console.

6. Leave vSphere Client open to continue with the next task.

1/6/2020 Copyright © 2020 Network Development Group, Inc. www.netdevgroup.com Page 15


Lab 8: Monitoring CPU Performance

4 Run a Single-Threaded Program in a Dual-vCPU Virtual Machine

In this task, you will modify a virtual machine to have two vCPUs and restart the test
script.

1. Right-click on Linux01 and select Power > Shut Down Guest OS.

2. Confirm the Guest Shutdown by clicking Yes.

1/6/2020 Copyright © 2020 Network Development Group, Inc. www.netdevgroup.com Page 16


Lab 8: Monitoring CPU Performance

3. Wait for Linux01 to shut down completely and add a second vCPU to it.
a. Right-click Linux01 and select Edit Settings.

b. On the Virtual Hardware tab, change the drop-down beside CPU to 2 and click
OK.

1/6/2020 Copyright © 2020 Network Development Group, Inc. www.netdevgroup.com Page 17


Lab 8: Monitoring CPU Performance

4. Right-click Linux01 and select Power > Power On.

5. Right-click Linux01 and select Open Remote Console.

It is strongly advised to only utilize the remote console option and not
the web console as problems may arise when attempting to open a
virtual machine’s console through the web console.

1/6/2020 Copyright © 2020 Network Development Group, Inc. www.netdevgroup.com Page 18


Lab 8: Monitoring CPU Performance

6. When Linux01 is booted, log in as root with the VMware1! Password.

7. Type /root/starttest1 and press Enter to run the script again.

8. Leave the vSphere Client open and continue to the next task.

1/6/2020 Copyright © 2020 Network Development Group, Inc. www.netdevgroup.com Page 19


Lab 8: Monitoring CPU Performance

5 Record Statistics for Case 2: One Thread and Two vCPUs

In this task, you will record statistics for the second test case.

1. Switch back over to the ssh session you had earlier with sa-esxi-01.vclass.local.

You will need to press Ctrl + Alt to release your mouse from the VM
Remote Console.

2. In the esxtop window, record the GID of Linux01.

3. In esxtop, type e and enter the GID recorded from the previous step.

1/6/2020 Copyright © 2020 Network Development Group, Inc. www.netdevgroup.com Page 20


Lab 8: Monitoring CPU Performance

4. Notice the two vmx-vcpu processes; these are the vCPU’s activity in the virtual
machine.

5. After 30 seconds of statistics collection, record the following values for vmx-vcpu-0
and vmx-vcpu-1:
a. %USED
b. %RDY
c. %IDLE

6. Switch to the Linux01 console.

7. If the screen is blank, click on the inside of the console, record the operations per
minute (opm) from the script.

1/6/2020 Copyright © 2020 Network Development Group, Inc. www.netdevgroup.com Page 21


Lab 8: Monitoring CPU Performance

8. Press Ctrl+C to stop the script.

9. Leave the vSphere Client open and continue to the next task.

1/6/2020 Copyright © 2020 Network Development Group, Inc. www.netdevgroup.com Page 22


Lab 8: Monitoring CPU Performance

6 Run a Dual-Threaded Program in a Dual-vCPU Virtual Machine

In this task, you will configure the third case parameters by running a two-threaded test
program on a virtual machine with two vCPUs.

1. In the Linux01 console, type /root/starttest2. This will generate database


operations with the number of threads set to 2.

2. Leave the vSphere Client open and continue to the next task.

1/6/2020 Copyright © 2020 Network Development Group, Inc. www.netdevgroup.com Page 23


Lab 8: Monitoring CPU Performance

7 Record Statistics for Case 3: Two Threads and Two vCPUs

1. Switch back to the ssh session with sa-esxi-01.vclass.local.

2. Examine the two lines that start with vmx-vcpu. After 30 seconds of collection,
record the following values for vmx-vcpu-0 and vmx-vcpu-1:
a. %USED
b. %RDY
c. %IDLE

3. Switch to the Linux01 console.

4. Record the operations per minute (opm values).

5. Leave the vSphere Client open and continue to the next task.

1/6/2020 Copyright © 2020 Network Development Group, Inc. www.netdevgroup.com Page 24


Lab 8: Monitoring CPU Performance

8 Analyze the Test Results

1. Compare the results from tasks 3, 5, and 7.

2. The lab is now complete; you may end the reservation.

1/6/2020 Copyright © 2020 Network Development Group, Inc. www.netdevgroup.com Page 25

You might also like