Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 20 May 2004 10:10:16 -0700
From:      John-Mark Gurney <gurney_j@efn.org>
To:        JG <amd64list@jpgsworld.com>
Cc:        freebsd-amd64@freebsd.org
Subject:   Re: Why is MySQL nearly twice as fast on Linux/AMD64 Vs. FreeBSD/AMD64?
Message-ID:  <20040520171016.GA60558@funkthat.com>
In-Reply-To: <5.2.0.9.2.20040520094801.0436d208@mail.ojoink.com>
References:  <200405191211.25786.peter@wemm.org> <20040519172913.GU601@funkthat.com> <5.2.0.9.2.20040519052743.04365f78@mail.ojoink.com> <5.2.0.9.2.20040519060611.0435f750@mail.ojoink.com> <20040519172913.GU601@funkthat.com> <5.2.0.9.2.20040520041642.03db2188@mail.ojoink.com> <5.2.0.9.2.20040520085802.015fc2d0@mail.ojoink.com> <5.2.0.9.2.20040520094801.0436d208@mail.ojoink.com>

next in thread | previous in thread | raw e-mail | index | archive | help
JG wrote this message on Thu, May 20, 2004 at 09:53 -0700:
> Is there some kind test I can run to find out if SMP is actually being used 
> efficiently or not?
> 
> John-Mark said something earlier about watching output of "vmstat -w 1" and 
> if the ID's don't
> drop below 20 then I am probably only using a single CPU. Well, I hope 
> that's not the case
> because I ran that while cvsup was compiling (it just finished) and the 
> ID's never dropped
> below 50.

Well, there is two parts to SMP, one is the OS seeing the CPU, which
is probably happening, since you don't see the idle time drop below
50%...  to check how many cpu's FreeBSd sees, run:
sysctl hw.ncpu
I get:
-bash-2.05b$ sysctl hw.ncpu
hw.ncpu: 2
On a dual proc box..

The next part is if the program makes use of either multiple processes,
or a threading library like libpthread that will support concurent threads
of execution...   This last part is the problem you are having...  There
seems to be a problem with libpthread not starting another kse (iirc)
to support the extra cpu...

You can run ps -H durning the mysql run, and you should see multiple
entries for the mysql daemon.

-- 
  John-Mark Gurney				Voice: +1 415 225 5579

     "All that I will do, has been done, All that I have, has not."



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040520171016.GA60558>