Skip to content

How to use content caching to save bandwidth, speed up iCloud access software downloads

2018 July 17
by RSS Feed

macOS’s content caching helps reduce Internet data usage and speed up software installation on your iPhone, iPad, Apple Watch, Mac and Apple TV. Here’s how to use this feature to avoid repeated downloads, reduce bandwidth usage and accelerate software installation.

Previously found in macOS Server, content caching requires macOS High Sierra or later.

Content caching reduces bandwidth usage and speeds up installation on supported devices by storing software updates, apps and other content on your designated Mac computer. The computer keeps a copy of all content that local networked devices, called clients, download from the Internet.

Many people’s Internet connection is much slower than their local network. For them, any subsequent clients download the cached app much faster. All cached content is available for client devices to retrieve directly from the cache, without going out over the Internet.

Tethered and untethered caching

macOS Sierra 10.12 and iOS 10.3 and later support tethered caching.

With tethered caching, your Mac can share its Internet connection with many iOS devices connected via USB and cache specific types of content as they are installed on each connected device. Never operating system versions such as macOS High Sierra 10.14 and iOS 11 and iOS 12 support tethered and untethered caching.

Tethered caching in High Sierra sports more specific control and does not require client devices to connect to the host via USB. Basically, it’s an enhanced, untethered version of tethered caching with a prettier interface and more features.

A screenshot showing the iOS software update screen

Content cache dramatically speeds up downloading of iOS software updates on multiple devices

With caching enabled, any apps, software and media you download from the Internet are copied to your Mac and cached there so they can be delivered over Wi-Fi to each of the connected iOS devices for installation.

You can take advantage of content caching to speed up things like installing large apps, downloading app updates, OS firmware files and media from iTunes Store and iBooks Store, and much more. Using content caching will save you time, local Wi-Fi and bandwidth, especially when updating several devices at once vs. each device updating individually over Wi-Fi.

About content caching in macOS

Content caching is a new feature in macOS High Sierra 10.13 and later.

Designed to accelerate software downloads and iCloud performance by caching content that client devices have already downloaded, this feature can speed up the following operations:

  • Downloading of Apple-distributed installers on Macs, iOS devices and Apple TVs
  • Installation of software distributed by Apple on Macs, iOS devices and AppleTVs
  • Downloading/uploading of user data in iCloud

macOS Server and macOS include built-in support for caching these content types and apps:

  • iTunes for Mac and Windows
  • App Store, Mac App Store and tvOS App Store
  • On-demand resources for iOS and tvOS apps
  • iBooks Store content on iOS and macOS
  • iTunes U course materials from App Store and iBooks Store
  • Uploaded iTunes U instructor materials like audio, video, iWork and iBooks Author files
  • iTunes for Mac updates
  • macOS Printer drivers
  • High-quality voices for Siri
  • Language dictionaries
  • Other mobile assets
  • GarageBand downloadable content
  • Other software updates distributed by Apple
  • Over-the-air iOS and tvOS software updates
  • macOS software updates
  • iOS, macOS and tvOS app purchases
  • iOS, macOS and tvOS app updates
  • iCloud photos and documents on iOS and macOS

iOS and tvOS updates downloaded using iTunes for Mac or Windows are never cached—only the software updates for iPhone, iPad and Apple TV delivered over the air are cached.

Photos, documents and your other iCloud files are received, stored and transmitted encrypted so someone sniffing around your content cache cannot decrypt it.

How content caching works

Long story short, the content caching feature simply stores local copies of supported downloads on your computer so the downloads are faster for any locally-connected clients.

When set up on your Mac, content caching automatically works for any iPhone, iPad, Mac or Apple TV client devices without having to configure anything, really.

When a client device downloads cacheable content from the Internet, like an iOS software update or a book from iBooks Store, a copy of the download is stored in a content cache on your Mac for other devices to retrieve without going to the Internet.

For instance, an iPhone on your network just downloaded an app from App Store. The caching service running on your Mac stores a copy of the update. When the next client on the network, like an iPad, attempts to connects to the store to retrieve the same app, it is copied from the cache rather than from App Store itself.

Content caching requirements

Setting up untethered content caching requires:

Host(s):

  • A Mac computer with macOS High Sierra and later

If your Mac is running an older macOS version, be sure to upgrade to macOS High Sierra or later in order to take advantage of the content caching features built into the operating system.

Client(s):

  • An iPhone, iPad or iPod touch with iOS 7 and later
  • A Mac computer with macOS High Sierra 10.13 and later
  • An Apple TV 4K or the fourth-generation Apple TV with tvOS 10 and later

Also, the host and client must be on the same local Wi-Fi network.

Setting up content caching on a client device is a zero-configuration effort—Apple devices with iOS 7 or later and OS X Mountain Lion 10.8.2 or later automatically contact a nearby content cache without any configuration.

“You can use caching on networks consisting of a NAT environment for the content cache and all devices, or on networks consisting of publicly routable IP addresses,” says Apple.

Content caching is unsupported on wireless networks that use non-RFC 1918 addressing locally, as well as on networks that use different non-RFC 1918 addressing publicly, but more on that in Apple’s support document.

macOS even lets you set up multiple content caching hosts

This illustration shows a local network with two subnets sharing a single content cache

It should be underscored, however, that certain content caching features may require different versions of the operating system and stock apps. For guidance, this is what you’ll need for the following content caching features:

  • iTunes caching: iTunes for Mac and Windows 11.0.4 and later
  • iBooks Store caching: iOS 6 and later, OS X Mavericks and later
  • Mac App Store caching: OS X Mountain Lion 10.8.4 or later
  • iCloud photos and documents caching: iOS 9 and up, OS X El Capitan 10.11 and later
  • On-demand resource caching: iOS 10 and later, tvOS 10 and later

You should also follow Apple’s recommendations for content caching whenever possible:

  • Allow all Apple push notifications
  • Don’t use manual proxy settings
  • Don’t proxy client requests to content caches
  • Bypass proxy authentication for content caches
  • aSpecify a TCP port for caching
  • Manage inter-site caching traffic
  • Block rogue cache registration

It’s important to note that not all content is cached in all regions.

Most notably, as of December 2013 any iTunes downloads in Brazil, Mexico, China or Portugal are not cached, while iBooks downloads are not cached in Canada.

If you’re planning on setting up content caching on your Mac primarily to speed up iTunes downloads, be sure that a client’s IP address is associated with your iTunes Store region to avoid not having those downloads cached.

Mac mini as the perfect content caching client

Content caching must be set up on a Mac.

Have a Mac mini lying around somewhere? Breathe it a new lease of life by connecting the machine to your local network via Ethernet and setting up a content cache on miniAn image depicting an overhead view of an iMac along with a Mac mini, Apple wireless keyboard and mouse

The benefits of caching may not be readily apparent if you only have a single iOS device. But if you’re a happy user who happens to own an iPhone alongside an iPad or an Apple TV, save your network bandwidth by setting up content caching on your Mac.

Here’s how.

How to turn macOS content caching on or off

To use content caching on your Mac, you must:

  • Enable Internet connection sharing
  • Update your iOS devices to iOS 10.3 or later
  • Connect your Mac to the Internet via Ethernet and plug it into power

While content caching can also use a Wi-Fi connection instead of a wired Ethernet connection, performance will be severely affected by multiple client requests at the same time.

Content caching is affected by two main factors: connectivity and hardware configurations.

“You get the best performance from your content cache by connecting it to your network using Gigabit Ethernet,” Apple cautions. “The content cache can serve hundreds of clients concurrently, which can saturate a Gigabit Ethernet port. Therefore, in most small to medium scale deployments, the performance bottleneck is usually the bandwidth of your local network.”

If your Mac is a notebook, it must be connected to power because the content caching feature prevents your computer from going to sleep.

TUTORIAL: 2 ways to prevent your Mac from going to sleep

To prevent your Mac from going to sleep, use the “caffeinate” command line utility in Terminal, download a third-party app like Caffeine or tick the box next to “Prevent computer from sleeping automatically when the display is off” in System Preferences → Energy Saver.

And now, here’s how to turn content caching on and off.

1) Open System Preferences on your Mac with macOS High Sierra or later.

2) Click the icon labeled Sharing.

System Preferences on macOS Mohave with the Sharing icon highlighted

3) Tick the box next to Content Caching in the service list on the left.

Wait for the indicator to turn green before proceeding to the next step.

Here’s what the indicator lights mean:

  • Green: Content caching is on
  • Yellow: Content caching is unavailable, or in the process of starting or stopping
  • Dark gray: Content caching is currently moving data, with the indicator color filling in gradually to show the progress of the operation
  • Light gray: Content caching is off

To share your Mac’s connection and cached content with iOS devices connected to the computer using the wired USB protocol instead of Wi-Fi, tick the box Internet Connection (the first time you connect your iPhone or cellular iPad to your Mac using USB, tap Trust on the phone/tablet to authorize the connection).

You can use tethered or untethered content caching, with or without Internet sharing.

A screenshot of System Preferences in macOS Mojave showing the Content Caching option enabled

4) Close out the System Preferences window.

To turn content caching off, just untick Content Caching in the service list on the left.

Advanced users may want to explore additional features to set the cache size, choose the items they want cached, set up additional content caching options for their network and fine-tune other settings outlined further below.

A screenshot showing a warning message in macOS Mojave informing the user that restarting client devices lets them use the content cache immediately

Apple advises restarting all client devices after turning the content cache on, changing cache size or adjusting other features so that they can take advantage of the changes immediately. If you don’t restart your client devices, it may take a while before they automatically identify a new content cache on the network.

Selecting the items you want cached

Use the Sharing preference pane to select the items that get cached:

1) Open System Preferences on your Mac with macOS High Sierra or later.

2) Click the icon labeled Sharing.

3) Select the Content Caching checkbox in the service list on the left.

4) Click the pop-up menu labeled Cache on the right then choose the content you want cached:

  • All Content: Store OS updates and apps downloaded from Apple, plus iCloud content
  • Only Shared Content: Store only software updates and apps downloaded from Apple
  • Only iCloud Content: Store only iCloud content, such as photos and documents

If you disable iCloud caching, all cached data from iCloud, like your Pages and Numbers documents, is immediately removed from the content cache on the computer.

A screenshot in macOS Mojave showing content caching being restricted to iCloud content only

5) Close out the System Preferences window.

Setting the cache size

Do the following to set the options for cache size:

1) Open System Preferences on your Mac with macOS High Sierra or later.

2) Click the icon labeled Sharing.

3) Select the Content Caching checkbox in the service list on the left.

4) Click Options on the right.

A screenshot showing in macOS Mojave showing the Options button in content caching settings

5) Drag the slide to set the amount of storage your Mac uses for cached content.

“If your Mac is in an environment where clients download large amounts of a wide variety of content, be sure to set the cache size limit high enough,” Apple cautions. “This prevents the content cache from deleting cached data frequently, which may necessitate downloading the same content multiple times, thereby using more Internet bandwidth.”

The amount of storage your Mac’s using for cached content is listed next to Storage Used.

6) Click OK to use your new cache size or Cancel to abort the operation.

7) Close out the System Preferences window.

A screenshot illustrating adjusting the content cache size in macOS Mojave

You can launch the stock Activity Monitor app from your Applications/Utilities folder to determine whether you’ve allocated enough storage for the content cache and access other statistics. If a large number of clients are accessing the content cache simultaneously, performance will suffer significantly.

Should that happen to you, increase your content cache size further.

Clicking Cache in the app’s window reveals interesting content caching activity and statistics like the amount of data uploaded to and served from the cache, whether caching is working and helping, check that the content cache has enough space and more.

To determine if your Mac is the performance bottleneck when a large number of clients are accessing the content cache simultaneously, check the processor usage for the AssetCache process in Activity Monitor. IF the CPU usage is constantly at or near the maximum, Apple advises adding additional content caches to distribute the requests across multiple computers.

Moving your cache

By default, the cached content is stored on the boot volume. Thankfully, users are permitted to move their content cache to a custom folder on their Mac or an external drive:

1) Open System Preferences on your Mac with macOS High Sierra or later.

2) Click the icon labeled Sharing.

3) Select the Content Caching checkbox in the service list on the left.

4) Click Options on the right.

5) Click the Edit button next to Cache Location.

6) Select a storage volume, then click Move.

7) Close out the System Preferences window.

Content caching stops temporarily while the existing cache is moved to the new location.

This option is unavailable unless you have multiple volumes on your Mac. This option is not for the faint-hearted because a missing folder or disk can easily stall caching forever. Pro users can move their cache from the command line.

Emptying the content cache

To empty your content cache, do the following:

1) Open System Preferences on your Mac with macOS High Sierra or later.

2) Click the icon labeled Sharing.

3) Select the Content Caching checkbox in the service list on the left.

4) Click Options on the right.

5) Click Reset then click Reset again to verify the request.

You won’t see this option if the content cache hasn’t been used yet.

6) Close out the System Preferences window.

According to Apple, when the disk space for the cached content reaches the maximum you specified or the available space on the volume runs low, the cache deletes content that hasn’t been used recently to make space for the next request.

Other content caching options

The instructions above will help you set up content caching for any Macs you use at home. Content caching is also available to enterprise users with advanced features outside the scope of this step-by-step tutorial (just one example: you could assign parent and children caches to make tiered configuration possible).

A screenshot showing content caching options for peers in macOS Mojave

If you own a small company or run a home business, turn that outdated iMac into a caching machine. Your other office locations could then use this iMac as their parent caching service so that updates flow from the main office to each location.

To get the most out of content caching, peruse Apple’s support documents:

You can adjust advanced content caching features such as clients, peers and parents, venture into System Preferences → Sharing → Content Caching, then press and hold the Option (⌥) key and click Advanced Options.

A screenshot showing holding the Option key to access advanced content caching options

And that’s all you need to know about content caching on your Mac!

Need help? Ask iDB!

If you like this how-to, pass it along to your support folks and leave a comment below.

Got stuck? Not sure how to do certain things on your Apple device? Let us know via [email protected] and a future tutorial might provide a solution.

Submit your how-to suggestions via [email protected].

Source link: http://www.idownloadblog.com/2018/07/17/howto-mac-content-caching/

Leave a Reply

Note: You may use basic HTML in your comments. Your email address will not be published.

Subscribe to this comment feed via RSS