View previous topic :: View next topic |
Author |
Message |
digrouz Tux's lil' helper
Joined: 19 Feb 2005 Posts: 124 Location: Mouscron, Belgium
|
Posted: Wed Jan 25, 2012 12:16 pm Post subject: samba read performances |
|
|
Hello,
I've a nas server installed with gentoo. I've good performances in ftp (read and write) and in write with samba. What I feel strange, is that I've less performances with samba in read (about half of the write speed).
It's something like that:
ftp read: 100Mo/s
ftp write: 100Mo/s
Samba write: 95 Mo/s
Samba read: 45Mo/s
I did the test several times with files of about 2Go and I got all the time nearly the same results.
How to explain that? and also how to improve that read speed?
Here is my smb.conf:
Code: |
[global]
workgroup = USERSHARE
server string = Samba Server %v
printcap name = /dev/null
load printers = no
printable = no
printing = bsd
interfaces = lo eth0
bind interfaces only = yes
hosts allow = 127.0.0.1 192.168.0.0/24
hosts deny = 0.0.0.0/0
netbios name = SMBSRV
security= share
guest ok = yes
log file = /var/log/samba/log.%m
log level= 1
max log size = 50
local master = no
dos charset = CP850
unix charset = UTF-8
display charset = UTF-8
aio read size = 65536
aio write size = 65536
aio write behind = true
socket options = SO_KEEPALIVE TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=65536 SO_SNDBUF=65536
min receivefile size = 131072
max protocol = smb2
use sendfile = yes
preferred master = yes
strict sync = no
sync always = no
[usershare]
comment = shared folder
path = /mnt/data
valid users = myuser
guest ok = no
browseable = yes
writable = yes
|
_________________ There are 10 types of people in the world: those who understand binary, and those who don't. |
|
Back to top |
|
|
enihcam n00b
Joined: 09 Dec 2011 Posts: 8
|
Posted: Thu Aug 22, 2013 5:15 am Post subject: Re: samba read performances |
|
|
Change
Code: |
socket options = SO_KEEPALIVE TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=65536 SO_SNDBUF=65536
|
to
Code: |
socket options = SO_KEEPALIVE TCP_CORK IPTOS_THROUGHPUT
|
1. 'TCP_NODELAY IPTOS_LOWDELAY' only benefits interactive console, e.g. telnet.
2. Do not use 'SO_RCVBUF/SO_SNDBUF', so linux kernel can automatically adjust them to the best values.
3. sendfile() always befriends with TCP_CORK, whereas it with TCP_NODELAY is a nightmare. |
|
Back to top |
|
|
enihcam n00b
Joined: 09 Dec 2011 Posts: 8
|
Posted: Sat Aug 24, 2013 1:58 am Post subject: Re: samba read performances |
|
|
enihcam wrote: | Change
Code: |
socket options = SO_KEEPALIVE TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=65536 SO_SNDBUF=65536
|
to
Code: |
socket options = SO_KEEPALIVE TCP_CORK IPTOS_THROUGHPUT
|
1. 'TCP_NODELAY IPTOS_LOWDELAY' only benefits interactive console, e.g. telnet.
2. Do not use 'SO_RCVBUF/SO_SNDBUF', so linux kernel can automatically adjust them to the best values.
3. sendfile() always befriends with TCP_CORK, whereas it with TCP_NODELAY is a nightmare. |
Sorry, I forgot to mention:
Before enable TCP_CORK, in 'static const smb_socket_option socket_options[]'@/lib/util/util_net.c you need to add:
"
{"TCP_CORK", IPPROTO_TCP, TCP_CORK, 0, OPT_BOOL},
" |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|