esxtop is a great tool for performance analysis of all types. However, with only latency and throughput statistics, esxtop will not provide the full picture of the storage profile. Furthermore, esxtop only provides latency numbers for Fibre Channel and iSCSI storage. Latency analysis of NFS traffic is not possible with esxtop.
Since ESX 3.5, VMware has provided a tool specifically for profiling storage: vscsiStats. vscsiStats collects and reports counters on storage activity. Its data is collected at the virtual SCSI device level in the kernel. This means that results are reported per VMDK (or RDM) irrespective of the underlying storage protocol. The following data are reported in histogram form:
- IO size
- Seek distance
- Outstanding IOs
- Latency (in microseconds)
Starting and Stopping vscsiStats Collection
The tool is started with the following command:
/usr/lib/vmware/bin/vscsiStats -s <world_group_id>
This command starts the process that will accrue statistics. The world group ID must be set to a running virtual machine. The running VMs’ IDs can be obtained by running ‘/usr/lib/vmware/bin/vscsiStats -l’.
After about 30 minutes vscsiStats will stop running. If the analysis is needed for a longer period, the start command should be repeated above in this window. That will defer the timeout and termination by another 30 minutes.
Since results are accrued and reported out in summary, the histograms will include data since collection was started. To reset all counters to zero, run ‘/usr/lib/vmware/bin/vscsiStats -r’.
Counters are displayed by using the following command:
/usr/lib/vmware/bin/vscsiStats -p <histo_type> [-c]
The histogram type is used to specify either all of the statistics or one group of them. Options include all, ioLength, seekDistance, outstandingIOs, latency, interarrival.
Results can be produced in a more compact comma-delimited list by adding the optional “-c” above.