Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 05 Jun 2008 22:53:18 +0200
From:      Kris Kennaway <kris@FreeBSD.org>
To:        Kirk Strauser <kirk@strauser.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Poor read() performance, and I can't profile it
Message-ID:  <4848523E.2010604@FreeBSD.org>
In-Reply-To: <200806051508.29424.kirk@strauser.com>
References:  <200806051508.29424.kirk@strauser.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Kirk Strauser wrote:
> I'm running a command (dumprecspg from my XBaseToPg project) on a FreeBSD 7
> server.  I've noticed that throughput on that program is a lot lower than I
> would have expected, and further investigation found it spending most of its
> time in the kernel, presumably in read() [1].
> 
> I was testing the same software on my desktop PC when I noticed that it ran
> *much* faster, and found that it was spending only about 1% as much time in
> the kernel on Linux as it was on FreeBSD.
> 
> I ran a quick-and-dirty comparison of the same software on two different
> machines, the FreeBSD server being by far the more powerful of the two.  I
> ran the same command on both machines from various filesystems (to rule out
> differences in drive performance), and posted the output of zsh's "time"
> command for the fastest run in each setting.  The results are below.
> 
> Any ideas what could be causing this horrible performance?  I'm willing to
> try just about anything.

ktrace(1) and check for the buffer size in use.  It is probably too small.

Kris




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4848523E.2010604>