PTP Timers and Log Mean Interval (LMI)
Explanation of how PTP timers use Log Mean Interval (LMI) values to control synchronization frequency and accuracy.
In PTP-enabled systems, synchronization intervals are defined using the Log Mean Interval (LMI). The LMI represents the logarithm (base 2) of the time interval, in seconds, between successive PTP messages. This approach allows configuration using integer values, which simplifies implementation while maintaining precise control over synchronization frequency.
Each LMI value corresponds to a specific time interval. For example:
LMI Value | Update Interval (seconds) |
---|---|
-7 | 0.0078125 or 128 packets per second |
-6 | 0.015625 or 64 packets per second |
-5 | 0.03125 or 32 packets per second |
-4 | 0.0625 or 16 packets per second |
-3 | 0.125 or 8 packets per second |
-2 | 0.25 or 4 packets per second |
-1 | 0.5 or 2 packets per second |
0 | 1 |
1 | 2 or 1 packet in 2 seconds |
2 | 4 or 1 packet in 4 seconds |
3 | 8 or 1 packet in 8 seconds |
An LMI value of 3
means 23 which equates to 8. This
results in one update every 8 seconds. Similarly, an LMI of 2-3 results in
updates every 125 milliseconds.
Reducing the LMI value increases the frequency of synchronization messages. This helps to minimize clock drift between the timeReceiver clock and the grandmaster clock, improving overall time accuracy.
Usage examples:
- A high-precision application (e.g., financial trading systems) may use Enterprise profile
type and set an LMI of
-7
to ensure updates every 7.8125 milliseconds, maintaining tight synchronization. - A less time-sensitive application (e.g., general data logging) might use an LMI of
1
or2
to reduce network traffic while maintaining acceptable accuracy.
See the PTP configuration fields that support log mean interval values at master
.
For G.8275.1 profile-type, the rate is fixed to:
-
Delay request interval : -4 (16 packets per second)
-
Sync interval : -4 (16 packets per second)
-
Announce interval : -3 (8 packets per second)