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:  Bcast:  Mask:
          inet6 addr: fe80::222:19ff:fead:52e2/64 Scope:Link
          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


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 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 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)


[2013/08/16 14:50:16, 0] lib/util_sock.c:read_data(540)
  read_data: read failure for 4 bytes to client 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 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 ( 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.

  • 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) – Denis Yusupov Aug 22 '13 at 7:41

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.

| improve this answer | |

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.

| improve this answer | |

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:

wget http://static-http.example.local/1024mb_file -O /dev/null

You can use any host as internal http server by using python:

python -m SimpleHTTPServer 8000

This will serves the files relative to the current directory on the server

Then use following command on client:

wget http://host:8000/bigfile.tgz -O /dev/null

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.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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