Whenever I use Homebrew or Apple Store to download a large application, it sucks all my available bandwidth and I am then unable to browse the web.

How can limit the bandwidth per-application or per-process in OS X Yosemite (command line preferred, but GUI apps accepted)?

I've played a bit with IceFloor application, which suggested I use ALF firewall, but I don't know how to set it up.

The feature you want is confusingly called Quality of Service or "QoS" for short.

These days it is usually configured for an entire network, or subnet, using the management interface on a smart switch (which costs a little more than an Ethernet hub with the same number of ports, but not much more--here is a representative model from Cisco for under $100).

The closest equivalent that runs on OS X directly is ThrottleD from IntraArts:

Throttled Pro [gives you] weighted network queues (WF2Q+) that guarantee bandwidth for all your essential network services like web browsing, email, and online gaming. In addition, it provides ACK packet priority which speeds up downloads when you are sending out a lot of data. This combination assures that you get the most out of your internet service.

The GUI version is $20, while the CLI version is donationware.

  • Would this work for a CLI process (e.g. homebrew) ? – David May 18 '15 at 22:13
  • Yes, I think so. You just need to have some way of reliably distinguishing homebrew's packets from any others, such as running it through a specific port. – dodgethesteamroller May 18 '15 at 22:53
  • awesome! I'll have a look. – David May 19 '15 at 0:27
  • ThrottleD fits exactly my use case, except that it does not work with OS X 10.10 Yosemite. Apple changed its firewall from ipfw to pf, but Darwin's kernel does not fully implement ALTQ yet (read here) – David May 19 '15 at 6:43

Charles Proxy can do throttling. The app functions as a proxy server on your machine. You can redirect traffic that you want to throttle to its way. The throttled app has to come with its own proxy settings.

  • Squid is a proxy server that comes with OS X and can be configured to throttle as well, but I didn't suggest it because not all programs will play nice with a proxy. – dodgethesteamroller May 18 '15 at 21:37
  • Interesting idea, I suppose I could set the system proxy but that would affect all OSX apps. Is throttling enabled globally or per-application? – David May 18 '15 at 22:11
  • @David Squid is an HTTP proxy so it (to oversimplify a little) affects GET and PUT file requests. You can tell it to filter or throttle by specific file extensions, but not AFAIK by application per se. – dodgethesteamroller May 18 '15 at 22:52
  • That's what I thought, thanks for the clarification – David May 19 '15 at 0:26
  • Just set up Charles to do this very thing. It's not "per-app" throttling, but it is per host so in most cases that works. Just inspect the Charles log to see what hosts are being accessed when you start your app process and then add only those hosts to the throttle settings. – davidethell Jul 21 '16 at 23:57

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.