Throttling Spotify bandwidth
Tried to work over ssh or similar when using Spotify at the same time? Since it hogs the bandwidth, especially on poor connections, it halts and slows down terminals and other sensitive connections. By throttling the bandwidth, you can get a smoother experience without the spikes.
Trickle is the perfect tool for it, its described as “trickle is a portable lightweight userspace bandwidth shaper.”.
If you look at the launcher for the installed spotify, it looks something like this:
$ env WINEPREFIX="/home/eric/.wine" wine "C:\Program Files\Spotify\spotify.exe"
The trickle help is a good start, and its really helful.
$ trickle --help Usage: trickle [-hvVs] [-d <rate>] [-u <rate>] [-w <length>] [-t <seconds>] [-l <length>] [-n <path>] command ... -h Help (this) -v Increase verbosity level -V Print trickle version -s Run trickle in standalone mode independent of trickled -d <rate> Set maximum cumulative download rate to <rate> KB/s -u <rate> Set maximum cumulative upload rate to <rate> KB/s -w <length> Set window length to <length> KB -t <seconds> Set default smoothing time to <seconds> s -l <length> Set default smoothing length to <length> KB -n <path> Use trickled socket name <path> -L <ms> Set latency to <ms> milliseconds
Depending on your connection, you would want to tune the settings a bit, I set mine for 150kpbs up and down which didnt interfere with the rest of stuff I where doing at the time.
$ env WINEPREFIX="/home/eric/.wine" trickle -d 150 -u 150 wine "C:\Program Files\Spotify\spotify.exe"
Oh, btw, this works very good on most *nix and bsd operating systems that trickle works on. Of course you need to get Spotify running first. I guess something similar would work on OSX. I’m not aware of a solution that works on that other os that costs a lot of money and doesnt work as well. ;)
blog comments powered by Disqus
© 1997 - 2010 | Part of the PTM Network