Hi, I tested a little bit Samba with Windows vista and found serious performance issue regarding reading large files from Samba server. Computers that I tested Samba with were all identical computers equipped with 2,8 GHz Pentium D processors, 1 GB memory and 1 Gbit/s LAN. All computers have only external USB hard drives so that it is easier to change from operating system to another. First I tested performance with 160 MB tar.gz file and there were no problems. SMBClient from another Linux computer reads and writes about 45 MB/s. Performance on Vista Client was higher than this. Write was just a little bit under 50 MB/s and read 48 MB/s. Then I moved to larger files to make sure that I would get results that simulate better the environment, where I need Samba myself (Saving and reading 500-1000 MB images from and to Photoshop) . I chose 690MB Knoppix image. Read and write from SMBclient were 27 to 28 MB/s at average. Writing from Vista bursts at 50 MB/s and minimum was 28 MB/s leading to over 30 MB/s average. _Then to the problem_: Reading from Samba share gave bursts of 6 MB/s and repeated drops to 0,5 MB/s. I have same kind of problem also at home (at the moment 100 MB/s network) using same version of samba and nearly identical configuration file. SMBClient reads and writes ok but performance from Windows XP is poor (but in this case both reading and writing) Has anyone else encountered same behaviour and is there any workarounds for this. Linux systems that I use are Debian Sarge 3.1r5 and Samba version is 3.0.14a-3s. Thanks in advance, Mikko Pukki smb.conf global settings: [global] workgroup = ********* server string = %h server (Samba %v) dns proxy = no log file = /var/log/samba/log.%m max log size = 1000 syslog = 0 panic action = /usr/share/samba/panic-action %d encrypt passwords = true passdb backend = tdbsam guest obey pam restrictions = yes invalid users = root passwd program = /usr/bin/passwd %u passwd chat = *Enter\snew\sUNIX\spassword:* %n\n *Retype\snew\sUNIX\spassword:* %n\n . SO_RCVBUF=8192 SO_SNDBUF=8192 socket options = TCP_NODELAY
>Hi, >these problems have been discussed many times in the last weeks. >Solution: get rid of SO_RCVBUF=8192 and SO_SNDBUF=8192 and your speed >will increase. >modern kernels do a much better job in handling these buffersizes than >you can. >ChristophAnd because of those discussions I tried also without changing buffers and I also tried to change them to 16384 (I noticed that in first mail I sent modifiers are on the wrong line but they are correct in actual smb.conf). When at 8192 or 16384 it gave once a burst of 500 Mbit/s but it lasted only for half a second. Maybe something from previous transfer was buffered somewhere (I'm not an expert on CIFS and Vista is quite new for me). After that peak tansfer drops to ~5Mbit/s and rises to 60 Mbit/s and drops again. Average might be close to 40 Mbit/s. Those 60 Mbit peaks seem quite flat topped in task manager. It does this no matter what buffer sizes I have tried. With last configuration I was able to read 25MB/s from smbclient. If I recall correctly, I got best transfer speeds with smbclient when socket options were default. No matter what the settings are, writing from Vista to Samba is always faster than from another Linux machine using smbclient. I also tried NFS and SCP transfers and they lagged big time behind Samba. Kernel in Linux is 2.6.8-3 if that makes any difference. Would upgrading Samba help? There would only be one problem in updating from 3.0.14a-3s.. All the systems should use Sarge and that is newest version available. Mikko
On Thu, Feb 22, 2007 at 03:44:56PM +0200, Mikko Pukki wrote:> Hi, > > I tested a little bit Samba with Windows vista and found serious performance issue regarding reading large files from Samba server. Computers that I tested Samba with were all identical computers equipped with 2,8 GHz Pentium D processors, 1 GB memory and 1 Gbit/s LAN. All computers have only external USB hard drives so that it is easier to change from operating system to another. > > First I tested performance with 160 MB tar.gz file and there were no problems. SMBClient from another Linux computer reads and writes about 45 MB/s. Performance on Vista Client was higher than this. Write was just a little bit under 50 MB/s and read 48 MB/s. Then I moved to larger files to make sure that I would get results that simulate better the environment, where I need Samba myself (Saving and reading 500-1000 MB images from and to Photoshop) > . I chose 690MB Knoppix image. Read and write from SMBclient were 27 to 28 MB/s at average. Writing from Vista bursts at 50 MB/s and minimum was 28 MB/s leading to over 30 MB/s average. _Then to the problem_: Reading from Samba share gave bursts of 6 MB/s and repeated drops to 0,5 MB/s. > > I have same kind of problem also at home (at the moment 100 MB/s network) using same version of samba and nearly identical configuration file. SMBClient reads and writes ok but performance from Windows XP is poor (but in this case both reading and writing) > > Has anyone else encountered same behaviour and is there any workarounds for this. Linux systems that I use are Debian Sarge 3.1r5 and Samba version is 3.0.14a-3s.We've done some work on this for 3.0.25 - check out the new vfs_readahead module. Jeremy.