From owner-freebsd-threads@FreeBSD.ORG Sun May 23 10:10:11 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 B8B1D16A4CF for ; Sun, 23 May 2004 10:10:11 -0700 (PDT) Received: from rms04.rommon.net (rms04.rommon.net [212.54.2.140]) by mx1.FreeBSD.org (Postfix) with ESMTP id B539E43D41 for ; Sun, 23 May 2004 10:10:10 -0700 (PDT) (envelope-from pete@he.iki.fi) Received: from he.iki.fi (h91.vuokselantie10.fi [193.64.42.145]) by rms04.rommon.net (8.12.10/8.12.9) with ESMTP id i4NH9p3v027995; Sun, 23 May 2004 20:09:51 +0300 (EEST) (envelope-from pete@he.iki.fi) Message-ID: <40B0DADE.1070605@he.iki.fi> Date: Sun, 23 May 2004 20:09:50 +0300 From: Petri Helenius User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040113 X-Accept-Language: en-us, en MIME-Version: 1.0 To: JG References: <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> In-Reply-To: <5.2.0.9.2.20040523090659.01628af8@mail.ojoink.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit 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 17:10:11 -0000 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 supersmack on fairly old machine (800MHz dual pentium) I get ~30 active mysql threads using CPU between 1.5% and 3.5%. I would suspect the test is limited by context switch and syscall overhead. With the old machine I see >70000 syscalls and >20000 context switches a second. So I suspect FreeBSD syscall overhead compared to linux must be higher. Mysql also asks for time repeatedly so make sure you are running ACPI timecounters. (donīt know if they are available on AMD64). With the old machine I got 1360 qps for the select test. (although itīs not idle, but doing light other work) Pete