From owner-freebsd-current@FreeBSD.ORG Mon Sep 15 02:39:41 2008 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AF5BF106566B for ; Mon, 15 Sep 2008 02:39:41 +0000 (UTC) (envelope-from josh.carroll@gmail.com) Received: from yx-out-2324.google.com (yx-out-2324.google.com [74.125.44.30]) by mx1.freebsd.org (Postfix) with ESMTP id 5F93C8FC1D for ; Mon, 15 Sep 2008 02:39:41 +0000 (UTC) (envelope-from josh.carroll@gmail.com) Received: by yx-out-2324.google.com with SMTP id 8so573992yxb.13 for ; Sun, 14 Sep 2008 19:39:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:reply-to :to:subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=/+9IoMSXRWB5DiO3+31PuMX1sxMfqDUTKWQsBxjb6+c=; b=BnWEWWl4z+DI4jpf3WBtv78w8CYrPnfBjIzxrShGZL0JxPsa6KoAtRXTMU36jPQwrN z+3fr/m1Gh0wGHvmDoI5nYQRNOvkUcwoItyjhTUao3suBxIJaVUoizgsNmr/fljTwxn5 i3fR1XhKezQowrQqlBt4rHKjXjqLiNS94AErM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:reply-to:to:subject:cc:in-reply-to :mime-version:content-type:content-transfer-encoding :content-disposition:references; b=GFmVGBzKnd1ybq0UVlgwLfsNnfRi8zsVz0CmZog7QX7+f3qYGyLG2UGoN0JlW85Tv/ UIJNY+FmU0Z+GDfMgH5kY9/DGdjSPZ5g6Geq3rOzF3xjcj7GuNgigQED5Jnb7b5lAvlk exh6nmtVN0ampXadNwiheOxu+cu2mJdlgIJtw= Received: by 10.150.98.18 with SMTP id v18mr2725175ybb.64.1221446380671; Sun, 14 Sep 2008 19:39:40 -0700 (PDT) Received: by 10.150.140.14 with HTTP; Sun, 14 Sep 2008 19:39:40 -0700 (PDT) Message-ID: <8cb6106e0809141939l99ebb62kea67172fe2fbd411@mail.gmail.com> Date: Sun, 14 Sep 2008 22:39:40 -0400 From: "Josh Carroll" To: "Stephen Montgomery-Smith" In-Reply-To: <48CDBC78.4010409@math.missouri.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <48CDBC78.4010409@math.missouri.edu> Cc: freebsd-current@freebsd.org Subject: Re: Improved multiprocessor usage on amd64 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: josh.carroll@gmail.com List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Sep 2008 02:39:41 -0000 On Sun, Sep 14, 2008 at 9:38 PM, Stephen Montgomery-Smith wrote: > I have a dual core amd64 on which I run a processor intensive numerical > program. I had been frustrated because it seemed to run 3 or 4 times faster > under Linux. But with a recent upgrade of FreeBSD-CURRENT, it now goes at > about the same speed as Linux. Which release/version were you running prior? Keep in mind, by default, various debugging knobs/etc are enabled in -current, so perhaps you went from a kernel with WITNESS/etc enabled to a kernel without these? I can run it here (on 7.1-PRERELEASE/amd64) if you'd like to send the source (to this address). > The program takes about an hour. For the first minute, the program runs > rather slowly, but then it is as if the operating system finds its way, and > suddenly it speeds up. "top -H" suggests that for the first minute that one > thread is going really slowly, and is perhaps being starved or something. Have you run a ktrace on it? That would be useful to see what's going on. > My question is - why is this happening, and is this something I should > expect? Are there certain switches or sysctls I can set to make it go fast > from the get go? Hard to say without seeing the code and knowing precisely what it does. Perhaps it's doing a lot of I/O up front or some preparations prior to the calculations? Regards, Josh