Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 25

Thread: Slow download speed on Ubuntu 12.10 vs Windows

  1. #11
    Join Date
    Mar 2010
    Location
    India
    Beans
    7,351
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Slow download speed on Ubuntu 12.10 vs Windows

    These associated --> deauthenticated loops are interesting -
    Code:
    ....
    [  429.146320] wlan0: RX AssocResp from <MAC address removed> (capab=0x411 status=0 aid=5)
    [  429.146577] wlan0: associated
    [  429.404572] wlan0: deauthenticating from <MAC address removed> by local choice (reason=3)
    [  433.128353] wlan0: authenticate with <MAC address removed>
    ....
    Were you disconnecting it manually or was it happening by itself? Does the wireless connection seems stable (even if with slower speeds)?

    Even if the effect is small, I suggest making the "nohwcrypt=Y" parameter permanent -
    Code:
    echo "options rt61pci nohwcrypt=Y" | sudo tee /etc/modprobe.d/rt61pci.conf
    This will make the driver always load with the parameter since next boot.

    A few other things to try (one at a time) -

    1) Try changing the band mode in the router to g-only if that option is available in its settings interface. Currently it seems to be in b/g mode which is okay, but the change may be worth a try.

    2) Try fixing the speed to a suitable value (the highest value that seems stable and best for speed) -
    Code:
    sudo iwconfig wlan0 rate 36M
    The other supported speeds, as per the scan results, are - 18 Mb/s; 24 Mb/s; 48 Mb/s; 54 Mb/s that are higher than what you are currently getting. You may try from the lowest of these values (18M) to highest (54M) and stop & step back where the practical throughput seems to get worse or connection becomes unstable.


    For the Ethernet, we can try a similar approach, that is, trying a lower speed which is most widely supported -
    Code:
    sudo ethtool eth0 -s eth0 speed 100 duplex full autoneg off
    Additionally, try changing the DNS to same as wifi (8.8.8.8 and 8.8.4.4) for the ethernet. Currently it is using the router as DNS which is then forwarding the requests to a real DNS.

    Any improvement with these changes?
    Varun
    Help others by marking threads as [SOLVED], if they are. (See how)
    Wireless Script | Use Code Tags

  2. #12
    Join Date
    Nov 2013
    Beans
    11

    Re: Slow download speed on Ubuntu 12.10 vs Windows

    Quote Originally Posted by varunendra View Post
    Were you disconnecting it manually or was it happening by itself? Does the wireless connection seems stable (even if with slower speeds)?
    it was happening by itself and the wireless connection seems stable.

    didn't see a big change when running this:
    Code:
    sudo iwconfig wlan0 rate 36M
    but this:
    Code:
    sudo ethtool -s eth0 speed 100 duplex full autoneg off
    improved the wired connection speed to:
    Download Speed: 4.81 Mbps (0.6 MB/sec transfer rate)
    Upload Speed: 4.23 Mbps (0.53 MB/sec transfer rate)
    Latency: 14 ms

    still not close to the windows speed but a big improvement to the speeds I was getting before that.
    Last edited by dani.rab; December 4th, 2013 at 10:09 AM.

  3. #13
    Join Date
    Mar 2010
    Location
    India
    Beans
    7,351
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Slow download speed on Ubuntu 12.10 vs Windows

    Quote Originally Posted by dani.rab View Post
    ..improved the wired connection speed to:
    Download Speed: 4.81 Mbps (0.6 MB/sec transfer rate)
    Upload Speed: 4.23 Mbps (0.53 MB/sec transfer rate)
    Latency: 14 ms

    still not close to the windows speed but a big improvement to the speeds I was getting before that.
    Yeah, compared to the previous ridiculous speed, the current one may be a big improvement. But needless to say, it is still ridiculous.

    In network manager settings for your wired connection, try changing the MTU value from "automatic" to 1492 > Save > Close. Does it make any positive difference?

    For wireless, did you try other values? Do so if not so far. Testing is the only possible way to find the most optimal setting. If none of them seem to help, or even make the speed/stability worse, you can reset the speed to "auto" by -
    Code:
    sudo iwconfig wlan0 rate auto
    Varun
    Help others by marking threads as [SOLVED], if they are. (See how)
    Wireless Script | Use Code Tags

  4. #14
    Join Date
    Nov 2013
    Beans
    11

    Re: Slow download speed on Ubuntu 12.10 vs Windows

    Quote Originally Posted by varunendra View Post
    In network manager settings for your wired connection, try changing the MTU value from "automatic" to 1492 > Save > Close. Does it make any positive difference?
    I already set my MTU manually to 1500, once I changed it to 1492 the speed was worse so I returned it to 1500.

    Quote Originally Posted by varunendra View Post
    For wireless, did you try other values? Do so if not so far. Testing is the only possible way to find the most optimal setting.
    I tried the other values but I didn't see a noticeable difference in speed.

    thanks for trying to help, this issue is really frustrating, especially the wired connection.

  5. #15
    Join Date
    Mar 2010
    Location
    India
    Beans
    7,351
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Slow download speed on Ubuntu 12.10 vs Windows

    1500 is default value in Ubuntu, you don't need to set it manually. You can (probably should) set it back to "automatic" again.

    The forcedeth driver in my setup has some parameters that seem to be able to optimize its performance. Let us see if the same parameters are available in the version you are using. Please post back the output of :
    Code:
    modinfo -p forcedeth
    And also post the current output of "sudo ethtool eth0" along with it.

    For WiFi, the current speeds (practical ones) seem to be what can be expected from a b-band router. Just for a test, could you try setting your router to use g-only mode? Currently it seems to be in b/g mode. Make the changes > Save & Close the management interface > physically power off both the router and your computer (disconnect the router from its power source) > wait for about 4 minutes > power them back on > connect and test the speed with WiFi.

    If it seems to make things worse (it can, if the driver happens to have problem with g-band), revert back the settings and reboot it again. And if it supports N-channel, definitely turn it off, and keep it off.

    Try these and let me know how it goes.
    Varun
    Help others by marking threads as [SOLVED], if they are. (See how)
    Wireless Script | Use Code Tags

  6. #16
    Join Date
    Nov 2013
    Beans
    11

    Re: Slow download speed on Ubuntu 12.10 vs Windows

    Quote Originally Posted by varunendra View Post
    The forcedeth driver in my setup has some parameters that seem to be able to optimize its performance. Let us see if the same parameters are available in the version you are using. Please post back the output of :
    Code:
    modinfo -p forcedeth
    And also post the current output of "sudo ethtool eth0" along with it.
    here's the output:

    Code:
    dan@ubuntu:~$ modinfo -p forcedeth
    max_interrupt_work:forcedeth maximum events handled per interrupt (int)
    optimization_mode:In throughput mode (0), every tx & rx packet will generate an interrupt. In CPU mode (1), interrupts are controlled by a timer. In dynamic mode (2), the mode toggles between throughput and CPU mode based on network load. (int)
    poll_interval:Interval determines how frequent timer interrupt is generated by [(time_in_micro_secs * 100) / (2^10)]. Min is 0 and Max is 65535. (int)
    msi:MSI interrupts are enabled by setting to 1 and disabled by setting to 0. (int)
    msix:MSIX interrupts are enabled by setting to 1 and disabled by setting to 0. (int)
    dma_64bit:High DMA is enabled by setting to 1 and disabled by setting to 0. (int)
    phy_cross:Phy crossover detection for Realtek 8201 phy is enabled by setting to 1 and disabled by setting to 0. (int)
    phy_power_down:Power down phy and disable link when interface is down (1), or leave phy powered up (0). (int)
    debug_tx_timeout:Dump tx related registers and ring when tx_timeout happens (bool)
    
    dan@ubuntu:~$ sudo ethtool eth0 
    Settings for eth0:
        Supported ports: [ MII ]
        Supported link modes:   10baseT/Half 10baseT/Full 
                                100baseT/Half 100baseT/Full 
                                1000baseT/Full 
        Supported pause frame use: No
        Supports auto-negotiation: Yes
        Advertised link modes:  Not reported
        Advertised pause frame use: No
        Advertised auto-negotiation: No
        Speed: 100Mb/s
        Duplex: Full
        Port: MII
        PHYAD: 1
        Transceiver: external
        Auto-negotiation: off
        Supports Wake-on: g
        Wake-on: g
        Link detected: yes
    changing the band to G didn't make a big difference.

    BTW, how do I make this change permanent?
    Code:
    sudo ethtool -s eth0 speed 100 duplex full autoneg off
    Last edited by dani.rab; December 6th, 2013 at 08:51 AM.

  7. #17
    Join Date
    Mar 2010
    Location
    India
    Beans
    7,351
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Slow download speed on Ubuntu 12.10 vs Windows

    Quote Originally Posted by dani.rab View Post
    BTW, how do I make this change permanent?
    There are three common ways -
    1.
    The usual and most common way to run commands at startup is to add them to /etc/rc.local file, as mentioned in this thread : http://ubuntuforums.org/showthread.php?t=1481321

    But I personally think a better way to automate something like this is adding it to upstart jobs as follows (source : http://www.cyberciti.biz/tips/howto-...permanent.html) -

    2.

    1) Open your text editor and put the following contents in it -
    Code:
    #!/bin/sh
    
    case "$1" in
    start)
    /sbin/ethtool -s eth0 speed 100 duplex full autoneg off;
    
    stop)
    ;;
    esac
    exit 0
    2) Save this file as "EthFix" (or whatever you wish, just make sure the name doesn't contain blank spaces or other special characters).

    3) Run the following commands to place it in correct location and make effective -
    Code:
    sudo cp EthFix /etc/inid.d/
    sudo chmod -x /etc/init.d/EthFix
    sudo update-rc.d EthFix defaults

    3.
    A much easier (and better than /etc/rc.local) place for automating this particular stuff is adding the command to /etc/network/interfaces file as mentioned here : http://www.thegeekstuff.com/2010/10/ethtool-command/
    Although I am a bit skeptical about using "interfaces" file and Network Manager for the same interface at the same time, so my personal preference is Method 2.
    ----------------------------------

    That being answered, let's try a few parameters available with your 'forcedeth' driver, and see if they stick (I'm not sure if they will) and can help. If they did, it would be much more easier to make permanent (all the changes suggested below are temporary as of now, will be lost at next boot or at driver's reload).

    Please try first -
    Code:
    sudo modprobe -rv forcedeth
    sudo modprobe -v forcedeth optimization_mode=1
    ..and test its performance. The other values this parameter can take are 0 and 2. Try all and see if any of them does the trick.

    If the above doesn't help, try this -
    Code:
    sudo modprobe -rv forcedeth
    sudo modprobe -v forcedeth msi=0
    The other value it can take is 1. Again, try both and let me know the difference if there is any.

    Just like "msi=0", also try the above command set with two other available parameters "msix" and "dma_64bit". These also take values 0 and 1, try both.

    Since I don't have a clear idea of what these parameters do or what their default values are, try them all and stop if any of them gives us the pleasant surprise we are craving for.

    Be aware though that some of them (perhaps msi and msix) *may* also break the connection or cause a kernel panic with a wrong value. The good thing is that it will be temporary and everything will be reset to default on next boot (or a next cycle of driver load/unload if a restart doesn't become the only option).

    Obviously, I am now trying things I have never tried before, so trust your own knowledge/instincts instead of trusting me at this point.

    PS:
    If anyone watching this thread has any better ideas, please join us !
    Varun
    Help others by marking threads as [SOLVED], if they are. (See how)
    Wireless Script | Use Code Tags

  8. #18
    Join Date
    Nov 2013
    Beans
    11

    Re: Slow download speed on Ubuntu 12.10 vs Windows

    I tried all the options you mentioned but it didn't seem to make a big difference, always the download speed is really low until I run
    Code:
    sudo ethtool -s eth0 speed 100 duplex full autoneg off
    and then it jumps to around 6-7 Mbps

  9. #19
    Join Date
    Mar 2010
    Location
    India
    Beans
    7,351
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Slow download speed on Ubuntu 12.10 vs Windows

    Hmm.. looks like I must give up on it now. One more attempt -

    You mentioned in the first post that "it used to be ok a few days ago". I was wondering if it is a bug in the current kernel or the current driver that is causing the trouble.

    Can you try booting with a previous kernel? In the grub menu, you can choose to boot with an older kernel. Choose this option to boot into a previous one and see if the Ethernet works at better speeds again.

    Whether or not, I think it is time to submit a bug report at launchpad against the forcedeth driver or the current kernel for slow speeds, or add yourself as "Affected" to an already existing bug (although I couldn't find a bug report with same symptoms). To collect information for reporting, use the command -
    Code:
    apport-bug
    ..and proceed with prompts.

    How to Report Bugs Effectively : https://help.ubuntu.com/community/ReportingBugs
    Varun
    Help others by marking threads as [SOLVED], if they are. (See how)
    Wireless Script | Use Code Tags

  10. #20
    Join Date
    Jun 2006
    Location
    UK
    Beans
    Hidden!
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Slow download speed on Ubuntu 12.10 vs Windows

    @dani.rab, I've been following this thread with interest. If booting into an earlier kernel as varunendra suggests doesn't give you decent speeds with the forcedeth driver and ethernet, I wonder if it's worth looking at things outside your Ubuntu machine. Apologies if you've already done this and I've missed it.

    You mention Ubuntu and Windows machines suggesting they are different machines. Am I correct? If so, is there any significant difference in the way they are connected to your router? For example, is the Windows machine plugged directly into the router with an ethernet cable and the Ubuntu one via an ethernet switch or perhaps even via ethernet over mains? If so, it would be worth checking to see if any of the differences are affecting your download speed in Ubuntu. You said Ubuntu used to be OK until a few days ago. Do you remember changing any networking hardware?

    Or even if the two machines are near each other, it would be a useful exercise to swap them around to each other's cables to see if the speed in either or both changes.

    Please do not PM me about your forum account unless you have been asked to. The correct place to contact an admin about your account is here.

Page 2 of 3 FirstFirst 123 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •