Alexander 'Leo' Bergolth
2009-Mar-04 12:56 UTC
[Samba] performance problem with 3.2.8: unbuffered reads for some users
Hi! 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.. When are those buffering parameters negotiated? Do you have any idea why the behavior depends on the connected user? Any hints how I could further track down this problem? Cheers, --leo The test was done using 2 byte reads on the windows box: perl -le 'sysopen(F, "R:/firefox/LICENSE", O_RDONLY); do { $n= sysread(F, $buf, 2) } while ($n)' The result can be found here: smbadmin (buffered reads): http://leo.kloburg.at/tmp/samba/smbadmin-tshark.txt abergolth (unbuffered reads, same box): http://leo.kloburg.at/tmp/samba/abergolth-tshark.txt smb.conf http://leo.kloburg.at/tmp/samba/smb.conf -- e-mail ::: Leo.Bergolth (at) wu-wien.ac.at fax ::: +43-1-31336-906050 location ::: IT-Services | Vienna University of Economics | Austria
Volker Lendecke
2009-Mar-04 13:10 UTC
[Samba] performance problem with 3.2.8: unbuffered reads for some users
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.> 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. If this is the case, then it is intended behaviour, because the clients lost their oplocks. You might need to restructure your application to not do 2 byte read requests. Volker -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available Url : http://lists.samba.org/archive/samba/attachments/20090304/496d0018/attachment.bin