Eliminating gettimeofday from construct_reply
rsharpe at ns.aus.com
Thu Aug 1 10:39:01 GMT 2002
Here is some profiling data from Samba. I profiled around each of the
GetTimeOfDay calls in construct_reply. So, it does not count all
gettimeofday calls. I was more interested in the fastpath.
I then ran a test that read a single 50MB file from the server. The file
would pretty much be in cache as I wrote it there a few minutes before and
I have 2GB on the server.
Here are the non-zero syscall values:
All times are in microseconds.
Firstly, my earlier assertion that gettimeofday is about as costly as
fstat is off by about a factor of two.
Secondly, this code includes the sendfile patch, and the read times are
all the time attributed to sendfile.
The overall cost of gettimeofday seems to be less than 1% here and would
be smaller in a more realistic mix.
Richard Sharpe, rsharpe at ns.aus.com, rsharpe at samba.org,
sharpe at ethereal.com
More information about the samba-technical