uploading causes network lag

Bug #196439 reported by Savvas Radevic
20
This bug affects 2 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Invalid
Medium
Unassigned
Declined for Hardy by Henrik Nilsen Omma

Bug Description

Binary package hint: apport

While I was uploading a report with apport, I noticed that it lags the rest of the internet applications; IRC, internet browsing, sftp/ssh confirmed

Revision history for this message
Emmet Hikory (persia) wrote :

While I can reproduce a similar effect when using a limited bandwidth line, I cannot reproduce it after reaching TCP ACK window saturation (e.g. 147kB/s to a host 290ms distant). As a result, I don't believe that the issue lies with apport (while I can replicate using apport, I can also replicate with other traffic consumers), but rather a function of the bandwidth consumed (and the remaining available for other uses).

Revision history for this message
TerryG (tgalati4) wrote :

Thanks for your bug submission. This sounds like it may be related to your next Bug #196441.

Marking as Confirmed.

Changed in apport:
status: New → Confirmed
Revision history for this message
Savvas Radevic (medigeek) wrote :
Download full text (8.1 KiB)

It looks like it's not just apport, while uploading (i.e. apport bug report), downloading (apt-get update, apt-get upgrade) it does the same thing.
Try using rapidshare.com or filebin.ca

In gutsy I didn't have this sort of problems, I had some lag using IRC, but the websites could be resolved fine. (Was there a network flow control in gutsy?)

While I was uploading, domains cannot be resolved:
$ ping google.com
ping: unknown host google.com

I tried to visit bugs.launchpad.net:
"Address Not Found
Firefox can't find the server at bugs.launchpad.net.
The browser could not find the host server for the provided address.
    * Did you make a mistake when typing the domain? (e.g. "ww.mozilla.org" instead of "www.mozilla.org")
    * Are you certain this domain address exists? Its registration may have expired.
    * Are you unable to browse other sites? Check your network connection and DNS server settings.
    * Is your computer or network protected by a firewall or proxy? Incorrect settings can interfere with Web browsing."

When it was done uploading:
$ ping google.com
PING google.com (72.14.207.99) 56(84) bytes of data.
64 bytes from eh-in-f99.google.com (72.14.207.99): icmp_seq=1 ttl=242 time=192 ms
64 bytes from eh-in-f99.google.com (72.14.207.99): icmp_seq=3 ttl=242 time=173 ms
64 bytes from eh-in-f99.google.com (72.14.207.99): icmp_seq=4 ttl=242 time=178 ms
64 bytes from eh-in-f99.google.com (72.14.207.99): icmp_seq=5 ttl=242 time=177 ms
64 bytes from eh-in-f99.google.com (72.14.207.99): icmp_seq=6 ttl=242 time=196 ms
64 bytes from eh-in-f99.google.com (72.14.207.99): icmp_seq=7 ttl=242 time=177 ms

--- google.com ping statistics ---
7 packets transmitted, 6 received, 14% packet loss, time 6000ms
rtt min/avg/max/mdev = 173.912/182.740/196.574/8.642 ms

Using an IP, while uploading:
$ ping 64.233.187.99
PING 64.233.187.99 (64.233.187.99) 56(84) bytes of data.
64 bytes from 64.233.187.99: icmp_seq=1 ttl=243 time=7724 ms
64 bytes from 64.233.187.99: icmp_seq=2 ttl=243 time=7929 ms
64 bytes from 64.233.187.99: icmp_seq=3 ttl=243 time=8270 ms
64 bytes from 64.233.187.99: icmp_seq=5 ttl=243 time=9110 ms
64 bytes from 64.233.187.99: icmp_seq=6 ttl=243 time=10126 ms
64 bytes from 64.233.187.99: icmp_seq=7 ttl=243 time=10332 ms
64 bytes from 64.233.187.99: icmp_seq=8 ttl=243 time=10551 ms
64 bytes from 64.233.187.99: icmp_seq=9 ttl=243 time=11920 ms
64 bytes from 64.233.187.99: icmp_seq=11 ttl=243 time=13295 ms
64 bytes from 64.233.187.99: icmp_seq=12 ttl=243 time=12881 ms
64 bytes from 64.233.187.99: icmp_seq=13 ttl=243 time=12695 ms
64 bytes from 64.233.187.99: icmp_seq=15 ttl=243 time=11963 ms
64 bytes from 64.233.187.99: icmp_seq=16 ttl=243 time=12092 ms
64 bytes from 64.233.187.99: icmp_seq=17 ttl=243 time=12036 ms
64 bytes from 64.233.187.99: icmp_seq=18 ttl=243 time=11944 ms
64 bytes from 64.233.187.99: icmp_seq=19 ttl=243 time=12637 ms
64 bytes from 64.233.187.99: icmp_seq=23 ttl=243 time=13486 ms
64 bytes from 64.233.187.99: icmp_seq=24 ttl=243 time=12948 ms
64 bytes from 64.233.187.99: icmp_seq=25 ttl=243 time=12890 ms
64 bytes from 64.233.187.99: icmp_seq=26 ttl=243 time=12800 ms
64 bytes from 64.233.187.99: icmp_seq=27 ttl=243 time=12...

Read more...

Revision history for this message
Savvas Radevic (medigeek) wrote :

I just switched adsl modem/router, the problem appears on both routers, A conexant-based one and a TP-Link TD-8840.

04:02.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL-8110SC/8169SC Gigabit Ethernet [10ec:8167] (rev 10)
 Subsystem: Micro-Star International Co., Ltd. P965 Neo MS-7235 mainboard [1462:235c]
 Flags: bus master, 66MHz, medium devsel, latency 64, IRQ 21
 I/O ports at e800 [size=256]
 Memory at febffc00 (32-bit, non-prefetchable) [size=256]
 Expansion ROM at feb00000 [disabled] [size=128K]
 Capabilities: [dc] Power Management version 2

Revision history for this message
Savvas Radevic (medigeek) wrote :

I've re-tested this problem, it seems that now it happens only while uploading, downloading goes perfectly fine (apt-get update, apt-get upgrade) with a bit of lag while browsing websites, but at least I can browse the internet while downloading, whereas I can't view websites at all while uploading.

Revision history for this message
Daniel Hahler (blueyed) wrote :

I don't think it's a problem with apport, but rather the network stack, e.g. a performance regression with a particular network driver.

Changed in apport:
importance: Undecided → Medium
Revision history for this message
Savvas Radevic (medigeek) wrote : Re: hardy: uploading causes network lag

If you need any more info, I'm here :)

Revision history for this message
Savvas Radevic (medigeek) wrote :

OK, after a lot of testing, I'm back to my original opinion: apt-get update, apt-get upgrade and uploading (apport reports or anything) causes network lag which most of the times results in .
I've noticed that there is a package unattended-upgrades for unattended security updates installed by default, and without fixing this network shaping, this is bound to cause more problems with users that have the same internet connection or even slower.

Revision history for this message
Savvas Radevic (medigeek) wrote :

* which most of the times results in unreachable domains

Revision history for this message
Daniel Hahler (blueyed) wrote :

So, normal downloads (of a huge file) don't cause problems?
Are you using some other program which uses a lot of connections, e.g. bittorrent and are connected to the internet with a modem or router with a low connection limit maybe?
You can look at the package trickle to shape bandwidth of different processes/programs - maybe that helps as a workaround and for experimenting.

Revision history for this message
Savvas Radevic (medigeek) wrote :

Normal downloads don't cause a problem, at least not here.
No, I tested it bare, firefox and apt-get or firefox and apport-cli

I have that one installed, I even set up the /etc/trickled.conf
I don't know if it's correct:
[firefox]
Priority = 1
Time-Smoothing = 0.1
Length-Smoothing = 2
[firefox-2]
Priority = 1
Time-Smoothing = 0.1
Length-Smoothing = 2
[firefox-3.0]
Priority = 1
Time-Smoothing = 0.1
Length-Smoothing = 2
[irssi]
Priority = 1
Time-Smoothing = 0.1
Length-Smoothing = 2
[wget]
Priority = 2
Time-Smoothing = 1
Length-Smoothing = 4
[update-manager]
Priority = 3
Time-Smoothing = 4
Length-Smoothing = 18
[apt-get]
Priority = 3
Time-Smoothing = 4
Length-Smoothing = 18
[update-notifier]
Priority = 3
Time-Smoothing = 4
Length-Smoothing = 18
[apport-cli]
Priority = 3
Time-Smoothing = 4
Length-Smoothing = 18
[apport-retrace]
Priority = 3
Time-Smoothing = 4
Length-Smoothing = 18
[apport-unpack]
Priority = 3
Time-Smoothing = 4
Length-Smoothing = 18

The bad thing with trickled is that the daemon doesn't autostart as a service on each boot. And it doesn't say if it should be run with sudo or normally

Revision history for this message
Savvas Radevic (medigeek) wrote :

My new adsl ethernet router is TP-Link TD-8840, I don't see any options about connection limits.
It seems you're right, it's not just apt-get; Downloading anything big, like the package of virtualbox, using wget or firefox's download manager, results to error if I try to visit a website like www.google.com: "Address Not Found - Firefox can't find the server at www.google.com. - The browser could not find the host server for the provided address."
Hence the problem: can't resolve domain names.

This is backed up by the fact that while I was downloading, I tried connecting to an IRC server:
12:22:27 -!- Irssi: Looking up Elsene.Be.Eu.undernet.org
12:22:27 [Freenode] -!- Irssi: Looking up irc.ubuntu.com
12:22:47 -!- Irssi: Unable to connect server Elsene.Be.Eu.undernet.org port 6667 [Name or service not known]
12:22:47 -!- Irssi: Unable to connect server irc.ubuntu.com port 6667 [Name or service not known]
12:22:48 -!- Irssi: Removed reconnection to server Carouge.CH.EU.Undernet.org port 6667
12:22:48 -!- Irssi: Looking up Carouge.CH.EU.Undernet.org
12:23:08 -!- Irssi: Unable to connect server Carouge.CH.EU.Undernet.org port 6667 [Name or service not known]

The lag seems normal (4-5 seconds) while the download is in progress. It is uploading that deteriorates the lag or ping reply.
You could be right again about a driver problem. According to the network manager, my ethernet is using the r8169 driver. Oh and my ADSL connection is 512k/64k.

Revision history for this message
Savvas Radevic (medigeek) wrote :

Upgraded to the -12.13 kernel.
$ apt-cache policy linux-generic
linux-generic:
  Installed: 2.6.24.12.13
  Candidate: 2.6.24.12.13
  Version table:
 *** 2.6.24.12.13 0
        500 http://uk.archive.ubuntu.com hardy/restricted Packages
        100 /var/lib/dpkg/status

Ok, downloading and network lag problems have improved a bit, but it still needs work. In Windows XP and Ubuntu Gutsy I did not have (before or now) any problems whatsoever while I was downloading or uploading, I could browse websites easily.
Do you think it could be avahi-daemon instead of linux?

Revision history for this message
Lynoure Braakman (lynoure) wrote :

Isn't this what is expected when the user has no QoS in place? Ubuntu having a default QoS favoring interactive applications could be sweet, though.

Revision history for this message
Savvas Radevic (medigeek) wrote :

I have found the culprit, I had not enabled QoS in the router, nor the old one had it. But how come I don't have the same problem in Gutsy or Windows? Probably they have this QoS integrated?
I would love a graphical interface for a Quality of Service within the Ubuntu operating system, one that would manage and prioritize my browsing stuff with basic (if not none) configuration.

P.S. I think I know why my apt-get/aptitude update is affected, I'm participating in the package survey, it could be that this survet uploads data to a server about the installed packages. So, if that is true the problem here is the upload, it uses 100% of the network upload bandwidth, not allowing me to browse freely my other internet destinations.

Revision history for this message
Savvas Radevic (medigeek) wrote :

This QoS is really annoying, from my point of view at least.
Do I have to be a network guru to have a working desktop with an operating system that has a decent control of its network packages? I get network "outages" just because I want to contribute and upload the crashes I get from time to time, or upload anything to that matter :(

Revision history for this message
Savvas Radevic (medigeek) wrote :

(I couldn't fix it by the way, I tried, but it involves tc and iptables and and and...)

Revision history for this message
Shirish Agarwal (shirishag75) wrote :

could you provide with a link where QOS has been discussed for I'm not familiar with the topic. I'm no developer, just an interested user.

Revision history for this message
Savvas Radevic (medigeek) wrote :

So far it's a brainstorm idea: http://brainstorm.ubuntu.com/idea/74/
I haven't been able to locate a blueprint for it.

Revision history for this message
Leann Ogasawara (leannogasawara) wrote :

The Ubuntu Kernel Team is planning to move to the 2.6.27 kernel for the upcoming Intrepid Ibex 8.10 release. As a result, the kernel team would appreciate it if you could please test this newer 2.6.27 Ubuntu kernel. There are one of two ways you should be able to test:

1) If you are comfortable installing packages on your own, the linux-image-2.6.27-* package is currently available for you to install and test.

--or--

2) The upcoming Alpha5 for Intrepid Ibex 8.10 will contain this newer 2.6.27 Ubuntu kernel. Alpha5 is set to be released Thursday Sept 4. Please watch http://www.ubuntu.com/testing for Alpha5 to be announced. You should then be able to test via a LiveCD.

Please let us know immediately if this newer 2.6.27 kernel resolves the bug reported here or if the issue remains. More importantly, please open a new bug report for each new bug/regression introduced by the 2.6.27 kernel and tag the bug report with 'linux-2.6.27'. Also, please specifically note if the issue does or does not appear in the 2.6.26 kernel. Thanks again, we really appreicate your help and feedback.

Revision history for this message
Savvas Radevic (medigeek) wrote :

This is happening on Intrepid alpha 5 updated

Distributor ID: Ubuntu
Description: Ubuntu intrepid (development branch)
Release: 8.10
Codename: intrepid

$ apt-cache policy linux-generic
linux-generic:
  Installed: 2.6.27.3.3
  Candidate: 2.6.27.3.3
  Version table:
 *** 2.6.27.3.3 0
        500 http://archive.ubuntu.com intrepid/restricted Packages
        100 /var/lib/dpkg/status

Revision history for this message
Savvas Radevic (medigeek) wrote :

That is, uploading of any kind, not just apport (e.g. at a file sharing service such as rapidshare)
I wasn't able to set iptables properly and a decent quality of service (tried my best with the router, but couldn't do it).

Revision history for this message
Savvas Radevic (medigeek) wrote :

$ sudo lshw -C network
  *-network
       description: Ethernet interface
       product: RTL-8110SC/8169SC Gigabit Ethernet
       vendor: Realtek Semiconductor Co., Ltd.
       physical id: 2
       bus info: pci@0000:04:02.0
       logical name: eth0
       version: 10
       serial: 00:19:db:63:29:fc
       size: 100MB/s
       capacity: 1GB/s
       width: 32 bits
       clock: 66MHz
       capabilities: pm bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=full ip=192.168.1.2 latency=64 link=yes maxlatency=64 mingnt=32 module=r8169 multicast=yes port=twisted pair speed=100MB/s

Revision history for this message
Savvas Radevic (medigeek) wrote :

still an issue:

$ apt-cache policy linux-generic
linux-generic:
  Installed: 2.6.27.7.11
  Candidate: 2.6.27.7.11
  Version table:
 *** 2.6.27.7.11 0
        500 http://archive.ubuntu.com intrepid/restricted Packages
        100 /var/lib/dpkg/status

I hope that this will be solved in the next release

Revision history for this message
Savvas Radevic (medigeek) wrote :

Looks like there is something ongoing for ufw firewall, a QoS implementation:
https://bugs.launchpad.net/ufw/+bug/271725

Daniel Hahler (blueyed)
Changed in linux (Ubuntu):
status: Confirmed → Triaged
Revision history for this message
Jeremy Foshee (jeremyfoshee) wrote :

This bug report was marked as Triaged a while ago but has not had any updated comments for quite some time. Please let us know if this issue remains in the current Ubuntu release, http://www.ubuntu.com/getubuntu/download . If the issue remains, click on the current status under the Status column and change the status back to "New". Thanks.

[This is an automated message. Apologies if it has reached you inappropriately; please just reply to this message indicating so.]

tags: added: kj-triage
Changed in linux (Ubuntu):
status: Triaged → Incomplete
Revision history for this message
Savvas Radevic (medigeek) wrote :

I changed a router not so long ago and the uploading problems somehow disappeared. I'm setting this as "Invalid", hoping that I will not encounter this incident again. :)

Changed in linux (Ubuntu):
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.