Add QoS for networking

Bug #63757 reported by Sven Herzberg
14
This bug affects 1 person
Affects Status Importance Assigned to Milestone
network-manager (Ubuntu)
Triaged
Wishlist
Unassigned
transmission (Ubuntu)
Confirmed
Wishlist
Unassigned

Bug Description

(filing under ubuntu-desktop because this is a problem on my desktop and I don't know a better package)

Hey dudes,
  now, that I'm a total fan of http://www.radioseven.se/ I listen to that very often (using rhythmbox). Unfortunately when updating, the stream stops for the whole time of downloading updates. I have a 2MBit connection, the update-manager is getting the files at 235kB/s, it it was throttled to 210kB/s there would be enough bandwidth for both of them.

Please get this working on the default setup. Windows-People are usually amazed when I burn CDs while reading email, and upgrading my system (because Windows isn't that good in doing these things altogether). Why not use the good network-stack to provide these caps in the networking area as well?

Kind Regards

Revision history for this message
Ralf Nieuwenhuijsen (ralf-nieuwenhuijsen) wrote :

Downloading files and browsing websites has a simelar problem. Browsing gets much slower when download some iso at the same time. Couldn't it get paused temporarily?

Revision history for this message
Sven Herzberg (herzi) wrote :

sudo tc qdisc add dev eth0 root sfq perturb 10

This makes a good start (at least for my use case).

Revision history for this message
Tim Butler (timbutler) wrote :

Sounds like an interesting concept to me, the best way to approach this would be to write a specification on it. Here's a list of the current ones: https://features.launchpad.net/distros/ubuntu/+specs

It would need some sort of management tool out there so that you could throttle certain applications and change details, does anything exist like this for desktop use already?

Revision history for this message
Jan Niklas Hasse (jhasse) wrote :

"It would need some sort of management tool out there so that you could throttle certain applications and change details, does anything exist like this for desktop use already?"

This is very complicated even with console tools. The problem is that iptables missing some features to mark packages by a certain program. (if i'm wrong pls tell me)

"Sounds like an interesting concept to me, the best way to approach this would be to write a specification on it."

Well it's just a command so this should be easier fixed:

We must add a command in some startup script so that all network devices use the sfq disc instead of pfifo_fast. Actually, is there any advantage to use pfifo_fast? If there isn't, just add the better sfq disc for all devices without letting the user get so deep in his system.

I think this should be fixed fast because many people i know say that linux network stuff is bad because you can't download and surf on the internet at the same time. On Windows the settings are already taken and you can.
But Linux can too: With the sfq disc i can run bittorrent, voip and surf on the internet! Without i have to stop bittorrent or other downloads because they get my complete network very slow.

Revision history for this message
Ralf Nieuwenhuijsen (ralf-nieuwenhuijsen) wrote :

Has this been implemented for Feisty? Ifso, there is still some time, and it seems like something easy to fix:

sudo tc qdisc add dev eth0 root sfq perturb 10

Who is reponsible for the network-startup scripts?

Revision history for this message
Andres Mujica (andres.mujica) wrote :

I can confirmed this on dapper and gutsy.

Maybe some brave soul can make an spec out of this, or as is suggested implement the right scripts. (but it would be really nice a management frontend something easy , with few options would be fine (for example, with categories for voip, software download, web browsing, etc)

I'll leave it unassigned so a dev can take it from here (if it's ok)

Revision history for this message
Stéphane Graber (stgraber) wrote :

Moving to network-manager as we're not going to do that kind of change in iproute for sure and most comments talk about desktop and configuration UI, so if that's ever implemented, it should be in Network Manager.

affects: iproute (Ubuntu) → network-manager (Ubuntu)
Changed in network-manager (Ubuntu):
status: Confirmed → New
Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

Well, this bug following the exact description is actually fixed: with pfifo_fast (the default currently); you *do* have QoS. When you switch it out to sfq is the point where you no longer have QoS... but that's all just semantics.

What this gets to then is that applications need to be thought to be wise about the choices they make w/r/t how they classify the traffic they send out:

(From the socket(7) manpage)
SO_PRIORITY
    Set the protocol-defined priority for all packets to be sent on this socket. Linux uses this value to order the networking queues: packets with a higher priority may be processed first depending on the selected device queueing discipline. For ip(7), this also sets the IP type-of-service (TOS) field for outgoing packets. Setting a priority outside the range 0 to 6 requires the CAP_NET_ADMIN capability.

That setting can be set with setsockopt().

NetworkManager itself doesn't watch traffic so couldn't be applying special rules to it on a per-application basis.

Perhaps we could provide with a way to switch the scheduler on an interface from NM; but that seems like an advanced enough setting that I'd be a little weary of exposing it in UI, so the end benefit of doing such a change is low. We could still use this bug for that "request" though.

As for transmission, which seems to be the simplest way to reproduce such QoS issues; maybe it's not using the best defaults to be cautious enough with bandwidth. That's hard to choose, but I'm opening a bug task for it anyway.

Please, if you're running into such issues; file bugs with the application(s) that exhibit the issue.

Changed in network-manager (Ubuntu):
status: New → Triaged
Changed in transmission (Ubuntu):
status: New → Confirmed
importance: Undecided → Wishlist
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.