Date: Wed, 5 May 1999 07:39:01 -0400 From: "Stephen Nadas" <nadas@raleigh.ibm.com> To: mike@smith.net.au, luigi@labinfo.iet.unipi.it Cc: lli@ralvm6.rscs, vperis@watson.ibm.com, Brian Adamson <adamson@itd.nrl.navy.mil>, freebsd-hackers@freebsd.org Subject: High resolution timers Message-ID: <199905051137.HAA33622@rtpmail03.raleigh.ibm.com> In-Reply-To: <v04204e02b354a20b916a@[132.250.92.151]> References: <199905032133.RAA29164@rtpmail03.raleigh.ibm.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Mike, Luigi, We run around a dozen or more FreeBSD machines (2.2.8 CD level) in a networking lab. Mostly these are pentiums of speed 75mhz-200mhz. We use xntpdc to synchronize their clocks to one of these machines (so it is important they be synchronized, but only to each other). We also use a tool called MGEN to generate traffic. This tool uses the select system call. On a faster pentium (180mhz) repeated calls to gettimeofday suggest that the gettimeofday() call takes about 6 usecs. But similar measurements show that a select system call takes at least 20 millisec. This 20msec is causing the application to send very bursty traffic for higher packet rates because when it wakes up from select there are many packets to send. This burstiness is undesirable in our testing. So, my main question is: Why is this 20 millisec? (there's quite a few older appends about this that don't resolve much) What can I do to make it shorter? I have read quite a few appends on high resolution timing and a solution remains unclear. Since you both have posted the hackers list on this subject so I am hopeful you can suggest a solution direction. I gather that the sysgen option HZ controls the number of ticks per sec that the kernel sees? (why is this option not in LINT?) and for higher granularity some appends suggest to increase HZ. Other appends suggest doing so will screw up xntpdc (is this true if all the machins involved use the same HZ?) There are some references to other functions e.g., microtime() but no man pages - where are these? can they be used in application code safely? Thanks in advance. Best Regards, Steve Nadas ip: nadas@raleigh.ibm.com / VM: nadas at rtp/notes: nadas@ibmusm23 +1-919-254-2363 / Tieline: 8-444-2363 / Fax: use X-5483 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199905051137.HAA33622>