fine-grained network time synchronization using reference broadcasts jeremy elson, lew girod, and...
Post on 13-Dec-2015
236 Views
Preview:
TRANSCRIPT
Fine-Grained Network Time Synchronization Fine-Grained Network Time Synchronization using Reference Broadcastsusing Reference Broadcasts
Jeremy Elson, Lew Girod, and Deborah Estrin
OSDI 2002 - Boston, MA
Speaker : hsiwei-Chen
OutlineOutline
IntroductionIntroductionReference-Broadcast SynchronReference-Broadcast Synchron
ization(RBS)ization(RBS) Implementation on Berkeley MoImplementation on Berkeley Mo
testesConclusions and FutureWorkConclusions and FutureWork
Sources of Time Sources of Time Synchronization Error(1/2)Synchronization Error(1/2)
Send Time Send Time Time spent at the sender to construct the Time spent at the sender to construct the
message, e.g. context switches and system message, e.g. context switches and system call overheadcall overhead
The time required to transfer the message The time required to transfer the message from the host to its network interface.from the host to its network interface.
Access TimeAccess Time Wait for the channel to be clear before Wait for the channel to be clear before
transmittingtransmitting
Sources of Time Sources of Time Synchronization Error(2/2)Synchronization Error(2/2)
Propagation TimePropagation Time The time needed for the message to transit frThe time needed for the message to transit fr
om sender to receiversom sender to receivers Receive TimeReceive Time
Time to receive the message and notify the hoTime to receive the message and notify the host of its arrivalst of its arrival
Send time & access time are most noSend time & access time are most non-deterministicn-deterministic
Reference-Broadcast SynchronizReference-Broadcast Synchronization(RBS)ation(RBS)
Traditional protocols Traditional protocols Synchronize the sender of a message Synchronize the sender of a message with its receiverwith its receiver
RBSRBS A set of nodes synchronize with each otA set of nodes synchronize with each other (not with the sender)her (not with the sender)reduces non-determinismreduces non-determinism
Critical Path AnalysisCritical Path Analysis
Traditional RBS
Send Time Access
Time PropagationDelayReceiveTime
RBS Critical PathRBS Critical Path
Remove the send time & access time from Remove the send time & access time from the critical paththe critical path
Receive time is independent of the sender or netwReceive time is independent of the sender or network loadork load
Propagation time can be ignored in a short distancPropagation time can be ignored in a short distancee
RBS Critical Path (Cont.)RBS Critical Path (Cont.)
Use broadcast as a relative time referUse broadcast as a relative time referenceence Broadcast packet does NOT include timestamBroadcast packet does NOT include timestam
p generated by sender p generated by sender Any broadcast, e.g., RTS/CTS, route discoverAny broadcast, e.g., RTS/CTS, route discover
y packetsy packets
Simple RBSSimple RBS One transmitter broadcasts a reference packet One transmitter broadcasts a reference packet
to two receiversto two receivers Each receiver records the time the reference pEach receiver records the time the reference p
acket arrived according to the local clockacket arrived according to the local clock Receivers exchange the timestampsReceivers exchange the timestamps We consider the Propagation Time to be effectWe consider the Propagation Time to be effect
ively 0ively 0 Sensitiving to Sensitiving to differences differences in the receive time of in the receive time of
messages within a set of receivers.messages within a set of receivers.
Simple RBSSimple RBS
Sender
Receiver 1
Receiver 2
Broadcast
Broadcast
exchange the tiexchange the timestampsmestamps
Distribution of Inter-Receiver Distribution of Inter-Receiver Phase OffsetPhase Offset
Pairwise Difference in Packet Reception Time (usec)
Number of Trials
Phase offset recorded by a logic analyzer for1,478 broadcast packets(total)(sender emitted 160 broadcast packets)
Gaussian distribution= 0, = 11.1usConfidence = 99.8%
5 motes: receivers1 mote: transmitter
Estimation of Phase OffsetEstimation of Phase Offset
A sender broadcasts A sender broadcasts mm reference packets reference packets Each of the Each of the nn receiver records the time at which receiver records the time at which
the reference was receivedthe reference was received Receivers exchange Receivers exchange timestampstimestamps Receiver Receiver ii computes its phase offset to any computes its phase offset to any
other receiver other receiver jj as the average of as the average of mm differences differences
m
kkjki TT
mjiOffsetnjni
1,, )(
1],[:,
Estimation of Clock SkewEstimation of Clock Skew
Clock skew due to crystal oscillators errorsClock skew due to crystal oscillators errors Frequency errorFrequency error
Difference between the expected and actual Difference between the expected and actual frequenciesfrequencies
InstabilityInstabilityShort-term: Environmental factors, e.g., variations Short-term: Environmental factors, e.g., variations
in temperature, supply voltage, and shockin temperature, supply voltage, and shockLong-term: Oscillator agingLong-term: Oscillator aging
Least square method (linear regression)Least square method (linear regression)Assume phase error is changing at constant rateAssume phase error is changing at constant rateContinuously adjust frequency based on recent Continuously adjust frequency based on recent
observations relating the local oscillator to a observations relating the local oscillator to a referencereference
Implementation on Berkeley Implementation on Berkeley MotesMotes
One sender, five receiversOne sender, five receivers1000 trials1000 trials
Receiver Group DispersionReceiver Group Dispersion
#Reference packet broadcasts
Rec
eive
r G
roup
Dis
pers
ion
(us)
25 broadcasts can reducethe dispersion below 10us
20 Receivers
2 Reeivers
Effect of Clock Skew on RBSEffect of Clock Skew on RBS
Time (sec)
Pha
se O
ffse
t (u s
)
Fit
Err
o r (
u s)
Performance ComparisonsPerformance Comparisons
Compare to NTPCompare to NTP UNIX implementation of RBS for fair comparisonsUNIX implementation of RBS for fair comparisons
User space UNIX daemonUser space UNIX daemon UDP datagramUDP datagram StrongArm-based Compaq IPAQ PDA’sStrongArm-based Compaq IPAQ PDA’s
““Familiar” Linux (2.4 kernel)Familiar” Linux (2.4 kernel) Lucent Technology 11Mbit 802.11 wireless Ethernet aLucent Technology 11Mbit 802.11 wireless Ethernet a
dapters dapters
300 trials,300 trials, 每個每個 trialtrial 間格間格 88 秒鐘秒鐘 ,Total time is 40 ,Total time is 40 minutersminuters
Synchronization Error with Light Synchronization Error with Light Network LoadNetwork Load
Error (us)
Cum
ulat
ive
Err
o r P
rob.
RBS
NTP
NTP-Offset
Sync. Error between two IPAQ’s
Synchronization Error with Light Synchronization Error with Light Network LoadNetwork Load
RBS: 6.29 +/- 6.45 usRBS: 6.29 +/- 6.45 us NTP: 51.18 +/- 53.30 usNTP: 51.18 +/- 53.30 us NTP-Offset: 204 +/- 599.44 usNTP-Offset: 204 +/- 599.44 us RBS works better due to the reduced non-RBS works better due to the reduced non-
determinismdeterminism
Synchronization Error with Synchronization Error with Heavy Network LoadHeavy Network Load
Error (us)
Cum
ulat
ive
Err
o r P
rob.
RBS
NTP
NTP-Offset
Synchronization Error with Synchronization Error with Heavy Network LoadHeavy Network Load
RBS: 8.44 +/- 9.37 usRBS: 8.44 +/- 9.37 us With kernel support which timestamps at With kernel support which timestamps at
interrupt time, 1.85 +/- 1.28 usinterrupt time, 1.85 +/- 1.28 us NTP: 1542.27 +/- 1192.53 usNTP: 1542.27 +/- 1192.53 us NTP-Offset: 5139.08 +/- 6994.58 usNTP-Offset: 5139.08 +/- 6994.58 us RBS is not affected by Medium Access RBS is not affected by Medium Access
DelayDelay
Multi-Hop Time SynchronizationMulti-Hop Time Synchronization
1 2
3 4
1. 在 node A 面積 local 中 ,node 1 與 node 4 同步
2. 再以 node 4 當 getway ,與 node B 面積 local 中 ,node 4 與 node 7 同步
3. 即可達到 Global 同步 .
A5
6 7
B
Multi-Hop RBS PerformanceMulti-Hop RBS Performance
Hop Mean Error( ) 1 1.85 2 2.73 3 2.73 4 3.68
sec
Conclusions and FutureWorkConclusions and FutureWork
RBSRBS provides more precise, flexible, and res provides more precise, flexible, and resource-efficient network time synchronization tource-efficient network time synchronization than traditional algorithmshan traditional algorithms
But such as automatic, dynamic election of thBut such as automatic, dynamic election of the set of nodes to act as beacon senders e set of nodes to act as beacon senders ??
SummarySummary
本篇作者去除掉了本篇作者去除掉了 Send Time and Acces Send Time and Acces
TimeTime 同步同步 errorerror 的兩個來源的兩個來源 以相對的時間代替絕對的時間 以相對的時間代替絕對的時間
top related