Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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.

share|improve this question
3  
"errors:72181" <-- You've got network problems. Might be a bad cable, NIC, exceptionally ancient gear... Is some old WiFi gear involved? –  Chris S Aug 16 '13 at 15:06
    
The router is an old Motorola Netopia 2247-62, and the laptop's plugged directly in to it. I'll try over WiFi though. –  Liam Aug 16 '13 at 15:11
2  
I would recommend install ethtool and look at RX buffer size (ethtool -g|--show-ring eth0) for you NIC and it statistics (ethtool -S|--statistics eth0) –  Dennis Yusupoff Aug 22 '13 at 7:41

2 Answers 2

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.

share|improve this answer
up vote 0 down vote accepted

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.