windows - Is there a way to limit Spotify's upstream P2P traffic?

17
2014-04
  • Alec

    As indicated here, Spotify slyly uses my bandwidth to provide other users with the service. Is there a way to limit the upstream traffic from Spotify so that my non-unlimited bandwidth is conserved?

    I regularly run both Windows 7 and Ubuntu and I know that I can't entirely block upstream traffic, but I would like to limit it to ~30-50 kbps.

  • Answers
  • eis

    Not from Spotify.

    There are ways to do that with other software, however: Ubuntu has for example trickle and Windows has Netlimiter.

  • sim642

    It might be possible to limit this traffic with your router's Quality of Service function if there is such.


  • Related Question

    linux - Is there any way to limit my Internet connection to a per program basis?
  • Igoru

    My Linux connection is REALLY free.

    I live in Brazil, so where I live I can only have 1 Mbit/s. Yes I know it's sad, but it's not the point.

    Everytime I'm updating my Ubuntu 9.04 or downloading something, it does eat all my bandwidth. Like, while update-manager is downloading the packages, I can see by netspeed applet in my panel that the incoming traffic goes to 110 kB/s. And then, my Emesene suddenly goes disconnected, and I can't navigate.

    As you can imagine, I can't use my Internet connection again until the packages are all downloaded or I cancel the update in the middle.

    As I said, same thing happens when I'm dowloading something, but less intrusive and immediate.


    The question is: is there any way to limit that APT/downloads traffic to some way I can still use my other Internet services, or to reserve some bandwidth for common navigation tasks (like we have on Windows, but I forgot this thing's name, it's like "something packages".


  • Related Answers
  • mark

    You can configure apt to restrict its download speed by setting a configuration file in /etc/apt/apt.conf.d/, as detailed in this post

    Specifically, create a file:

    /etc/apt/apt.conf.d/76download

    that contains the text:

    Acquire { Queue-mode "access"; http { Dl-Limit "65"; }; };

    where "65" is the speed in kb/s

  • rogelio

    For other applications with no auto bandwidth control option, you can use trickle

    Example for APT with upload rate of 20 KB/s and download rate of 50 KB/s (you need sudo trickle):

    sudo trickle -u 20 -d 50 aptitude dist-upgrade

    Example for wget with download rate of 30 KB/s:

    trickle -d 30 wget http://...

    From trickle's man page:

    trickle is a userspace bandwidth manager. Currently, trickle supports the shaping of any SOCK_STREAM (see socket(2)) connection established via the socket(2) interface. Furthermore, trickle will not work with statically linked executables, nor with setuid(2) executables. trickle is highly configurable; download and upload rates can be set separately, or in an aggregate fashion.