Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

OS X has a handy GUI tool called the Network Link Conditioner, which lets you easily set up simulated network conditions. The inbuilt profiles are a bit optimistic, I find, but it's easy to add more.

It's just tc or the BSD equivalent under the hood, but it's point and click and easy to turn off.

More details at: http://mattgemmell.com/2011/07/25/network-link-conditioner-i...



Neat -- I'm still on OS X 10.6 and didn't know about this. Thanks for the pointer!

I guess the advantage of a dedicated pain box is that any device, regardless of operating system, could use it. Network Link Conditioner (and the two pieces of software mentioned so far by siblings of your comment) are all OS X-specific. (That's another webdev gripe for another day.)


Linux has tc, the command line tool, and some other scripts that sit on top of that, like wondershaper.

On Windows, there's a few mentioned here: http://stackoverflow.com/questions/1094760/network-tools-tha...


Speaking to OS X specifically, it's dead-easy to set a machine up to route traffic, so you can use the Mac as a pain box, in this sense. Of course, the same largely applies to any OS these days.


Oh that looks promising and it`s easier than my current solution. Thank you! For years I used the following small note saved on my mac to perform bandwidth tests of my application.

  #create firewall bandwidth configuration
  sudo ipfw pipe 1 config bw 15KByte/s

  #add config to firewall 
  sudo ipfw add 1 pipe 1 src-port 80

  #change. during testing
  sudo ipfw pipe 1 config bw 115KByte/s

  #delete. after testing
  sudo ipfw delete 1


Do you know of an easy way to simulate latency?

I have bash aliases for various levels of ipfw throttling, but I've ended up using other programs because 768k/s with no latency seems to load some kinds of sites disturbingly close to the speed they load if I let the bandwidth back up to its 18mbit/s normal speed, which I think has to do with latency. Lots of the Mac OS standalone programs that do this kind of thing, like Link Conditioner or Speed Limit, add configurable latency to requests as well.


The reason Link Conditioner is 10.7 and up is that it's using pf[0] internally. The man page for pfctl[1] is pretty easy to read after you start to get the basics of how pf works. Be careful applying examples you find online though. Last I heard, OS X's version of pf is slightly newer that FreeBSDs, and moderately behind OpenBSDs.

0: http://www.openbsd.org/faq/pf/

1: http://developer.apple.com/library/mac/#documentation/Darwin...




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: