This is a discussion on slow streaming but fast copy - SMB ; Hi Group, I have some very strange problems with samba on my shiny new server. The first problem was that file transfers were very slow (copying a file of 700Mb took 50 minutes over 100Mbit network). I checked other protcols ...
I have some very strange problems with samba on my shiny new server.
The first problem was that file transfers were very slow (copying a
file of 700Mb took 50 minutes over 100Mbit network). I checked other
protcols (ftp/http/scp) on the server and they were able to use the
100Mbit link for full. After a lot of debugging, I found that the
problem was related to oplocks. When disabling oplocks, the same file
was copied in just under 2 minutes.
However a second problem occured. Although copying files of the samba
file share works perfectly, playing mp3 files of the share does not.
When I open up any mp3 player and want to play a file, it stutters and
it is impossible to listen to. With Winamp, I mangaged to get some
quality by setting the buffer to 100Mb but I don't want to do this at
every pc and in every mp3 client.
I tried different settings (tcp_nodelay, SNDBUF, SRVBUF, TCP_TOS) but
no effect there.
I also ran a tcpdump when copying a file (good) and when streaming a
file (bad) but there are no noticable differences there.
On the samba server, there is also a VMware server running so I tried
setting up a Win VM in there (on the same physical server) and when I
stream files from the Windows VM, I have no problems whatsoever
This leads me to believe that there is a problem with either samba or
the linux kernel.
The server specs are the following:
Hardware: Core 2 Duo 6600, 2 GB DDR RAM, 500 GB SATA, Asus Mobo with
Realtek 10/100/1000 NIC
OS: Debian Stable 3.1, Linux Version 220.127.116.11 SMP
SAMBA: 3.0.23d (from apt repository at samba.org)
panic action = /usr/share/samba/panic-action %d
workgroup = TESTGROUP
netbios name = server
server string = VDE Server
hosts allow = 18.104.22.168
printcap name = cups
load printers = yes
printing = cups
log file = /var/log/samba/log.%m
max log size = 500
log level = 1
security = user
encrypt passwords = true
passdb backend = tdbsam
smb passwd file = /etc/samba/smbpasswd
unix password sync = Yes
passwd program = /usr/bin/passwd %u
passwd chat = *New*UNIX*password* %n\n *ReType*new*UNIX*password*
%n\n *passwd:*all*authentication*tokens*updated*success fully*
socket options = TCP_NODELAY
oplocks = no
level2 oplocks = no
interfaces = 22.214.171.124/24
local master = yes
os level = 65
domain master = yes
preferred master = yes
time server = yes
domain logons = no
wins support = yes
dns proxy = yes
preserve case = yes
short preserve case = yes
case sensitive = no
path = /home/mp3
comment= MP3 disk
public = yes
guest ok = yes
writable = yes
printable = no
force user = nobody
force group = nogroup
Does anyone has a clue what might be wrong?
Oh yeah, the same smb.conf worked perfectly on the old server (with
oplocks enabled that is)