Performance mismatch in get and put files!
rsharpe at richardsharpe.com
Wed Oct 8 05:45:34 GMT 2003
On 8 Oct 2003, Rajan Aggarwal wrote:
> Facing a weird behavior in "get" and "put" commands over samba.
> I have 2 linux(RedHat 9.0) machines running samba2.2.8. Followed the
> following sequence of steps:
> * [abc at localhost abc]$ smbclient //machine/test -U user -O TCP_NODELAY
> supplied the required password for "machine", which has the security
> type as "user"(i have an account on the remote machine).
> * smb:\> put <filename>
> * Subsequently, tried smb:\> get <filename>
> For the same file of any size greater than 32K, the speeds of transfer
> are different. There is a substantial difference of around 10K (speed of
> get being lesser). This difference goes on building up for larger files.
> Though an entirely different protocol FTP, the speeds of transfer were
> exactly same(no ambiguities). But this ruled out the possibility of
> difference due to mismatch in machine configurations.
> Could anyone provide a clue about it???
This could be explained by Samba using sendfile. I think the sendfile code
was in 2.2.8.
Sendfile is used with read&X and means that data does not have to be
copied from the file system to userspace and then back dow to the kernel
to be sent over the wire.
Richard Sharpe, rsharpe[at]ns.aus.com, rsharpe[at]samba.org,
More information about the samba-technical