From owner-freebsd-threads@FreeBSD.ORG Sun May 23 10:33:43 2004 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6285716A4D0 for ; Sun, 23 May 2004 10:33:43 -0700 (PDT) Received: from ojoink.com (center.ojoink.com [216.65.123.180]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4950843D31 for ; Sun, 23 May 2004 10:33:43 -0700 (PDT) (envelope-from amd64list@jpgsworld.com) Received: (qmail 54675 invoked by uid 89); 23 May 2004 17:37:16 -0000 Received: from unknown (HELO MAINBX.jpgsworld.com) (amd64list@jpgsworld.com@24.10.96.33) by center.ojoink.com with SMTP; 23 May 2004 17:37:16 -0000 Message-Id: <5.2.0.9.2.20040523102747.015557e8@mail.ojoink.com> X-Sender: amd64list@jpgsworld.com@mail.ojoink.com X-Mailer: QUALCOMM Windows Eudora Version 5.2.0.9 Date: Sun, 23 May 2004 10:32:47 -0700 To: freebsd-threads@freebsd.org From: JG In-Reply-To: <40B0DADE.1070605@he.iki.fi> References: <5.2.0.9.2.20040523090659.01628af8@mail.ojoink.com> <5.2.0.9.2.20040522135338.0158cc50@mail.ojoink.com> <5.2.0.9.2.20040522100318.01598f50@mail.ojoink.com> <5.2.0.9.2.20040522052606.0156fd70@mail.ojoink.com> <5.2.0.9.2.20040521154458.01627688@127.0.0.1> <5.2.0.9.2.20040521154458.01627688@127.0.0.1> <5.2.0.9.2.20040522052606.0156fd70@mail.ojoink.com> <5.2.0.9.2.20040522100318.01598f50@mail.ojoink.com> <5.2.0.9.2.20040522135338.0158cc50@mail.ojoink.com> <5.2.0.9.2.20040523090659.01628af8@mail.ojoink.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1"; format=flowed Content-Transfer-Encoding: quoted-printable Subject: Re: Why is MySQL nearly twice as fast on Linux? X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 May 2004 17:33:43 -0000 At 08:09 PM 5/23/2004 +0300, you wrote: >JG wrote: > >> >> >> >>I am just a layman here, but what does this mean? >You seem to have a very small number of active threads. When I tried=20 >supersmack on fairly old machine (800MHz dual pentium) I get ~30 active=20 >mysql threads using CPU between 1.5% and 3.5%. You mean where I have the 3 instances of mysqld running in top? You have=20 ~30 instances? Why would your box use more? Is there any configuration or flag in mysql=20 that would cause this? How was your mysql compiled? What version of FreeBSD are you running? >I would suspect the test is limited by context switch and syscall=20 >overhead. With the old machine I see >70000 syscalls and >20000 context=20 >switches a second. So I suspect FreeBSD syscall overhead compared to linux= =20 >must be higher. Mysql also asks for time repeatedly so make sure you are=20 >running ACPI timecounters. (don=B4t know if they are available on AMD64). I know that this FreeBSD/AMD64 reports that it is using ACPI... how do I=20 find out if its using timecounters, or using them properly? FWIW... amd64f# cat /var/log/dmesg.today | grep ACPI ACPI APIC Table: Timecounter "ACPI-fast" frequency 3579545 Hz quality 1000 cpu0: on acpi0 pcib0: port 0xcf8-0xcff on acpi0 pci0: on pcib0 pcib1: at device 6.0 on pci0 pci3: on pcib1 pcib2: at device 10.0 on pci0 pci2: on pcib2 pcib3: at device 11.0 on pci0 pci1: on pcib3