Tell me more ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

What's a good software solution to slow down internet connections on the mac for testing and simulations?

My primary need is when testing code in the iPhone / iOS simulator, so slowing down the connection for specific applications or processes would be great.

share|improve this question

7 Answers

up vote 57 down vote accepted

Apple has made a very handy official tool to slow down the network on the mac for testing.

It's called the Network Link Conditioner and it's a free download of Xcode for Lion users. Most older versions of Xcode before version 4.3.2 embedded a copy of this tool. Now, you use Xcode to download it directly in a similar manner to the iOS simulators and developer documentation.

enter image description here

There are 11 built in profiles from a Lossy Edge network with 400ms delay to a cable modem. If you need other limits, you can also use ipfw yourself as described in Craig Hockenberry's article slow ride, make it easy It also mentions the Speed Limit panel by Mike Schrag that is a smaller download than Xcode, but has fewer options than Apple's tool.

It slows down the entire network stack, so you can't throttle on a per app basis without doing things like install lion in a virtual machine and set that VM with a throttled stack.

share|improve this answer
1  
:O I even have Xcode and didn't know about this – XAleXOwnZX Sep 4 '11 at 1:36
4  
Be sure to shut it off after you're done testing! – Jason Salaz Sep 6 '11 at 18:51
Clarification: you actually have to download the hardware IO tools from Apple. See Installing Apples Network Link Conditioner Tool – daviesgeek Apr 20 '12 at 18:50
2  
Speed Limit mentioned below works excellently. I'm using it now for localhost:8888 on MAMP. – Anriëtte Myburgh Apr 22 '12 at 23:27
1  
Also note that iOS 6 has the network link conditioner for testing on the device. Access it via Settings->Developer under the "Network Link Conditioner" section. – Mike Weller Nov 21 '12 at 16:42
show 2 more comments

Speed Limit is a System Preferences pane for intentionally and selectively slowing down specific ports and domains.

share|improve this answer
I like that it's more granular than the XCode tool mentioned in the accepted answer. Thanks for the suggestion. – sholsinger Sep 8 '11 at 18:42
Thanks, this works REALLY great for localhost. – Anriëtte Myburgh Apr 22 '12 at 23:28

OSX provides ipfw to define custom firewall rules. Using this tool you can create a pipe with limited bandwidth.

  1. Create a pipe "1" limited to 500KBytes/s via

    sudo ipfw pipe 1 config bw 500KByte/s
    
  2. Guide all network traffic of port 80 through pipe "1" using

    sudo ipfw add 1 pipe 1 src-port 80
    
  3. When you don't need the pipe anymore, remove it from the port using

    sudo ipfw delete 1
    

Other

  • If you want to set higher traffic barriers, you can use MByte/s
  • Port 80: standard port for unencrypted http traffic. This port is used for most browsing and downloading. You should be fine with this in most cases.
  • Port 443: standard port for SSL encrypted https traffic.
share|improve this answer
+1 for automation. – janmoesen Mar 29 '12 at 20:28

If you only need throttling for Web development, I can wholeheartedly recommend Charles. It's an excellent tool for debugging HTTP applications anyway, and among its many features, it's got a Throttle option. The software isn't cheap, but it does an excellent job.

share|improve this answer
I actually need it for the iPhone simulator.. and testing connections to a server – Patrick Sep 3 '11 at 18:33

If your xcode 4.2.x deleted your /Developer then you can download it again by

Xcode > Open Developer Tool > More Developer Tools

share|improve this answer

There is also this tutorial on how to slow down your network.

share|improve this answer

I think u need to have DNS configration check tutorial from here

share|improve this answer
1  
Slowing down DNS resolution is a very bad way to simulate a slow internet connection. Not only do most routers cache DNS results, the system also caches these results so you would only be slowing the initial connection to a new computer - and not the traffic being sent back/forth once the simulation is up and running. – bmike Dec 29 '12 at 14:55

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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