Customer Service Center
Home
Knowledge Base
Forums
Contact Support
License Activation
|
Contact Support
|
License Activation
|
Spirent KB Article
Doc ID: FAQ20006
Printer Friendly
Email Article Link
Spirent TestCenter: How to get accurate Latency and Jitter measurement with STCv?
Environment/Versions
Spirent TestCenter.
Answer
In order to obtain the most accurate latency and jitter measurements, the following steps are recommended. Details are provided in the subsections below.
Utilize a stratum one source
Enable NTP Burst
Allow NTP to sync over a longer period
Use recommended deployments
Follow hypervisor configuration recommendations
Enable NTP Burst
STCv Command to enable NTP Burst –
ntp x.x.x.x burst
Provides 100 +/- Microsecond range with accuracy, when using a private NTP server synced to a stratum one clock.
Recommended Deployments for Latency MeasurementsRecommended Deployments for Latency Measurements
In order to eliminate clock differences, deploy a single VM with multiple test ports. If that is not feasible, the next best option is to deploy VMs on the same hypervisor.
Traffic between two STCv ports on the same STCv VM.
Traffic between two STCv VMs on the same Hypervisor.
Traffic between two STCv VMs across two sites.
Two NTP Servers running independently (Not Recommended).
Hypervisor Configuration
To increase the accuracy of latency measurements, you should:
Use dedicated CPU cores for STCv VM
Configure the hypervisor to isolate the STCv cpu cores with CPU pinning
Not having pinned vCPUs can lead to issues with ‘CPU Steal Time’
Do not allow hypervisor interrupt processing on the STCv cores
Negative Latency
Given the nature of NTP, it is possible to get negative latency numbers even after following the recommendations. A negative latency is seen if the following ae true –
The clocks on one of the VMs is ahead of the clock on another VM. This clock difference is inherent in the nature of NTP.
The network latency is smaller than the clock difference.
For example, the picture below shows an example of negative latency
Latency in one direction:
538,409.92 us
Latency in the other direction:
- 540,741.32 us
(Negative latency)
In such cases, taking an average of the two latencies cancels out the clock difference and gives an accurate measure of average network latency:
Avg Latency
=
538,409.92
+
-540,741.32
=
2,331.4 /2
=
1,165.7 us.
Taking the Average
Why does taking the average cancel out the clock difference? Let’s look at the example below. Let’s say that the actual network latency between the two VMs is
‘L’
, and the clock difference between the two VMs is
‘X’
. In other words, when the clock on
VM1
shows time
t0
, the clock on
VM2
will show time
t0+X
.
Let’s say that
Packet A
is traveling from
VM1
to
VM2
. It departs
VM1
at time
t0
. Note that
VM2’s
clock would show a time of
t0+X
at that moment. The packet would arrive at
VM2
after a period
‘L’
and would get an arrival timestamp of
‘t0+X+L’
. Similarly,
Packet B
, which is traveling from
VM2
to
VM1
, will have departure and arrival timestamps of
‘t0+X’
and
‘t0+L’
respectively.
Latency, which is determined by subtracting departure timestamp from the arrival timestamp, would be:
VM1 to VM2 latency (Packet A)
=
(t0+X+L)
–
(t0)
=
L+X
VM2 to VM1 Latency (Packet B)
=
(t0+L)
–
(t0+X)
=
L-X
Therefore, if
VM2’s
clock is ahead of
VM1
, the latency measured in
VM1 -> VM2
direction will be higher and the latency measured in
VM2 -> VM1
direction will be lower. If the clock difference
X
is larger than the network latency
L
, then we would see negative numbers for latency.
We can, however, determine the true latency
L
by averaging the two unidirectional latency numbers.
Avg latency
=
((L+X)
+
(L-X))/2
=
L
Attachments
Attachment
STCv-Latency-Jitter v2.pdf
Version
1.0
Publish Date
2022-07-19
Categories
Product : STC Virtual,Spirent TestCenter
Related Articles