From owner-freebsd-smp@FreeBSD.ORG Wed Nov 5 09:44:46 2003 Return-Path: Delivered-To: freebsd-smp@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E4EE316A4CE for ; Wed, 5 Nov 2003 09:44:46 -0800 (PST) Received: from sdf.lonestar.org (ol.freeshell.org [192.94.73.20]) by mx1.FreeBSD.org (Postfix) with ESMTP id 02DC143FE0 for ; Wed, 5 Nov 2003 09:44:44 -0800 (PST) (envelope-from pieckiel@sdf.lonestar.org) Received: from sdf.lonestar.org (IDENT:pieckiel@vinland.freeshell.org [192.94.73.6]) by sdf.lonestar.org (8.12.10/8.12.10) with ESMTP id hA5HicOF010102; Wed, 5 Nov 2003 17:44:38 GMT Received: (from pieckiel@localhost) by sdf.lonestar.org (8.12.10/8.12.8/Submit) id hA5HicGV015787; Wed, 5 Nov 2003 12:44:38 -0500 (EST) Date: Wed, 5 Nov 2003 12:44:38 -0500 From: "Kevin A. Pieckiel" To: Jesse Guardiani Message-ID: <20031105174438.GA8014@SDF.LONESTAR.ORG> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.1i cc: freebsd-smp@freebsd.org Subject: Re: SMPng question X-BeenThere: freebsd-smp@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: FreeBSD SMP implementation group List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Nov 2003 17:44:47 -0000 On Wed, Nov 05, 2003 at 11:59:02AM -0500, Jesse Guardiani wrote: > 1.) What, exactly, are SMPng's advantages over the current > SMP implementation as related to userland apps? > > In other words, I know that the network stack and devices > and such will benefit by being able to make use of > multiple CPUs, but will normal non-multi-threaded apps > be able to use multiple CPUs? Or will an app still have > to be multi-threaded in order to take full advantage > of an SMP box? I'm sure others can comment more thoroughly on this than I can, but basically non-threaded processes won't concurrently use multiple CPUs. Afterall, they aren't threaded. But multiple non-threaded processes can run concurrently. One of the larger differences in this type of scenario will be when system calls are made by userland apps. With Giant, there is more contention for kernel resources, but with SMPng, this has been greatly relieved. This is where you can see some performance gains. > 2.) And, perhaps as an extension to question #1: Will I > be able to make use of multiple CPUs to compile programs? Yes, but only if you have multiple sources to compile. You're Hello World program won't compile any faster, but I'd imagine anything susceptible to concurrent compiling (using -j with make, for example) would see a benefit. However, this scenario is just a specific example of #1 above--multiple non-threaded programs (gcc in this case) running concurrently. > Could I buy one of those cheap $300 quad Xeon 500mhz > compaq boxes on ebay and use it as a 2 Ghz compiler box? No, not really; you're going to lose some performance in just keeping up with multiple processors. In other words, it's not a linear increase in performance when you add processors. However, if you have up to four things to actively do at the same time, then a quad Xeon computer will probably benefit you. Running a web and/or mail server, for example, where you have concurrent processes handling concurrent connections, is a good example. Running your favorite word processor while crunching WAV's to MP3's, probably. You'll notice less of a response-time lag over a single processor computer at the very least. Checking your E-Mail while browsing the Internet, you'll probably not notice anything different, and a single processor 2.0 GHz computer will probably be faster. Kevin