From owner-freebsd-stable@FreeBSD.ORG Mon Nov 19 14:02:48 2007 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A7D8B16A468 for ; Mon, 19 Nov 2007 14:02:48 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.freebsd.org (Postfix) with ESMTP id 8A8DF13C45A for ; Mon, 19 Nov 2007 14:02:48 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [209.31.154.41]) by cyrus.watson.org (Postfix) with ESMTP id D0ACA472AB; Mon, 19 Nov 2007 09:04:59 -0500 (EST) Date: Mon, 19 Nov 2007 14:02:25 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Alexey Popov In-Reply-To: <4741905E.8050300@chistydom.ru> Message-ID: <20071119140019.V80667@fledge.watson.org> References: <4741905E.8050300@chistydom.ru> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-stable@freebsd.org Subject: Re: 2 x quad-core system is slower that 2 x dual core on FreeBSD X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Nov 2007 14:02:48 -0000 On Mon, 19 Nov 2007, Alexey Popov wrote: > I tried Linux and it works much better than old (2 x dual-core) backends. It > handles 2 times more requests than FreeBSD on the old backends. So there's a > real scalability problem in FreeBSD. The more processors it have the more > CPU time it consumes. > > Also I faced the same problem moving heavily loaded MySQL-server to new > hardware. That time I thought that the problem is in the mysql-server itself > and I had to install Linux. > > See in attach: mutex statistics for quad-core system and dmesg and vmstat > for dual- and quad-core systems. > > What can I do to make FreeBSD run faster on many-CPU systems??? Have you configured libmap.conf to force MySQL to use libthr instead of libpthread? libpthread is known to have serious performance bottlenecks for MySQL as compared to libthr. FreeBSD 7 contains significant optimization for increased numbers of cores, and is where a lot of the work optimizing MySQL has ended up. I see you're trying out a 6.3 beta, any chance you could try out a 7.0 beta instead? Also, consider switching to "options SCHED_ULE" in the 7.0 kernel rather than "options SCHED_4BSD". Robert N M Watson Computer Laboratory University of Cambridge