LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 11-06-2014, 12:02 AM   #1
furtivefox
LQ Newbie
 
Registered: Jan 2008
Distribution: Ubuntu
Posts: 10

Rep: Reputation: 0
Windows Linux TCP slow speeds


I was transferring files from my xubuntu computer, to my Windows 8 computer, using Samba, when I noticed the speeds were much slower than I remembered.

This lead me to test out my LAN speeds.
I used this nice program I found called netio.
I did several tests.

Windows to Linux using TCP: ~1180KB/s
Windows to Linux using UDP: ~11MB/s
Linux to Windows using TCP: ~1160KB/s
Linux to Windows using UDP: ~11MB/s
Windows to Windows using TCP: ~11MB/s
Windows to Windows using UDP: ~11MB/s
Linux to Linux using TCP: ~11MB/s
Linux to Linux using UDP: ~11MB/s

I used several computers to test all this.
The main computers I'm concerned about, have Windows 8, and xubuntu 14.10. I also used other computers with lubuntu 14.10 and Windows XP, and Windows 7.

The TCP speeds between Windows and Linux are slow.
Using SCP, Samba, and of course the netio progam, all gave around the same results, ~1MB/s

I can't understand what's going on.
Any help would be greatly appreciated.

If nothing else, is there a way to transfer files using UDP?
 
Old 11-06-2014, 01:27 AM   #2
vishesh
Member
 
Registered: Feb 2008
Distribution: Fedora,RHEL,Ubuntu
Posts: 661

Rep: Reputation: 66
You can use NetCat (nc) utility on linux and start a udp port for file transfer.

Thanks
 
Old 11-06-2014, 03:52 AM   #3
jlcostinha
LQ Newbie
 
Registered: Oct 2014
Posts: 7

Rep: Reputation: Disabled
add this to samba.conf and see if it helps.

Quote:
aio read size = 643638
aio write size = 643638
aio write behind = false
socket options = TCP_NODELAY SO_RCVBUF=262144 SO_SNDBUF=262144 IPTOS_LOWDELAY SO_KEEPALIVE
 
Old 11-06-2014, 02:40 PM   #4
furtivefox
LQ Newbie
 
Registered: Jan 2008
Distribution: Ubuntu
Posts: 10

Original Poster
Rep: Reputation: 0
I added the edits to my smb.conf like jlcostinha suggested, but it did not provide an improvement.
When researching the samba side, everything I turned up said setting socket options is better left up to the kernel.

I was able to get netcat to work, but it is definitely not an ideal solution.
When using UDP, you're unable to tell when a file has finished transferring.

Thanks for the help jlcostinha and vishesh.

Last edited by furtivefox; 11-06-2014 at 03:00 PM.
 
Old 11-06-2014, 07:57 PM   #5
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,984

Rep: Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626
Look at system loads. May have to set checksum offload to card if cpu use is high.

Do other tests too. Use ftp from source maybe.
 
Old 11-07-2014, 04:45 PM   #6
furtivefox
LQ Newbie
 
Registered: Jan 2008
Distribution: Ubuntu
Posts: 10

Original Poster
Rep: Reputation: 0
I ran top while running netio in a different GNU Screen.
CPU usage was ~1%
I thought maybe this could be a factor, since this is a quite old computer.
AMD Athlon XP 2900+, at 2GHz with 2GB DDR

I'm not that great when it comes to Linux stuff, but after researching I tried disabling tx offloading just to see if it would help.
When I ran:
Code:
sudo ethtool -K eth0 tx off
I got:
Code:
Cannot change tx-checksumming
Could not change any device features
I tried setting up an FTP server on the xubuntu computer, and the results were the same.
~1MB/s

I keep thinking that Linux is the problem, but maybe instead Windows is some how the problem.
I still can not understand why speeds to/from the xubuntu computer are fine with another linux OS,
but TCP with Windows is slow. I'm going to try an older version of Ubuntu and maybe other distros and see if it has anything to do with me upgrading to Ubuntu Utopic 14.10.

--EDIT--
Well, I feel like quite an idiot.
I did a reset of all the routers in the environment, and sure enough everything is working fine now.
I don't know why I didn't think of this earlier.
I'll close this thread now.

Thanks again for the help everyone.

Last edited by furtivefox; 11-07-2014 at 05:20 PM.
 
Old 11-07-2014, 08:29 PM   #7
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,984

Rep: Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626
Thanks for the update and solution.

Interesting solution too. I would not have guessed it right off but now that you mention it's a good idea.
 
Old 11-07-2014, 08:29 PM   #8
ember1205
Member
 
Registered: Oct 2014
Posts: 176

Rep: Reputation: 16
UDP is stateless. Every packet is sent with the "hope" that it will arrive. TCP is stateful and performs checks to ensure that the data arrives correctly. I've seen transfer speeds go through the floor when one machine has a duplex mismatch between its NIC and the switch. Resetting your network likely fixed this issue.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
dl speeds slow behind linux router guggenheim Linux - Networking 3 03-25-2004 02:52 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 10:54 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration