Date: Fri, 21 May 2004 09:41:29 +0900 From: Till Plewe <till@score.is.tsukuba.ac.jp> To: freebsd-amd64@freebsd.org Subject: Re: Why is MySQL nearly twice as fast on Linux/AMD64 Vs. FreeBSD/ AMD64? Message-ID: <20040521004129.GA8015%till@score.is.tsukuba.ac.jp> In-Reply-To: <B1D77424948FD611A3B80000C0109EEF02B734E2@SYNCRO>
index | next in thread | previous in thread | raw e-mail
On Thu, May 20, 2004 at 05:38:31PM -0400, Haapanen, Tom wrote: > John-Mark Gurney [mailto:gurney_j@efn.org]: > > 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... > > Right. Looking at my production server (dual Opteron 242) it looks like I > have essentially been running MySQL on a single CPU, too, based on the ps > output: > > root 11 0 0 0 RL ?? 61050:34.15 (idle: cpu1) > root 12 0 0 0 RL ?? 65468:56.13 (idle: cpu0) > > The idle time in the ps output should conclusively prove to JG, too, whether > both CPUs are actually being utilized. > > It sure doesn't look like the CPU time is evenly distributed across the two > processors -- it looks like MySQL is running on CPU1 only. > > I'm happy to provide access to the box if that will help someone figure out > what's going on with the threading. > > Tom Are you running SCHED_ULE? I had a similar problem which vanished when I switched back to SCHED_4BSD. - Tillhome | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040521004129.GA8015%till>
