Date: Mon, 18 Feb 2002 18:35:38 +1100 (EST) From: Bruce Evans <bde@zeta.org.au> To: Terry Lambert <tlambert2@mindspring.com> Cc: Matthew Dillon <dillon@apollo.backplane.com>, Poul-Henning Kamp <phk@critter.freebsd.dk>, Julian Elischer <julian@elischer.org>, Alfred Perlstein <bright@mu.org>, <arch@FreeBSD.ORG>, <jhb@FreeBSD.ORG>, <peter@wemm.org>, <jake@locore.ca> Subject: Re: gettimeofday() and crhold()/crfree() (was Re: gettimeofday()andcopyout().Is copyout() MPSAFE on non-i386 archs? ) Message-ID: <20020218182727.C5246-100000@gamplex.bde.org> In-Reply-To: <3C70AB8B.96589869@mindspring.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 17 Feb 2002, Terry Lambert wrote: > Bruce Evans wrote: > > On Sun, 17 Feb 2002, Matthew Dillon wrote: > > > > > Just a note: The gettimeofday() has an overhead of only 2-3 uS in > > > -current. Squid would have to be doing an aweful lot of transactions > > > > And that is only on slow machines and/or under SMP. On my Athlon1600, > > it has an overhead of 0.3-0.4 nsec. I have been benchmarking it for argh, usec > > many years and recently had to change the benchmark program to use > > clock_gettime(2) instead of gettimeofday() when getttimeofday()'s > > resolution became too small. > > .4nsec * 22,000 transactions/sec * 5 timestamps/transaction > = 440us/sec spent on time stamps. This is not long :-), but 440 msec is. > Up that to 2uS and... = 220ms/sec on time stamps = ~1/4 of > all available time spent on time stamps. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020218182727.C5246-100000>