Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 17 Feb 2002 23:21:47 -0800
From:      Terry Lambert <tlambert2@mindspring.com>
To:        Bruce Evans <bde@zeta.org.au>
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:  <3C70AB8B.96589869@mindspring.com>
References:  <20020218151249.E4728-100000@gamplex.bde.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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
> 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.

Up that to 2uS and... = 220ms/sec on time stamps = ~1/4 of
all available time spent on time stamps.


[ ... other stuff not really applicable; can discuss why
      off list, if necessary ... ]

-- Terry

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?3C70AB8B.96589869>