From owner-freebsd-threads@FreeBSD.ORG Sun May 23 13:11:47 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 48F8416A4CE for ; Sun, 23 May 2004 13:11:47 -0700 (PDT) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 03D6643D1F for ; Sun, 23 May 2004 13:11:47 -0700 (PDT) (envelope-from eischen@vigrid.com) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mail.pcnet.com (8.12.10/8.12.1) with ESMTP id i4NKBM8Q002965; Sun, 23 May 2004 16:11:22 -0400 (EDT) Date: Sun, 23 May 2004 16:11:22 -0400 (EDT) From: Daniel Eischen X-Sender: eischen@pcnet5.pcnet.com To: JG In-Reply-To: <5.2.0.9.2.20040523102747.015557e8@mail.ojoink.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=X-UNKNOWN Content-Transfer-Encoding: QUOTED-PRINTABLE cc: freebsd-threads@freebsd.org 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 20:11:47 -0000 On Sun, 23 May 2004, JG wrote: > 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%. >=20 > You mean where I have the 3 instances of mysqld running in top? You have= =20 > ~30 instances? >=20 > Why would your box use more? Is there any configuration or flag in mysql= =20 > that would cause this? >=20 > How was your mysql compiled? What version of FreeBSD are you running? >=20 > >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 lin= ux=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)= =2E >=20 > 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? Doesn't Linux use HZ=3D1000 by default now and FreeBSD is still at HZ=3D100= ? Could that affect anything? --=20 Dan Eischen