Poor read() performance, and I can't profile it
kris at FreeBSD.org
Thu Jun 5 20:53:17 UTC 2008
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() .
> 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.
More information about the freebsd-questions