NTP on ESXi

안녕하세요. 다들 새해 복 많이 받으시기 바랍니다.

 

오늘 누군가로부터 ESXi 의 NTP time sync interval 이 얼마냐는 질문이 있어서 생각난김에 정리를 좀 해둘려고 합니다.

물론 Timesync 가 매우 중요하다.. 라는 내용은 따로 말씀드리지 않아도 잘 아시겠죠.

 

결론부터 말씀드리면 

 

디폴트로 64초에서 1024초 사이라고 말씀드릴 수 있겠네요. 

 

아니 왜 인터벌 타임이 왜 일정하지 않느냐? 라고 물어보실 수도 있을텐데요. 그 이유는 NTP 프로토콜이 그렇게 설계되어있기 때문입니다. -_-a

 

일정한 간격으로 맞출 수 있도록 설정을 할수도 있는데요, 기본적으로는 아래와 같은 식으로 동작이 되게 되어있습니다.

 

https://www.eecis.udel.edu/~mills/ntp/html/assoc.html#poll

 

NTP uses an intricate heuristic algorithm to automatically control the poll interval for maximum accuracy consistent with minimum network overhead. The algorithm measures the incidental offset and jitter to determine the best poll interval. When ntpd starts, the interval is the default minimum 64 s. Under normal conditions when the clock discipline has stabilized, the interval increases in steps to the default maximum 1024 s. In addition, should a server become unreachable after some time, the interval increases in steps to the maximum in order to reduce network overhead.

 

즉 초기에는 짧은 인터벌 타임을 가져가다가, 어느정도 타임싱크가 안정화되었다고 보여지면, (예를 들면 특정기간동안 오프셋 값의 변화가 크지 않다던가 – 상세 알고리즘은 https://www.eecis.udel.edu/~mills/ntp/html/poll.html )

 

점차 인터벌 타임을 늘려가면서, 불필요한 네트워크를 오버헤드를 줄이는 방식입니다.

ESXi 의 ntp.conf 파일에는 minpoll 이나 maxpoll 옵션이 적혀있지 않은데, 적혀있지 않으면 대체로 디폴트값을 사용한다 라고 보시면 되겠습니다.

 

minpoll 의 최소값은 16초

maxpoll 의 최대값은 36.4시간 인데, 실제 설정할때는 2의 제곱값으로 설정합니다.

 

디폴트라면 실제로는 minpoll 6 maxpoll 10 이 되는것이지요.

만약 나는 16초로 고정하고 싶다 라고 한다면 minpoll 4 maxpoll 4 를 ntp.conf 내에 server 로 시작하는 부분 에다가 적어주시면 됩니다.

 

예) /etc/ntp.conf

 

restrict default nomodify notrap nopeer noquery
restrict 127.0.0.1
driftfile /etc/ntp.drift
server 192.168.10.3 minpoll 4 maxpoll 4 

 

 

물론 저는 특별한 사유가 없다면 권장하고 싶지 않습니다. ^^

 

 

답글 남기기

이메일 주소는 공개되지 않습니다. 필수 필드는 *로 표시됩니다