Short version: I have a Linux server (RHEL5) and a Windows 7 Professional laptop on a local wired network. Copying large files to the server gets gradually slower until it stops completely.
Long version
There is a Samba share on the server, which I can connect to, and I have read/write access.
All transfers from the server to the laptop work fine, but transfers from the laptop to the server seem to have their speed throttled, and sometimes fail completely.
Small files transfer ok, but files over about 2MB generally fail.
To test if this was a Samba issue or something else, I tried copying some files from the laptop to the server using scp
(Putty's pscp
). A 1MB file copies almost instantly, 2MB takes 3 minutes, and 3.7MB takes 18 minutes. So it is not specific to Samba.
Also, with both Samba and SCP I can copy several MB of very small files without issue.
What could be causing this behaviour? I would be very grateful for any advice.
Windows gives this error message:
There is a problem accessing H:\
Make sure you are connected to the network and try again
On the server, ifconfig
shows some errors:
eth0 Link encap:Ethernet HWaddr 00:22:19:AD:52:E2
inet addr:192.168.1.7 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::222:19ff:fead:52e2/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:4125439 errors:72181 dropped:0 overruns:0 frame:0
TX packets:3575918 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:4481289749 (4.1 GiB) TX bytes:581533090 (554.5 MiB)
Interrupt:169 Memory:dfdf0000-dfe00000
/var/log/messages
:
Aug 16 14:50:16 dev smbd[475]: [2013/08/16 14:50:16, 0] lib/util_sock.c:read_data(540)
Aug 16 14:50:16 dev smbd[475]: read_data: read failure for 4 bytes to client 192.168.1.12. Error = Connection reset by peer
Aug 16 14:50:16 dev smbd[475]: [2013/08/16 14:50:16, 0] lib/util_sock.c:write_data(568)
Aug 16 14:50:16 dev smbd[475]: write_data: write failure in writing to client 192.168.1.12. Error Broken pipe
Aug 16 14:50:16 dev smbd[475]: [2013/08/16 14:50:16, 0] lib/util_sock.c:send_smb(767)
Aug 16 14:50:16 dev smbd[475]: Error writing 75 bytes to client. -1. (Broken pipe)
/var/log/samba/smbd.log
:
[2013/08/16 14:50:16, 0] lib/util_sock.c:read_data(540)
read_data: read failure for 4 bytes to client 192.168.1.12. Error = Connection reset by peer
[2013/08/16 14:50:16, 0] lib/util_sock.c:write_data(568)
write_data: write failure in writing to client 192.168.1.12. Error Broken pipe
[2013/08/16 14:50:16, 0] lib/util_sock.c:send_smb(767)
Error writing 75 bytes to client. -1. (Broken pipe)
[2013/08/16 14:50:16, 1] smbd/service.c:make_connection_snum(1077)
liam-pc (192.168.1.12) connect to service external initially as user liam (uid=502, gid=502) (pid 529)
EDIT: If I boot into Ubuntu on the laptop I have no problem copying large files to the SMB share on the server. So the issue is either with Windows 7, or with the Windows 7/RHEL5 combination.
I ran
service network restart
and it seems to have fixed the problem. This seems a little strange, because the problem has been there with more that a year, and the server has been restarted several times since then. I copied a 365MB file to the server in 70s, averaging 5.2MB/s, with no error.It sounds like a network problem or an incompatibility between the Windows and Linux Samba´s versions.
Have you tried to plug the laptop directly to the server? If it runs right with Ubuntu it should not be the problem, but you can try.
You should take some traffic captures to see what it's really happen in your network. You can share it here and maybe we can find the problem.
If nothing else works you can try this analysis tool. I found it really interesting, you can upload a pcap file and they send you an analysis by email. As I could see, you can submit your problem in the form.
I encounter this problem due to the cheap D-link switches. For example DGS-1008D. This problem is same for smb and nfs.
I use wget and internal http server to identify problem with network:
You can use any host as internal http server by using python:
This will serves the files relative to the current directory on the server
Then use following command on client:
If you have a Gigabit network you should get speed around 90-100Mb/sec. If you have a 10-Mbit network you should get speed around 10Mb/sec.
This speeds can be reached on second attepmt to read, because the files are cached. Before as files will be cached you'll get you host disk read speed.
But If you encouter network issues with Ethernet you will receive 10 times less speed than normal
Turning off/on switch solves problem, but for some time.