1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Linux Slowing Samba transfer from Windows to Ubuntu 10.04

Discussion in 'Software' started by law99, 28 Feb 2011.

  1. law99

    law99 Custom User Title

    Joined:
    24 Sep 2009
    Posts:
    2,390
    Likes Received:
    63
    I've got a file server Ubuntu pc. I've got an old AMD 1640le(2.6ghz) in there with a 1gig of ram, raid 5 array with a dell 1.5/6ch cerc card, 4 hdds, all plugged into an old Asus M2n68-CM board,

    The board is a nForce 630a, and comes with a realtek 1gigabit onboard network card. I've installed the drivers from their site. Although, where ever I look, the computer tells me it's a MCP67 ethernet Nvidia

    Ok, so my problem is, if I copy a file from XP, or Win7 to the Ubuntu machine, I initially get speeds of 30/40MBps. This slows down though to a miserly 5/6MBps. The other way however, Ubuntu to any of the other machines at how, consistently travels at speeds of 40mBps.

    So, something is wrong.

    Somewhere, I was told to add this to my smb.conf file

    Code:
    socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
    Interestingly enough, as usual, these lines were already in the smb.conf file, just waiting to be uncommented. Although I read they needed to be changed to look like the above.

    I then came across more tips, suggesting I used ethtool to turn off autoneg, and manually setting my eth0 to full duplex and 1000 speed.

    Still no win, although something I couldn't rectify. I can set the speed to 1000 no problem and duplex to full. However;

    Code:
    sudo ethtool -s eth0 autoneg off
    Cannot set new settings: Invalid argument
      not setting autoneg
    Ummm... yeah. SO that won't work for some reason? Apparently I needed the drivers from Realtek, but that hasn't fixed anything. Apparently, all those changes are temporary anyway and would need to have a startup script to work on boot.

    Here is what ethtool says about eth0

    Code:
    Settings for eth0:
    	Supported ports: [ MII ]
    	Supported link modes:   10baseT/Half 10baseT/Full 
    	                        100baseT/Half 100baseT/Full 
    	                        1000baseT/Full 
    	Supports auto-negotiation: Yes
    	Advertised link modes:  10baseT/Half 10baseT/Full 
    	                        100baseT/Half 100baseT/Full 
    	                        1000baseT/Full 
    	Advertised pause frame use: No
    	Advertised auto-negotiation: Yes
    	Link partner advertised link modes:  Not reported
    	Link partner advertised pause frame use: No
    	Link partner advertised auto-negotiation: No
    	Speed: 1000Mb/s
    	Duplex: Full
    	Port: MII
    	PHYAD: 3
    	Transceiver: external
    	Auto-negotiation: on
    	Supports Wake-on: g
    	Wake-on: d
    	Link detected: yes
    
    and ifconfig

    Code:
    Link encap:Ethernet  HWaddr 00:22:15:de:b4:10  
              inet addr:192.168.0.13  Bcast:192.168.0.255  Mask:255.255.255.0
              inet6 addr: fe80::222:15ff:fede:b410/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:5212031 errors:253 dropped:0 overruns:0 frame:253
              TX packets:6440513 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000 
              RX bytes:2494597801 (2.4 GB)  TX bytes:2560290711 (2.5 GB)
              Interrupt:31 
    Plus lshw -class network

    Code:
    *-network               
           description: Ethernet interface
           product: MCP67 Ethernet
           vendor: nVidia Corporation
           physical id: a
           bus info: pci@0000:00:0a.0
           logical name: eth0
           version: a2
           serial: 00:22:15:de:b4:10
           size: 1GB/s
           capacity: 1GB/s
           width: 32 bits
           clock: 66MHz
           capabilities: pm msi ht bus_master cap_list ethernet physical mii 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
           configuration: autonegotiation=on broadcast=yes driver=forcedeth driverversion=0.64 duplex=full ip=192.168.0.13 latency=0 link=yes maxlatency=20 mingnt=1 multicast=yes port=MII speed=1GB/s
           resources: irq:31 memory:dfefc000-dfefcfff ioport:e480(size=8) memory:dfefe400-dfefe4ff memory:dfefe000-dfefe00f
    
    I don't know if that helps anyone reading this, but if anyone can help, that'd be great. I've exhausted my ability to ask the same question differently in Google, and appear to be looking at all the same links, again and again and again :waah:

    P.s. I'm not new to linux, but my understanding is limited and I'm always blind no matter how many handbooks I read! Let alone that I'm forgetful.


    EDIT: Well... this thread over on Ubuntu forums doesn't exactly inspire confidence. If it wasn't true, you'd expect people to jump to it's defence. :sigh:

    :wallbash::wallbash::wallbash:
     
    Last edited: 28 Feb 2011
  2. thehippoz

    thehippoz What's a Dremel?

    Joined:
    19 Dec 2008
    Posts:
    5,780
    Likes Received:
    174
    I'll give mine a test later today.. I don't think have this issue- but it could be I never transferred a large enough file over to the webserver
     
  3. Fingers66

    Fingers66 Kiwi in London

    Joined:
    30 Apr 2010
    Posts:
    8,874
    Likes Received:
    1,054
    What switch do you have between them?
     
  4. law99

    law99 Custom User Title

    Joined:
    24 Sep 2009
    Posts:
    2,390
    Likes Received:
    63
    I think it's a netgear 1gigabit switch.

    It seems a common problem with Ubuntu...

    I'm going to try reinstalling samba from git and if that doesn't work, xp and vm of freenas, with vm of Ubuntu server for some web hosting I plan to do soon.

    edit: Also, nice Antec 300 improvs! I need to crack on with something similar soon. I hadn't thought of doing the cable management like that.
     
    Last edited: 2 Mar 2011
  5. law99

    law99 Custom User Title

    Joined:
    24 Sep 2009
    Posts:
    2,390
    Likes Received:
    63
    All hardware was forced to gigabit, to no avail.

    Samba from git didn't change anything. When I get another spare PC I'll try again. I personally can't put up with those speeds.

    On a side note, doesn't FreeNas use samba/cifs? Why are file transfers fine with that?
     
  6. Fingers66

    Fingers66 Kiwi in London

    Joined:
    30 Apr 2010
    Posts:
    8,874
    Likes Received:
    1,054
    FreeNAS is based upon FreeBSD rather than Debian like Ubuntu.

    Wouldn't they therefore have different NIC drivers?
     
  7. Tesla effect

    Tesla effect AKA ZombieKiller1

    Joined:
    24 Jul 2009
    Posts:
    499
    Likes Received:
    8
    I had a similar problem recently but the connection was dropping completely eventually (path too deep error). Turned out the problem was on the XP side, the Realtek NIC speed & duplex config was set to auto negotiate & was forcing re-negotiation of the link in the middle of a file transfer. I changed this to a fixed value (1 Gbps Full Duplex) & problem solved. Check the settings on your windows machines.

    I see you mention the auto negotiation issue but on the Ubuntu box not Windows.
     
    Last edited: 3 Mar 2011
  8. thehippoz

    thehippoz What's a Dremel?

    Joined:
    19 Dec 2008
    Posts:
    5,780
    Likes Received:
    174
  9. law99

    law99 Custom User Title

    Joined:
    24 Sep 2009
    Posts:
    2,390
    Likes Received:
    63
    I'd imagine. According to some threads I've read on Ubuntu forums, this problem is wrought in samba, as either a bug or something that needs proper configuration. I know there's a lot of linux software there in that category, but people seem to suggest it's stuck around because a lot aren't bothered about high transfer speeds, or just don't notice.

    Which is sad, because why would I chose Ubuntu if I mainly want to use it as a fileserver/webserver?

    I'd like to clarify that obviously you can get samba transfers to work at high speeds, but, with everything I've been told to do, which seems to be the readily available well documented tweaks, it's just not happening.

    Still, whenever I get a free PC or board to play with, I'll be back on it.

    @Tesla

    Maybe it was the windows machines that were at fault, but it's to late now as my flatmate and I got frustrated and installed FreeNas, which doesn't, as of yet, have any of these problems. Still, I haven't looked into whether FreeNas can run apache yet. As it's BSD, I'm hoping it will... but there is hope for Linux yet on my PC; maybe I'll stick with Debian next time and not bother with Ubuntu. Or another main distro like Red Hat.
     
  10. chomps1891

    chomps1891 What's a Dremel?

    Joined:
    11 Mar 2011
    Posts:
    16
    Likes Received:
    0
    sudo ethtool -s eth0 autoneg off
    Does not do anything drastic to my systems i am still transferring at 40mbps.

    May i suggest to try an updated kernel?

    As of late the 2.6.38 is shaping up very nicely rc8 is the newest available and has been stable since four for me anyway.

    Google ubuntu kernel ppa.

    John
     

Share This Page