Slow it Down

Most of the time, you test your apps on a fast connection, especially when working on a local machine. Most of your clients/visitors/customers aren’t so lucky, but how do you simulate their connection speed?

If you have installed Xcode on Lion, you have access to a very cool tool called Network Link Conditioner[1].

It is a preference pane, but not installed by default. You’ll find it in /Developer/Applications/Utilities/Network Link Conditioner/ Simply double-click the prefPane and it will install itself.

Once enabled, you can set your network to simulate everything from 3G or Edge to typical DSL. You can even set your own profile to tweak the settings. It works at the network level, so it affects your entire system. No proxies or any other setup needed!

As an example, we have an app in development where we know the users will have high latency. Instead of just hoping they get better connections, we can simulate their situation and test it out, even when we’re using Rails on our laptops. We’re then using it to optimize to their situation, not just blindly[2].

Give it a shot and see how your sites fare.

[1] This may win the award for ugliest Apple icon. Please prove me wrong!

[2] Don’t prematurely optimize. That’s still bad.

Photo of Daniel Morrison

Daniel founded Collective Idea in 2005 to put a name to his growing and already full-time freelance work. He works hard writing code, teaching, and mentoring.


  1. January 18, 2012 at 13:18 PM

    Changing the entire system’s connection is neither needed nor desirable IMO. 

    I wrote a shell script which uses ipfw for exactly this purpose (Most probably this app uses ipfw too) here is the script-

    Run it like

       throttle -p 3000 -d 1000ms -s 256Kbit/s start

    p - Port
    d - network delay you want
    s - speed

  2. January 18, 2012 at 13:41 PM

    Manu: That’s a great tactic too, and I like how it only throttles one port.

    The nice thing about the PrefPane is that it is visible (icon goes in your menubar when on) so you don’t forget it is running, and easier to configure/use for people who don’t live in the terminal.

  3. June 20, 2012 at 21:12 PM

    Looks like iOS 6 is going to have this too!

    (via @jedisct1)