View previous topic :: View next topic |
Author |
Message |
jhboricua Tux's lil' helper


Joined: 07 May 2002 Posts: 113
|
Posted: Mon Nov 17, 2003 7:18 am Post subject: Samba 3 write performance issues |
|
|
I'm seeing some odd behavior since I installed Samba 3 on my home server. Reads from samba shares give a constant rate of roughly 50Mbps. The below image was done while copying 700megs of data from one share on the samba server.
[img:3f6084ca34]http://www.ascc.biz/sambaread.jpg[/img:3f6084ca34]
However, when I write the same date back to the samba share, performance is very bad. Often going from 50Mbps down to less than 1Mbps and then up again, and resulting in almost double the time for the transfer to finish.
[img:3f6084ca34]http://www.ascc.biz/sambawrite.jpg[/img:3f6084ca34]
Any insights on this? I also notice that sometimes it takes a good 5 to 8 seconds for a share to display its contents when I open it up in XP machine. I don't remember seeing this on the 2.2.8 release I had before.
My smb.conf [global] section is as follows: Code: |
log file = /var/log/samba/log.%m
smb passwd file = /etc/samba/private/smbpasswd
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
username map = /etc/samba/user.map
encrypt passwords = yes
hosts allow = 192.168.4. 127.
wins support = yes
dns proxy = no
netbios name = Magi
server string = Samba Server %v
local master = yes
workgroup = JHBORICUA
os level = 33
security = share
preferred master = yes
max log size = 50
log level = 3
; printing = cups
|
|
|
Back to top |
|
 |
Janne Pikkarainen Veteran


Joined: 29 Jul 2003 Posts: 1143 Location: Helsinki, Finland
|
Posted: Mon Nov 17, 2003 2:07 pm Post subject: |
|
|
To verify this is a purely Samba-related problem, could you test XP-->Samba speed with another protocol, for example by setting up a ftp-server and see if it works faster than Samba?
You could also try to modify these buffer sizes:
Code: | socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192 |
Maybe 32768 or 65536 would work faster? _________________ Yes, I'm the man. Now it's your turn to decide if I meant "Yes, I'm the male." or "Yes, I am the Unix Manual Page.". |
|
Back to top |
|
 |
jhboricua Tux's lil' helper


Joined: 07 May 2002 Posts: 113
|
Posted: Tue Nov 18, 2003 7:52 am Post subject: |
|
|
Well I did a ftp session and downloading is even better and constant, which is to be expected. However, again when uploading it still has those drops to 0%, only this time they were brief compared to Samba's. Repeating, like with Samba, but it wouldn't stall for long, about a second for it to go back up. In Samba the transfer would stall for 2-4 seconds before resuming. |
|
Back to top |
|
 |
Janne Pikkarainen Veteran


Joined: 29 Jul 2003 Posts: 1143 Location: Helsinki, Finland
|
Posted: Tue Nov 18, 2003 8:38 am Post subject: |
|
|
Maybe there's some kind of network problem, like a NIC operating in half duplex mode even though it should be full duplex. TCP has a tendency to drop speed quite a lot when it detects problems and try again with full speed later, so the symptoms do match in a way.
Does /sbin/ifconfig report any collisions or errors? Or if the any of the network adapters in XP or Linux box has auto-negotiation turned on, try to turn it off and force it to be 100 Mbit/s full duplex. _________________ Yes, I'm the man. Now it's your turn to decide if I meant "Yes, I'm the male." or "Yes, I am the Unix Manual Page.". |
|
Back to top |
|
 |
jhboricua Tux's lil' helper


Joined: 07 May 2002 Posts: 113
|
Posted: Wed Nov 19, 2003 6:51 am Post subject: |
|
|
Well, I swaped NIC cards moved them to different PCI slots and spent about half a day trying different things to no avail. The same behavior no matter what NIC card I used or where it sit on the mobo.
Then I though, lets try another kernel. See, I'm using the gentoo-stable sources, gs-sources-2.4.23_pre8. So I decided to go vanilla, copied my .config from the gs-sources folder and compiled a vanillla kernel. Rebooted, and started testing again. Guess what? Not a hiccup, no stalling. If only I had thought of it sooner. |
|
Back to top |
|
 |
Janne Pikkarainen Veteran


Joined: 29 Jul 2003 Posts: 1143 Location: Helsinki, Finland
|
Posted: Wed Nov 19, 2003 7:18 am Post subject: |
|
|
Wow. That's interesting. I haven't had any write performance issues with gs-sources, but then again, I haven't done too much "hmm... I wonder how high sustained r/w speed we can get" testing. _________________ Yes, I'm the man. Now it's your turn to decide if I meant "Yes, I'm the male." or "Yes, I am the Unix Manual Page.". |
|
Back to top |
|
 |
madmango Guru


Joined: 15 Jul 2003 Posts: 507 Location: PA, USA
|
Posted: Wed Nov 19, 2003 11:23 am Post subject: |
|
|
lowering the log level will yeild faster performance, but not that much faster. _________________ word. |
|
Back to top |
|
 |
ctacat n00b

Joined: 17 Feb 2003 Posts: 12
|
Posted: Wed Nov 19, 2003 1:59 pm Post subject: |
|
|
I had the exact same problem with samba 2.x some months ago.
I tried everything I can imagine (changing the NICs, changing the cables, changing the switch keeping NICs, transforming client to server and the server to client, trying several different kernels with several different configurations). A lot of wasting time and money !
The problem disappeared when I changed the switch AND the NIC of the server. |
|
Back to top |
|
 |
|