From owner-freebsd-current@FreeBSD.ORG Thu Oct 27 08:26:31 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 EA22C16A41F; Thu, 27 Oct 2005 08:26:31 +0000 (GMT) (envelope-from jura@networks.ru) Received: from networks.ru (orange.networks.ru [80.249.138.5]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1B46243D46; Thu, 27 Oct 2005 08:26:28 +0000 (GMT) (envelope-from jura@networks.ru) Received: from [81.195.67.217] (HELO Jura) by networks.ru (CommuniGate Pro SMTP 4.3.8) with ESMTPS id 2041527; Thu, 27 Oct 2005 12:26:26 +0400 Message-ID: <00a801c5dacf$db3b7700$6504010a@Jura> From: "Yuriy N. Shkandybin" To: "David Xu" References: <21137.1130401220@critter.freebsd.dk> Date: Thu, 27 Oct 2005 12:24:30 +0400 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="windows-1251"; reply-type=original Content-Transfer-Encoding: 8bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2670 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670 Cc: 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:26:32 -0000 >>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 struct timeval start; struct timeval stop; struct timeval tmp; register unsigned i; unsigned difft; gettimeofday(&start, NULL); for(i=0;i<1000000; i++) { gettimeofday(&tmp, NULL); } gettimeofday(&stop, NULL); difft= (unsigned) ( (stop.tv_sec - start.tv_sec)*1000000 + (stop.tv_usec - start.tv_usec)); printf("%u\n", difft); Jura