From owner-freebsd-questions Sat May 19 6:43:28 2001 Delivered-To: freebsd-questions@freebsd.org Received: from mr200.netcologne.de (mr200.netcologne.de [194.8.194.109]) by hub.freebsd.org (Postfix) with ESMTP id 08CDC37B424 for ; Sat, 19 May 2001 06:43:25 -0700 (PDT) (envelope-from pherman@frenchfries.net) Received: from husten.security.at12.de (dial-213-168-96-30.netcologne.de [213.168.96.30]) by mr200.netcologne.de (Mirapoint) with ESMTP id AFT41686; Sat, 19 May 2001 15:35:45 +0200 (CEST) Date: Sat, 19 May 2001 15:35:03 +0200 (CEST) From: Paul Herman To: "Jon O." Cc: Subject: Re: FreeBSD benchmark question In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Fri, 18 May 2001, Jon O. wrote: > You are correct that the genetic searches aren't real disk intensive but > rather CPU intensive. > > Are there some shell scripts or some way to isolate what the bottleneck > is? If you have the source, I would profile the program on both machines. Basically, you just compile the program with the "-pg" compiler flag, run the program, and then use gprof(1) to analyse the result from the programname.gmon file. However, the fact that you stated: > I have found the Linux box is much faster after running the > search once and then firing it off again. So, the first run of > the test the two machines are almost exactly as fast. leads me to believe that it is not CPU bound. In fact, it smells a lot like disk cache to me. Running "systat -v" on the FreeBSD machine (without anything else running) will tell you whether it is accessing the disk or hitting the namei cache. A quick & dirty check is '/usr/bin/time -l program' and looking at the "block input operations" the first time and second time you run the program to see if very many disk blocks are being read and cached for later. In any case, if you profile the code on each machine, you will definitely see where it ends up spending the most time. -Paul. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message