[OpenAFS-devel] fileserver profiling

Nickolai Zeldovich kolya@MIT.EDU
Thu, 3 Mar 2005 21:12:00 -0500 (EST)


On Wed, 2 Mar 2005, Tom Keiser wrote:

> I've been profiling the pthreaded fileserver for a while now, and one
> thing continues to bother me.  We call the time() syscall so
> frequently that it's often 20% of our total execution time.

I feel that you might be barking up the wrong tree here.  From what I've
seen, the fileserver is rarely limited by CPU speed.  Making it use 20%
less CPU, or 20% more CPU isn't going to make a big difference -- there's
lots of processor cycles that aren't being used anyway.  The bottleneck is
more likely to be in disk seeks, context switches, the network stack, or
what have you.

It looks like you used dtrace for profiling the fileserver, so it might be
interesting to see if you can use dtrace to get some insight into what's
going on with the system as a whole -- is the fileserver spending lots of
time waiting for disk seeks, going through the UDP send/receive code path,
or something else?  Perhaps we aren't coalescing small reads and writes
somewhere?  I haven't used dtrace myself, so I can't say whether this
would be easy or hard to do..

-- kolya