Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 4 May 2001 13:17:44 -0500
From:      Mike Meyer <mwm@mired.org>
To:        dave <dleimbac@earthlink.net>
Cc:        questions@freebsd.org
Subject:   Re: Curious gettimeofday problem/issue
Message-ID:  <15090.62024.675629.309220@guru.mired.org>
In-Reply-To: <1313043@toto.iv>

next in thread | previous in thread | raw e-mail | index | archive | help
dave <dleimbac@earthlink.net> types:
> http://www-106.ibm.com/developerworks/linux/library/l-rt1/
> 
> Has an article using gettimeofday vs and a equivalent function in Windows
> to test some aspects of system performance.  There is a loop of
> approximately 1 million calls to gettimeofday ran 20 times.  Each of these
> 1million calls has a final elapsed time and then the average time/call is
> printed.  The source for these tests is available at the above link.
> 
> I decided to run this test with FBSD and was shocked and horrified.
> 
> The tests that the author of the above article ran showed Linux to be 2.5
> times faster than Windows for that test.   By the same token Linux was
> shown to be more than 13 times faster than FBSD.
> 
> Now this doesn't mean that all of FBSD is slower than linux but definitely
> true on this test.
> 
> gettimeofday is a glibc library call.  Perhaps the way it gets its
> information from the kernel is sub-optimal.   Perhaps the kernel's way of
> providing this information is sub-optimal.  
> 
> Or what I am really hoping is that  my kernel is not optimally configured
> <my fault> and that someone else will run this test and show there is no
> bug in the kernel or glibc.

Something like this came up before, and the conclusion was that the
linux gettimeofday library call was caching something that the FBSD
version wasn't. You might try searching the list archives to see if
that's relevant.

	<mike
--
Mike Meyer <mwm@mired.org>			http://www.mired.org/home/mwm/
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?15090.62024.675629.309220>