From owner-freebsd-arch Sun Feb 17 23:36: 9 2002 Delivered-To: freebsd-arch@freebsd.org Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by hub.freebsd.org (Postfix) with ESMTP id B77C737B42C; Sun, 17 Feb 2002 23:35:55 -0800 (PST) Received: from bde.zeta.org.au (bde.zeta.org.au [203.2.228.102]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id SAA26665; Mon, 18 Feb 2002 18:35:39 +1100 Date: Mon, 18 Feb 2002 18:35:38 +1100 (EST) From: Bruce Evans X-X-Sender: To: Terry Lambert Cc: Matthew Dillon , Poul-Henning Kamp , Julian Elischer , Alfred Perlstein , , , , Subject: Re: gettimeofday() and crhold()/crfree() (was Re: gettimeofday()andcopyout().Is copyout() MPSAFE on non-i386 archs? ) In-Reply-To: <3C70AB8B.96589869@mindspring.com> Message-ID: <20020218182727.C5246-100000@gamplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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