Network administrators need the ability to monitor the latency of a virtualized network to diagnose and troubleshoot performance bottlenecks in the network.

For example, when NSX is installed and VXLAN-based networks are deployed in the network, the following types of latency exist:
  • vNIC to pNIC (on the source hypervisor)
  • pNIC to vNIC (on the destination hypervisor)
  • vNIC to vNIC
  • Tunnel latency (VTEP to VTEP)
  • End-to-end latency of the data path

The network operations agent (netopa) on the ESXi host collects the network latency information from various sources, such as vSphere, NSX, and so on. Administrators can configure external collector tools, such as vRealize Network Insight (vRNI) to export the latency information to these collectors. Finally, they can run analytics on the latency information to troubleshoot network-specific problems.

Note: The netopa agent can export the network latency information only to vRNI. Other collector tools are not supported currently.

You must use NSX REST APIs to configure NSX to calculate the latency metrics. For NSX to calculate the latency metrics correctly, ensure that the clocks on the different hosts are synchronized using the network time protocol (NTP).

Tunnel Latency

To calculate the tunnel latency or VTEP-to-VTEP latency between ESXi hosts, NSX transmits Bidirectional Flow Detection (BFD) packets periodically in each tunnel. You must configure the BFD global configuration parameters by running the PUT /api/2.0/vdn/bfd/configuration/global API.

For more information about configuring the BFD global configuration parameters, see the NSX API Guide.

End-to-End Latency

Starting in NSX 6.4.5, NSX can calculate the end-to-end latency of a data path as traffic moves between VMs that are either on the same ESXi host or on different ESXi hosts. However, both VMs must be attached to the same logical switch (subnet).

Note: NSX cannot calculate the end-to-end latency information when data traffic is routed between VMs through a distributed logical router. That is, when VMs are attached to different logical switches or subnets.

To calculate the end-to-end latency of the data path, NSX uses the timestamp attribute of a data path packet inside the hypervisor. The end-to-end data path latency is calculated in terms of latency of the multiple segments in the data path: vNIC to pNIC and pNIC to vNIC.

For example, when traffic moves between VMs on the same host, vNIC to vNIC latency is calculated. When traffic moves between VMs on different ESXi hosts, vNIC to pNIC latency is calculated on the source hypervisor and pNIC to vNIC latency is calculated on the destination hypervisor. For traffic between the ESXi hosts, NSX calculates only the tunnel latency, if BFD global configuration parameters are configured.

For more information about configuring the latency parameters on a specific vSphere Distributed Switch and on a specific host, see the following sections in the NSX API Guide:
  • Working with Latency Configuration of a Specific vSphere Distributed Switch
  • Working with Latency Configuration of a Specific Host