I had a problem that iCloud syncing was consuming all my upstream bandwidth, which was causing my browsing experience to suck on my residential cable connection.
Thankfully, because <biased>Macs are awesome and based on Unix</biased>, there is an easy fix:
Last login: Sun Dec 30 17:59:20 on ttys000
Chipmunk:~ james$ sudo ipfw pipe 1 config bw 15KByte/s
Chipmunk:~ james$ sudo ipfw add 1 pipe 1 dst-port 443
00001 pipe 1 ip from any 443 to any
There’s a little bit of stuff going on here. First, we are using the ipfw tool to create a pipe that is limited in bandwidth to 15KB/s. We have to use sudo to perform this privileged operation, so it does ask for your password.
Second, we setup a rule such that any traffic heading towards port 443 will be sent through that rate-limiting pipe. iCloud uses port 443 for it’s traffic (as does all your HTTPS traffic, so be aware this will limit ALL THE HTTPS THINGS and not exclusively iCloud stuff).
The results should be immediate. If you’re using the excellent iStat Menus, you can check the progress there.
The changes are temporary, and when you reboot, the rule will be gone. If you wish to delete the rule without a reboot, it’s as simple as:
sudo ipfw delete 1.