From owner-freebsd-stable@FreeBSD.ORG Mon Dec 24 15:49:51 2007 Return-Path: Delivered-To: stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2A9D316A418 for ; Mon, 24 Dec 2007 15:49:51 +0000 (UTC) (envelope-from brett@lariat.net) Received: from lariat.net (lariat.net [66.119.58.2]) by mx1.freebsd.org (Postfix) with ESMTP id AC06F13C4CE for ; Mon, 24 Dec 2007 15:49:50 +0000 (UTC) (envelope-from brett@lariat.net) Received: from anne-o1dpaayth1.lariat.org (IDENT:ppp1000.lariat.net@lariat.net [66.119.58.2]) by lariat.net (8.9.3/8.9.3) with ESMTP id IAA19650; Mon, 24 Dec 2007 08:49:41 -0700 (MST) Message-Id: <200712241549.IAA19650@lariat.net> X-Mailer: QUALCOMM Windows Eudora Version 7.1.0.9 Date: Mon, 24 Dec 2007 08:49:36 -0700 To: Scott Long From: Brett Glass In-Reply-To: <476FBED0.2080400@samsco.org> References: <200712220531.WAA09277@lariat.net> <476FBED0.2080400@samsco.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Cc: stable@freebsd.org Subject: Re: SMP on FreeBSD 6.x and 7.0: Worth doing? 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, 24 Dec 2007 15:49:51 -0000 At 07:14 AM 12/24/2007, Scott Long wrote: >Brett, > >There could be several problems here: > >1. WITNESS, INVARIANTS, malloc debugging. Are any of these turned on for you? I don't recall if malloc debugging got turned off yet for the >7.0 snapshots. I nuked debugging when I recompiled the kernel with SCHED_ULE. >2. Disk subsystem. What kind of disk controller are you using? Not all >drivers work well in FreeBSD. Are linux and freebsd using identical >hardware? They were. The drives are SATA. >3. Directory hashing. If you're using squid, you __must__ tune the DIRHASH, otherwise you'll spend a lot of time doing pathname lookups. What filesystem is linux using? Whatever comes standard with Ubuntu. As for directory hashing: Squid doesn't use more than 256 entries in each one, so that's what I normally set. I also normally do a newfs with parameters that favor the distribution of object sizes found in Web caches. (We did this on both Linux and FreeBSD.) >Would you mind if I logged into your test system and looked around to >help diagnose the problem? The system isn't online now, because it's been a week since the tests and I also wanted to try the 6.3 beta and a few hardware changes. My guess, based on what I saw, is that UFS2 doesn't take as much advantage of SMP as Linux's file system does and threads are blocking on file I/O. (Networking does not seem to be the botteneck, though I have heard that the IP stack in 7-CURRENT needs optimization and that this had been proposed as a sponsored project.) --Brett P.S. -- If the chip manufacturers were not making it so that one needs to go to SMP to get more processing power, I wouldn't be doing SMP. I'd rather use FreeBSD 4.11 on a single core "gaming" CPU, as I did a few years ago when I needed a very fast server. But this isn't a viable option nowadays....