LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 12-12-2008, 07:55 PM   #1
Shwick
Member
 
Registered: Jun 2008
Posts: 112

Rep: Reputation: 15
Gigabit network slow samba, ftp, iperf?


I'm having many little problems with my gigabit network.

My hard drive reads at 85 MB/s, so why am I downloading from the ftp server at 68 MB/s? How could I diagnose what is eating those 17 MB/s?

Why does my windows machine have a slow 326 Mbit/s transmit speed compared with ubuntu's transmit speed of 763 Mbit/s when testing with iperf?

Why do I get slow samba speeds?

Windows is connected to Ubuntu with a 6 foot crossover cable. Both machines are fully updated.

windows xp3
motherboard: gigabit ga-965p-ds3
cpu: C2D E4400
hard drives: 250gb seagate, read = 85 MB/s
lan: marvel 8053 Gigabit LAN (onboard, PCI-E)

ubuntu 8.04 gateway
motherboard: Asus P5B-MX
cpu: C2D E2160
hard drive: 250gb seagate, read = 85 MB/s
lan: attansic® L1 PCI-E Gigabit LAN controller (onboard, PCI-E)

iperf
  • windows pc downloading from gateway: 763 Mbit/s = 95 MB/s
  • gateway downloading from windows pc: 326 Mbit/s = 41 MB/s

ftp
  • windows pc downloading from gateway: 544 Mbit/s = 68 MB/s

Samba
  • windows pc downloading from gateway: 194 MBit/s = 24 MB/s
  • gateway downloading from windows pc: 160 MBit/s = 20 MB/s


smb.conf
Code:
[global]
        netbios name = SHWICK_GATEWAY
        server string = SHWICK_GATEWAY
        interfaces = lo, eth1
        bind interfaces only = Yes
        map to guest = Bad User
        passdb backend = tdbsam
        syslog only = Yes
        socket options = TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE SO_RCVBUF=8192 SO_SNDBUF=8192
        os level = 65
        preferred master = Yes
        domain master = Yes
        dns proxy = No
        wins support = Yes
        invalid users = root

[Media]
        path = /home/ftp/
        create mask = 0640
        directory mask = 0750
        guest only = Yes
        guest ok = Yes
 
Old 12-12-2008, 10:09 PM   #2
lazlow
Senior Member
 
Registered: Jan 2006
Posts: 4,363

Rep: Reputation: 172Reputation: 172
You might try updating from samba to cifs, which is supposed to work marginally better. You do have to realize that samba/cifs is essentially an emulation and is just going to be slower. I had similar numbers that you are showing and dumped windows. Now(on the same hardware) using NFS I am limited only by my HD speed. I recently discovered that M$ distributes a Unix toolbox that allows using NFS on windows, it might be worth a try.
 
Old 12-12-2008, 10:40 PM   #3
Shwick
Member
 
Registered: Jun 2008
Posts: 112

Original Poster
Rep: Reputation: 15
Ok thanks. Yes Microsoft does have a Unix toolbox that allows using NFS on windows, I'll have to try it out later, http://support.microsoft.com/kb/324055.

Not touching cifs right now, looks too risky. Are you sure there's no way to like, increase the SO_RCVBUF or SO_SNDBUF to speed it up? 20 MB/s is way slower than even the 68 MB/s ftp and my cpus were around 3% usage. How could it be an emulation problem with 3% cpu usage? That is a BAD filesharing framework.

Any ideas on why I'm getting 68 MB/s instead of 85 MB/s when downloading from the ftp server?

If you reply again I promise I'll click the ugly blue thumbs up icon, yech.
 
Old 12-13-2008, 12:27 AM   #4
lazlow
Senior Member
 
Registered: Jan 2006
Posts: 4,363

Rep: Reputation: 172Reputation: 172
How are you checking your drive speeds? hdparm is probably the most reliable. You could be seeing all sorts of things(shortage of cache, bad driver, ...)

You can look here:http://www.enterprisenetworkingplane...le.php/3485486
 
Old 12-13-2008, 01:13 AM   #5
Shwick
Member
 
Registered: Jun 2008
Posts: 112

Original Poster
Rep: Reputation: 15
So I found how to make samba faster, I removed "SO_RCVBUF=8192 SO_SNDBUF=8192" from socket options. I let the tcp stack set the buffer size automatically now. 8192 was too small for a gigabit lan.

I'll check out the link you posted. The problem is server side, as I tested a download on both windows and from an ubuntu livecd, and both times it was 68 MB/s.
 
Old 12-13-2008, 09:10 PM   #6
Shwick
Member
 
Registered: Jun 2008
Posts: 112

Original Poster
Rep: Reputation: 15
Well I give up I guess I'll settle for 68 MB/s ftp and 43 MB/s samba. lame.

I tried a bunch of tcp tweaking on my ubuntu gateway, stuff from articles like

Code:
# TCP gigabit tweaks
net.core.rmem_max = 16777216
net.core.wmem_max = 16777216

net.ipv4.tcp_rmem = 4096 87380 16777216
net.ipv4.tcp_wmem = 4096 65536 16777216
Tried setting mtu to 9000, tried disabling tcp sack. Double checked cables were cat5e.

Booted ubuntu livecd on windows machine, iperf got 940 Mbit/s down. And I get 544 Mbit/s from ftp server.

Tried messing with nfs, looked like i was getting 62 MB/s down. Couldn't do proper tests b/c livecd boot kept running out of space.

Whatever. Getting that last 17 MB/s isn't worth it if it's this difficult.
 
Old 12-13-2008, 09:20 PM   #7
lazlow
Senior Member
 
Registered: Jan 2006
Posts: 4,363

Rep: Reputation: 172Reputation: 172
I will ask again, HOW are you testing your HD speeds?
 
Old 12-14-2008, 09:10 AM   #8
Shwick
Member
 
Registered: Jun 2008
Posts: 112

Original Poster
Rep: Reputation: 15
sudo hdparm -Tt /dev/sda
Code:
/dev/sda:
 Timing cached reads:   2350 MB in  2.00 seconds = 1174.76 MB/sec
 Timing buffered disk reads:  266 MB in  3.01 seconds =  88.40 MB/sec
When I had this drive on my windows machine HD Tach showed read speed of 85 MB/sec.

It's a Seagate Barracuda 250 GB with 16 MB cache. http://www.seagate.com/ww/v/index.js...00f5ee0a0aRCRD
 
Old 12-14-2008, 04:24 PM   #9
lazlow
Senior Member
 
Registered: Jan 2006
Posts: 4,363

Rep: Reputation: 172Reputation: 172
That is only one of the (at least) two drives involved. What about the drive on the other end?
 
Old 12-14-2008, 09:41 PM   #10
Shwick
Member
 
Registered: Jun 2008
Posts: 112

Original Poster
Rep: Reputation: 15
I have two of the same drives on the other end(windows machine). Both tested positive for 85 MB/s read as well.

What if I ran wireshark on windows when downloading from ftp, and then ran wireshark again when downloading from iperf and compared the results?

Maybe the tcp packets will tell me what is going on.
 
Old 12-14-2008, 10:52 PM   #11
Shwick
Member
 
Registered: Jun 2008
Posts: 112

Original Poster
Rep: Reputation: 15
Why do I see 33MHz everywhere, this onboard nic is supposed to be using the 100-MHz PCI-E bus.

Code:
-pci:1
             description: PCI bridge
             product: 82801G (ICH7 Family) PCI Express Port 2
             vendor: Intel Corporation
             physical id: 1c.1
             bus info: pci@0000:00:1c.1
             version: 01
             width: 32 bits
             clock: 33MHz
             capabilities: pci pciexpress msi pm normal_decode bus_master cap_list
             configuration: driver=pcieport-driver
           *-network
                description: Ethernet interface
                product: L1 Gigabit Ethernet Adapter
                vendor: Attansic Technology Corp.
                physical id: 0
                bus info: pci@0000:01:00.0
                logical name: eth1
                version: b0
                serial: 00:1d:60:17:e4:02
                size: 1GB/s
                capacity: 1GB/s
                width: 64 bits
                clock: 33MHz
                capabilities: pm msi pciexpress vpd bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
                configuration: autonegotiation=on broadcast=yes driver=atl1 driverversion=2.0.7 duplex=full firmware=N/A ip=10.11.12.1 latency=0 link=yes module=atl1 multicast=y
es port=twisted pair speed=1GB/s
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Slow performance with Samba, but not FTP, SCP stealth210 Slackware 19 01-15-2008 04:53 AM
LXer: Measure Network Performance: iperf and ntop LXer Syndicated Linux News 0 02-07-2007 07:03 AM
Very slow (Gigabit crossover - pc to pc) network connection! gecon Linux - Networking 17 12-30-2005 01:34 AM
slow network / samba mehesque Linux - Networking 1 01-09-2004 02:48 PM
Samba doesn't utilize Gigabit Network will_k Linux - Networking 7 12-31-2003 01:55 PM

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

All times are GMT -5. The time now is 09:27 AM.

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