Use the esxtop command to monitor CPU performance

  1. Run a Single-Threaded Program in a Single-vCPU VM
  2. Start esxtop and View Statistics
  3. Record Statistics for Case 1: Single Thread and Single vCPU
  4. Run a Single-Threaded Program in a Dual-vCPU VM
  5. Record Statistics for Case 2: One Thread and Two vCPUs
  6. Run a Dual-Threaded Program in a Dual-vCPU VM
  7. Record Statistics for Case 3: Two Threads and Two vCPUs
  8. Analyze the Test Results

1: Run a Single-Threaded Program in a Single-vCPU VM

You run a test program to generate continuous database activity on the test VM for statistical analysis.

The test VM is configured with one vCPU.

Verify that the Linux01 VM is hosted on sa-esxi-04.vclass.local.

Verify that you are in the /root directory.

pwd

If you are not in the /root directory, change to the root directory.

cd /root

Start the test program on Linux01.

./starttest1

The test program generates database operations to a medium-size database and writes output to the screen. The program must run uninterrupted

2: Start esxtop and View Statistics

You use the esxtop command to observe performance statistics for supported objects.

Start an SSH session to sa-esxi-04.vclass.local.Start the real-time monitoring program esxtop.

esxtop

By default, esxtop starts with the CPU screen.

Change the update delay from the default 5 seconds to 10 seconds.

  1. Enter s.
  2. Enter 10.

Filter the CPU screen output to display only VMs by pressing Shift+v.

By default, the CPU screen shows statistics for VM processes and active ESXi host processes.

In the output table, find the Linux01 VM statistics

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

You record statistics for the first test case.

Record the operations per minute (OPM) value in the test script.

  1. In Firefox, click the Linux01 console tab.
  2. Record the OPM value reported by the test script in the Case 1 column The counter value is reported with each iteration that the test script performs.

Press Ctrl+C to stop the test script.

4: Run a Single-Threaded Program in a Dual-vCPU VM

You modify the Linux01 VM to have two vCPUs and you restart the test script

From the vSphere Client, shut down the Linux01 VM.

Add a second vCPU to the Linux01 VM.

  1. In the left pane, right-click Linux01 and select Edit Settings.
  2. On the Virtual Hardware tab in the Edit Settings dialog box, select 2 from the CPU drop-down menu and click OK.

Power on the Linux01 VM.

On the Summary tab, click the Launch Web Console link.

Log in by entering username root and password VMware1!.

On the Linux01 console tab, restart the test program from the directory /root.

./starttest1

This script generates database operations to a medium-size database. The number of threads is set to 1. The script must run uninterrupted

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

You record statistics for the second test case

Record the esxtop counter values.

  1. Change to the SSH session to sa-esxi-04.vclass.local MTPuTTY window.
  2. Enter e.
  3. Enter the GID for Linux01.
  1. Examine the two lines in the NAME column that start with vmx-vcpu.These two lines show the activity of each of the vCPUs in the Linux01 VM.
  1. After 30 seconds of statistics collection, record the values for vCPU0 and vCPU1 in the Case 2 column in the class configuration handout.
    • %USED
    • %RDY
    • %IDLE

Record the OPM value in the test script.

  1. In Firefox, click the Linux01 console tab.
  2. Record the OPM value reported by the test script in the Case 2 column .The counter value is reported with each iteration that the test script performs.

Press Ctrl+C to stop the test script in the Web Console session to Linux01

6: Run a Dual-Threaded Program in a Dual-vCPU VM

You configure the third case parameters by running a two-threaded test program on a VM with two vCPUs.

On the Linux01 console tab, start the two-threaded test program.

./starttest2

This script generates database operations to a medium-size database. The number of threads is set to 2. The script must run uninterrupted

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

You record statistics for the final test case.

Record the esxtop counter values.

  1. Change to the SSH session to sa-esxi-04.vclass.local MTPuTTY window.
  2. Examine the two lines in the NAME column that start with vmx-vcpu.These two lines show the activity of each of the vCPUs in the Linux01 VM.
  3. After 30 seconds of statistics collection, record the values for vCPU0 and vCPU1 in the Case 3 column .
    • %USED
    • %RDY
    • %IDLE

Record the OPM value in the test script.

  1. In Firefox, click the Linux01 console tab.
  2. Record the OPM value reported by the test script in the Case 3 column in the class configuration handout.

8: Analyze the Test Results

You analyze the captured statistics and document your conclusions

About the author

Mosab Shaker

I stand at the forefront of the fastest moving technology trends like Digital Transformation, computer virtualization ,networking and security. I spent the past tenth years evangelizing an industry-wide shift to the co location in the MENA by promoting virtualization and cloud services many Customers . With a unique mix of knowledge about different industries, businesses, and technologies

View all posts

Leave a Reply

Your email address will not be published. Required fields are marked *