Apple Event: May 7th at 7 am PT

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Any way to throttle photo upload?

After upgrading to 10.10.3 and Photos, it seems that the upload of my library to iCloud is consuming all of my available bandwidth, to the point where my Mac and any other device in my house has become unusable. In Activity Monitor, nurlsessiond is at the top of the list with about 1000x the sent packet rate of the next highest process.


With 400 GB of pictures to upload, am I going to have to live with this for the next week or is there a way I can slow down the upload rate, even if it means my library will take longer to upload?

Mac mini (Late 2012), OS X Yosemite (10.10.3)

Posted on Apr 10, 2015 1:15 PM

Reply
8 replies

Apr 22, 2015 1:36 PM in response to David Krug

This is geeky but seems to work: Use Apple's Network Link Conditioner (NLC) to limit the upload speed from your computer.


  1. Download the NLC system preference from the Apple Developer's site. It is part of the Hardware IO Tools.
  2. Install the NLC system preference.
  3. Open the NLC system preference and create a new profile.
  4. Limit the Uplink speed. I chose about 60% of my available uplink bandwidth and that seems to work OK.
  5. Set the Downlink limit to something at least close to your ISP's bandwidth or above.

You'll probably need to play around with the limits. Remember that it affects all of the network traffic in and out of the computer so something like a Time Capsule backup might go really, really slowly.

Here's the setting I used:

User uploaded file

Jun 18, 2015 12:14 PM in response to David Krug

thanks David. my connection went from 70mbps to 3-16mbps once i turned on the iCloud upload.


just to clarify for those not familiar with the developer download page, uncheck everything but developer tools, then look for:

Hardware I/O tools for Xcode


i used v 7 beta and it works fine


once it downloads, open the .dmg, then double click on the Network Link Conditioner and it will get added to your preferences pane.

Jun 23, 2015 7:51 PM in response to David Krug

Hi, I somehow scrambled some command line magic in order to throttle only outgoing PORT 443. That way only Photos (and maybe other uploads you use from the browser?) get throttled. I needed this so that the throttling does not interfere with time machine backups and other stuff.


** DO THIS AT YOUR OWN RISK **


First step:

Edit the file /etc/pf.conf (might need administrator privileges. Remember to back up!!) and add this at the very end (you can change "com.pda" to something else if you want):

# com.pda icloud throttling

dummynet-anchor "com.pda"

anchor "com.pda"


Second step:

Create a new file called "dummynet" (you can change the name as well), and put it somewhere safe (i.e. /Users/<youruser>/) That new file must have this single line:

dummynet out quick proto tcp from any to any port 443 pipe 1

Third step:

Create a new file called "port443throttle.sh" with these contents, and put it somewhere safe (i.e. /Users/<your username>/):

#/bin/bash

sudo dnctl -f flush

sudo pfctl -f /etc/pf.conf

sudo pfctl -a com.pda -f /Users/<your username>/dummynet

# Change 3Mbit/s to whatever you like, its the maximum upload speed setting

sudo dnctl pipe 1 config bw 3Mbit/s

sudo pfctl -e

Fourth step:

Do this on terminal:

sudo chmod +x /Users/<your username>/port443throttle.sh

sudo /Users/<your username>/port443throttle.sh


Terminal will ask for your administrator password. Done!


Disable max upload speed:

If you want to revert changes for a while, you just have to do this in terminal:

sudo dnctl pipe 1 config bw 0


Disable the pipe throttling:

Just revert the changes on pf.conf and do this on terminal:

sudo dnctl -f flush

sudo pfctl -f /etc/pf.conf

Good luck!

Jan 2, 2016 9:53 PM in response to pdazero

pdazero-- nice post; I like how you limit traffic shaping to outbound port 443. Network Link Conditioner is pretty useful but it applies to *all* outbound traffic, not just port 443.


I ended up implementing a simpler way of achieving the same result using the same essential technique. I put the solution write-up (along with relevant scripts) here:

https://earthalbumblog.wordpress.com/2016/01/03/black-magic-throttling-uploads-t o-amazon-cloud-drive-google-drive-and-ic…


My wife was getting irritated at me because I kept sopping up all of the outbound Internet traffic; this fixed it. Hope this helps someone else!

May 21, 2016 8:14 PM in response to mayall

NLC sounds like a good thing, but ultimately it is just a workaround. The "real" solution is to get one's home gateway to implement something to deal with buffer bloat - fq_codel, pie, or cake depending I suppose - they are all Active Queue Management (AQM) mechanisms which the home gateway firmware writers aught to be including in their firmware. Because it is at the home gateway where the uplink bottleneck resides and that is where it should be addressed. I'm presently trying to find such functionality to go into my own home gateway, an NVG589 via AT&T U-verse, so whenever one of my kids uploads a video I can still do all my old fuddy-duddy Internet things 🙂 If I cannot find a working home gateway firmware I'll have to fall back on the NLC workaround.

Any way to throttle photo upload?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.