Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[Samba] Slow Samba transfer

57 views
Skip to first unread message

Mauro Condarelli

unread,
Feb 14, 2014, 3:30:03 AM2/14/14
to
Hi,
this is my first pos here, please be lenient.
My problem shuld be a FAQ and, in fact I found a lot of references
googling around, but nothing could really solve my problem, so here I am.

I have a Samba server:
Very basic wheezy amd64 installation on a small VIRTUAL server (Xen).
Only fancy thing is direct access to a couple of RAID1 (mirror) arrays
where data is stored.

I normally access data from Windows (mostly Seven) machines connected
either via ethernet GB hub (but some machines are 100MB) or via WLan(N).

Problem is throughput is generally low (about 1 mb/s) and, for really
big files (> 1Gb) it drops with time going to the range of few hunderd kb/s.

Transferring a 4Gb file takes HOURS.

I do not believe it's normal, is it?

I started with the plain wheezy-provided setup and tried to improve it
following several advices found around the net, but I did not see any
difference.

Things I tried are:

strict allocate = yes
read raw = yes
write raw = yes
strict locking = no
socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=65536
SO_SNDBUF=65536 SO_KEEPALIVE
min receivefile size = 16384
use sendfile = true
aio read size = 1
aio write size = 1
; vfs objects = aio_fork

in various combinations.
Last option does not seem to be supported in Wheezy:

[2014/02/14 00:47:09.185334, 0] smbd/vfs.c:173(vfs_init_custom)
error probing vfs module 'aio_fork': NT_STATUS_UNSUCCESSFUL
[2014/02/14 00:47:09.185397, 0] smbd/vfs.c:315(smbd_vfs_init)
smbd_vfs_init: vfs_init_custom failed for aio_fork
[2014/02/14 00:47:09.185440, 0] smbd/service.c:902(make_connection_snum)
vfs_init failed for service IPC$


What should I do?
Thanks in Advance
Mauro

--
To unsubscribe from this list go to the following URL and read the
instructions: https://lists.samba.org/mailman/options/samba

Chan Min Wai

unread,
Feb 14, 2014, 3:40:01 AM2/14/14
to
Dear Mauro,

if you are using the latest version on samba 3.x and above (as I can recall)
I would advise you to drop all the socket options and etc...


The new version of samba with the new linux kernel are able to adjust that
without much adjustment...

However, since your are behind the vm...
you might want to try a small fio test to see if the limit was vm or etc...

http://www.linux.com/learn/tutorials/442451-inspecting-disk-io-performance-with-fio

Hope this help...

L.P.H. van Belle

unread,
Feb 14, 2014, 4:00:01 AM2/14/14
to
Hai,

Im having the same setup here, and im able to get about 110MB/s+ so its a very low speed your getting.

i suggest the following, since im having almost nothing tunned in my smb.conf.
make a backup of your original smb.conf and start cleaning up.

remove all of these.
> strict allocate = yes
> read raw = yes
> write raw = yes
> strict locking = no
> socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=65536
>SO_SNDBUF=65536 SO_KEEPALIVE
> min receivefile size = 16384
> use sendfile = true
> aio read size = 1
> aio write size = 1
>; vfs objects = aio_fork

Im using the default config.

Which XEN are you running, XEN Server, or Debian XEN and which version.
And type samba -V and post your output.

There where some problems with pci passthrough on Debian Xen.

If you type on the guest, ethtool eth0 ( of 1 depends on your interface )
whats the speed your seeing?
and, dont test with wifi (yet), start testing on the cable (utp) first.
When your speed is ok with cable you can start testing with the wifi.
Wifi tunning is lots different..

Louis



>-----Oorspronkelijk bericht-----
>Van: mc5...@mclink.it [mailto:samba-...@lists.samba.org]
>Namens Mauro Condarelli
>Verzonden: vrijdag 14 februari 2014 0:51
>Aan: sa...@lists.samba.org
>Onderwerp: [Samba] Slow Samba transfer

L.P.H. van Belle

unread,
Feb 14, 2014, 4:00:04 AM2/14/14
to
also,

what i forgot, om only getting the 110Mb/s + because of format.
I formatted with 4Mb block size, since this is a Movie share on my server.
the "normal" music share are 1Mb blocks formated. ( about 80-100Mb/s )
all my other default. ( variable from about 60-100Mb/s )

and on debian you can do a apt-get install iotop
and type iotop, to see you read/write speeds on the server and which apps are working.

Louis

>-----Oorspronkelijk bericht-----
>Van: dcm...@gmail.com [mailto:samba-...@lists.samba.org]
>Namens Chan Min Wai
>Verzonden: vrijdag 14 februari 2014 9:37
>Aan: Mauro Condarelli
>CC: sa...@lists.samba.org
>Onderwerp: Re: [Samba] Slow Samba transfer

Johan Hendriks

unread,
Feb 14, 2014, 4:50:02 AM2/14/14
to
Mauro Condarelli schreef:
What way are you connected!, throug GB, 100mbit or Wlan?
If you use Wlan, expect slow transfers!

regards
Johan

Mauro Condarelli

unread,
Feb 14, 2014, 11:40:01 AM2/14/14
to
Thanks,
Comments below:

Il 14/02/2014 09:46, L.P.H. van Belle ha scritto:
> Hai,
>
> Im having the same setup here, and im able to get about 110MB/s+ so its a very low speed your getting.
>
> i suggest the following, since im having almost nothing tunned in my smb.conf.
> make a backup of your original smb.conf and start cleaning up.
>
> remove all of these.
>> strict allocate = yes
>> read raw = yes
>> write raw = yes
>> strict locking = no
>> socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=65536
>> SO_SNDBUF=65536 SO_KEEPALIVE
>> min receivefile size = 16384
>> use sendfile = true
>> aio read size = 1
>> aio write size = 1
>> ; vfs objects = aio_fork
Will do, but that is exactly the situation I started from (all defaults,
I mean).
Then I noticed the sslowness ands started adding things.
Nothing changed.
I will revert to basics.
>
> Im using the default config.
>
> Which XEN are you running, XEN Server, or Debian XEN and which version.
I'm using Debian XEN (xen-4.1).

> And type samba -V and post your output.
I assume You mean:
root@fileserver-pv-guest:~# smbd -V
Version 3.6.6

>
> There where some problems with pci passthrough on Debian Xen.
>
> If you type on the guest, ethtool eth0 ( of 1 depends on your interface )
> whats the speed your seeing?
uhm, I do not know ethtool and output seems a bit terse:
root@fileserver-pv-guest:~# ethtool eth0
Settings for eth0:
Link detected: yes

Perhaps I shoud use some options?

> and, dont test with wifi (yet), start testing on the cable (utp) first.
> When your speed is ok with cable you can start testing with the wifi.
> Wifi tunning is lots different..
Agreed.

>
> Louis
Mauro

Mauro Condarelli

unread,
Feb 14, 2014, 11:50:02 AM2/14/14
to
Server is connected through GB, current client is connected 100MB,
Switch is GB.

Mauro Condarelli

unread,
Feb 14, 2014, 11:50:02 AM2/14/14
to
Il 14/02/2014 09:50, L.P.H. van Belle ha scritto:
> also,
>
> what i forgot, om only getting the 110Mb/s + because of format.
> I formatted with 4Mb block size, since this is a Movie share on my server.
> the "normal" music share are 1Mb blocks formated. ( about 80-100Mb/s )
> all my other default. ( variable from about 60-100Mb/s )
>
> and on debian you can do a apt-get install iotop
> and type iotop, to see you read/write speeds on the server and which apps are working.

iotop gives higly variable values, but they are consistent with transfer
speed: 200..1100 Kb/s

If I am not using Samba, but simply read a big file (cp file /dev/null)
I get 70Mb/s.
Still slow, but two orders of magnitude better!
0 new messages