[ntp:bugs] [Bug 1247] ntpd should use nonblocking I/O for Samba4 DC signing
Andrew Bartlett via the NTP Bugzilla
bugzilla at ntp.org
Wed Jul 22 13:12:24 UTC 2009
http://bugs.ntp.org/1247
----------------------------------------------------------------------------
Additional Comments From abartlet at samba.org (Andrew Bartlett)
Submitted on 2009-07-22 13:12
Danny,
You are quite correct. NTPd should connect to the socket once (lazily on the
first MS-SNTP packet), and reused for each send and receive. The cost of
connecting is quite low, but it is avoidable. Naturally, on error it should be
torn down and re-established at the next packet.
I decided to measure what we are trying to save here, on my Fedora 10, Core 2
Duo workstation:
with the cached connection, a simple unit test of 10000 messages and replies
over a socket took:
real 0m0.602s
user 0m0.030s
sys 0m0.140s
with a reconnect each time, the same test took:
real 0m1.163s
user 0m0.033s
sys 0m0.257s
As such, there per packet overhead is indeed doubled (ie and increase of, 50
microseconds per op) if a reconnect is performed each time.
(this was based on a hacked version of
http://www.samba.org/ftp/unpacked/junkcode/ux_demo/ - the same code the unix
socket code I added to NTP is derived from)
--
Andrew Bartlett <abartlet at samba.org>
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
More information about the bugs
mailing list