From owner-freebsd-questions Fri May 4 5:13:47 2001 Delivered-To: freebsd-questions@freebsd.org Received: from hawk.mail.pas.earthlink.net (hawk.mail.pas.earthlink.net [207.217.120.22]) by hub.freebsd.org (Postfix) with ESMTP id DCE2637B446 for ; Fri, 4 May 2001 05:13:43 -0700 (PDT) (envelope-from dleimbac@earthlink.net) Received: from 1Cust142.tnt1.starkville.ms.da.uu.net (1Cust142.tnt1.starkville.ms.da.uu.net [63.30.107.142]) by hawk.mail.pas.earthlink.net (EL-8_9_3_3/8.9.3) with ESMTP id FAA20494 for ; Fri, 4 May 2001 05:13:42 -0700 (PDT) Message-Id: <200105041213.FAA20494@hawk.mail.pas.earthlink.net> Date: Fri, 04 May 2001 02:15:44 CDT From: dave To: freebsd-questions@freebsd.org Subject: Curious gettimeofday problem/issue Reply-To: dleimbac@earthlink.net X-Mailer: Spruce 0.6.5 for X11 w/smtpio 0.7.9 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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 and that someone else will run this test and show there is no bug in the kernel or glibc. Dave Leimbach To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message