Bug 225579 - CPU usage in top command not matching with VMWare Host's esxtop command's vCPU output
Summary: CPU usage in top command not matching with VMWare Host's esxtop command's vCP...
Status: Closed Feedback Timeout
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 11.0-STABLE
Hardware: amd64 Any
: --- Affects Many People
Assignee: freebsd-virtualization (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-01-31 08:54 UTC by Nirmalanand Jebakumar
Modified: 2020-08-17 15:56 UTC (History)
3 users (show)

See Also:


Attachments
Schreenshot of top and esxtop with FreeBSD VM 10.3 (169.92 KB, image/jpeg)
2018-01-31 08:54 UTC, Nirmalanand Jebakumar
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nirmalanand Jebakumar 2018-01-31 08:54:21 UTC
Created attachment 190217 [details]
Schreenshot of top and esxtop with FreeBSD VM 10.3

Hello Experts,

VM: FreeBSD 11.0 Stable [Seen with FreeBSD 10.3 stable and lower version as well]
Hypervisor : ESX 6.0  (ESXi-6.0.0-20171104001-standard (Build 6921384))

5 vCPUs are allocated for the VM, 10 GB RAM and 20 GB disk. vCPU pinning is done for the VM.
 
Test Case: A shell script with the following commands:
dd if=</a_2gb_file> of=<an output file> &
dd if=</a_2gb_file> of=<an output file> &
dd if=</a_2gb_file> of=<an output file> &
dd if=</a_2gb_file> of=<an output file> &
dd if=</a_2gb_file> of=<an output file> &

The top command output and esxtop command output is attached for FreeBSD VM: Freebsd_VM.jpg
If we compare the vCPU IDLE times, there is a difference of around 60%.

We would like understand why it is happening and fix it as needed.

Few additional notes:
- This issue is seen with XenServer 7.1. So issue is hypervisor agnostic.
- Another data point, we do not observe similar issue with a Ubuntu VM on the same ESX hypervisor.


Let us know.

Regards,
Nirmal
Comment 1 Rodney W. Grimes freebsd_committer freebsd_triage 2018-02-07 17:16:50 UTC
I can do some investigation here, but using an I/O intensive task and evaluating CPU load is probably not a good choice in benchmarks or testing.

Are the FreeBSD guests using UFS, or ZFS or ??? for the file system that
the dd operations are going to.  Is the backing store in ESXi eager or
lazy zero?

What file system was used in the ubuntu case?  What version of Ununtu?

What are the I/O rates during this testing?  This really is an I/O
benchmark and not a CPU benchmark.

Would be interesting to see this running a CPU intensive task.
Comment 2 amvandemore 2018-02-07 17:22:28 UTC
May be related to bug #173541
Comment 3 Rodney W. Grimes freebsd_committer freebsd_triage 2018-07-17 13:18:27 UTC
Given that none of my questions have been answered by the Original Poster and that this appears to be miss application of trying to benchmark CPU performance with an I/O load that well have wide and varied results dependent on file system implementation and hypervisor container type I am inclined to close this PR as un resolvable without further information.