[Samba] Samba server read issues

Bruno Mendoza brunomendoza at gmail.com
Thu Jul 2 19:48:24 UTC 2015


Hi all,

I set up a samba server into Debian 3.2.0-4-amd64. This runs as guest OS into VirtualBox machine over OS X host OS.

Connection seems pretty good:

$ iperf -s
------------------------------------------------------------
Server listening on TCP port 5001
TCP window size: 85.3 KByte (default)
------------------------------------------------------------
[  4] local 192.168.0.21 port 5001 connected with 192.168.0.20 port 52800
[ ID] Interval       Transfer     Bandwidth
[  4]  0.0- 4.0 sec   256 MBytes   541 Mbits/sec

$ iperf -c 192.168.0.20 -n 256M
------------------------------------------------------------
Client connecting to 192.168.0.20, TCP port 5001
TCP window size: 23.5 KByte (default)
------------------------------------------------------------
[  3] local 192.168.0.21 port 54463 connected with 192.168.0.20 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0- 3.2 sec   256 MBytes   674 Mbits/sec

But reading transfer speed is ridiculous:

$ mount -t smbfs //user at 192.168.0.21/www Workspace/www

####################################

$ time dd if=/dev/zero of=Workspace/www/testfile bs=8k count=32768
32768+0 records in
32768+0 records out
268435456 bytes transferred in 0.144830 secs (1853452167 bytes/sec)

real	0m2.714s
user	0m0.008s
sys	0m0.350s

####################################

$ time dd if=Workspace/www/testfile of=/dev/null bs=8k
32768+0 records in
32768+0 records out
268435456 bytes transferred in 61.248506 secs (4382727 bytes/sec)

real	1m1.271s
user	0m0.007s
sys	0m0.287s

As you can see, reading speed transfer rate is approximately 4,18 MB/s when the iperf test shows approximately 67,63 MB/s.

What’s wrong?

smb.conf file content is the following:

$ cat /etc/samba/smb.conf
[global]
	server string = %h server
	interfaces = eth0
	bind interfaces only = Yes
	map to guest = Bad User
	obey pam restrictions = Yes
	pam password change = Yes
	passwd program = /usr/bin/passwd %u
	passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
	unix password sync = Yes
	syslog = 0
	log file = /var/log/samba/log.%m
	max log size = 1000
	socket options = TCP_NODELAY IPTOS_DELAY
	dns proxy = No
	usershare allow guests = Yes
	panic action = /usr/share/samba/panic-action %d
	idmap config * : backend = tdb

[homes]
	comment = Home Directories
	valid users = %S
	create mask = 0700
	directory mask = 0700
	browseable = No

[services]
	comment = Services
	path = /srv/samba
	read only = No
	create mask = 0664
	directory mask = 0775

[www]
	comment = WWW
	path = /srv/samba/www
	read only = No
	create mask = 0664
	directory mask = 0775


Thanks,
Bruno.


More information about the samba mailing list