[Samba] performance problem with 3.2.8: unbuffered reads for some users

Alexander 'Leo' Bergolth leo at strike.wu-wien.ac.at
Wed Mar 4 13:50:59 GMT 2009

On 03/04/2009 02:16 PM, Volker Lendecke wrote:
> On Wed, Mar 04, 2009 at 01:56:26PM +0100, Alexander 'Leo' Bergolth wrote:
>> I'm experiencing strange performance problems after upgrading to samba
>> 3.2.8 from 3.0.30.
>> For all users except smbadmin (who has administrative rights), read
>> performance is _very_ bad. Looking at the read-requests using filemon
>> and wireshark, I found out that for those users, every read is handled
>> transparently (unbuffered) over the net. (I.e. a 2 byte read-request of
>> the application leads to a 2 byte Read And X Request over the net.)
>> If the user is smbadmin, reads are block buffered. (A 2 byte
>> read-request of the same application as above leads to a 4096 byte Read
>> And X Request over the net.)
>> Clients are WinXP SP3.
>> For details, see my test below..
> Unfortunately, the log files do not show enough information
> about what is happening. Simple tshark output is not
> sufficient, see
> http://wiki.samba.org/index.php/Capture_Packets for more
> information on creating useful sniffs.

OK, here are more details:

Both files are produced with
perl -le "sysopen(F, \"R:/firefox/LICENSE\", O_RDONLY); do { $n=
sysread(F, $buf, 2) } while ($n)"

Unfortunately I cannot put the server in debug 10 mode now because there
are some clients connected...

>> When are those buffering parameters negotiated? Do you have any idea why
>> the behavior depends on the connected user?
> If it really depends on the connected user, then we need a
> debug level 10 log of smbd doing it. I would however suspect
> that this depends on the fact if a file is shared between
> two users or two applications on the same client box or not.

My test case was just reading the firefox LICENSE file, which isn't in
use by any other user. I can reproduce this behavior with arbitrary
other files.

e-mail   ::: Leo.Bergolth (at) wu-wien.ac.at
fax      ::: +43-1-31336-906050
location ::: IT-Services | Vienna University of Economics | Austria

More information about the samba mailing list