Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 19 May 2001 15:35:03 +0200 (CEST)
From:      Paul Herman <pherman@frenchfries.net>
To:        "Jon O." <jono@microshaft.org>
Cc:        <freebsd-questions@FreeBSD.ORG>
Subject:   Re: FreeBSD benchmark question 
Message-ID:  <Pine.BSF.4.33.0105191413490.29842-100000@husten.security.at12.de>
In-Reply-To: <Pine.BSF.4.10.10105181057280.39019-100000@stuart.microshaft.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.33.0105191413490.29842-100000>