The need for a special SMB receive system call

Richard Sharpe rsharpe at
Wed Sep 25 22:41:01 GMT 2002

On Wed, 25 Sep 2002, Andrew Theurer wrote:

> > Every system call I can eliminate, or push into the kernel (as in the
> > fstat call in the sendfile code) means more CPU for yet another client and
> > gets us closer to handling 10,000 clients :-)
> FYI, my top three functions running netbench on linux are:
>   8867 total                                      0.0044
>    700 default_idle                              13.4615
>    689 __generic_copy_to_user                    11.4833
>    419 generic_file_write                         0.2272
> This would seem to support your theory.  Sendfile/zerocopy got me an easy 20% 
> improvement on netbench, and I would expect similar but slightly lower 
> improvement for recvfile (I think netbench has a little more reads than 
> writes).  

That is real interesting. I get pretty much what you expect. sendfile is a 
big win and buys me back lots of CPU when the data is in the cache, while 
recvfile gets me more write bandwidth, but the CPU is still pegged. 

We gotta get that data to stable storage of some sort on writes, although 
buffer recovery will allow much better close latencies :-)

Richard Sharpe, rsharpe at, rsharpe at, 
sharpe at

More information about the samba-technical mailing list