From owner-freebsd-current@FreeBSD.ORG Thu Oct 27 08:53:29 2005 Return-Path: X-Original-To: current@freebsd.org Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D9DB316A41F; Thu, 27 Oct 2005 08:53:29 +0000 (GMT) (envelope-from phk@critter.freebsd.dk) Received: from phk.freebsd.dk (phk.freebsd.dk [130.225.244.222]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8201443D45; Thu, 27 Oct 2005 08:53:29 +0000 (GMT) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (unknown [192.168.48.2]) by phk.freebsd.dk (Postfix) with ESMTP id AD4D3BC7A; Thu, 27 Oct 2005 08:53:27 +0000 (UTC) To: "Yuriy N. Shkandybin" From: "Poul-Henning Kamp" In-Reply-To: Your message of "Thu, 27 Oct 2005 12:24:30 +0400." <00a801c5dacf$db3b7700$6504010a@Jura> Date: Thu, 27 Oct 2005 10:53:27 +0200 Message-ID: <21264.1130403207@critter.freebsd.dk> Sender: phk@critter.freebsd.dk Cc: David Xu , current@freebsd.org Subject: Re: MySQL Performance 6.0rc1 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Oct 2005 08:53:30 -0000 In message <00a801c5dacf$db3b7700$6504010a@Jura>, "Yuriy N. Shkandybin" writes: >>>Check gettimeofday syscall, it follows every I/O syscall, I think >>>our gettimeofday is tooooooo expensive, if we can directly get time from >>>memory, the performance will be improved further. >It's true: >run next on same PC от freebsd and linux and compare I can produce unprecise timestamps just as fast as Linux. Heck, I can do it even faster: static __inline int gettimeofday(struct timeval *tp, void *tz __unused) { tp.tv_sec = 0; tp.tv_usec = 0; return (0); } A very important part of learning how to do benchmarks is learning how to measure the target and not the benchmarking code. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence.