About Caching service

What is Caching service?

The caching server speeds up the download of software distributed by Apple through the Internet. It caches all software updates, App Store purchases, iBook downloads, iTunes U downloads (apps and books purchases only), and Internet Recovery software that local Mac and iOS devices download.

You can find the current list of supported content types in the Apple Support article Content types supported by the Caching service.

The caching server supports clients with OS X v10.8.2 or later and iOS 7 or later, and by default is configured to support clients that share the same public IP address behind a NAT.

How does it work?

A computer running Caching service keeps a copy of all operating system updates, Mac and iOS App Store downloads, and iBooks content that local networked computers (called clients) download.

For example, when the first client on your network downloads an operating system update, Caching service keeps a copy of the update. When the next client on the network connects to the App Store to download the update, the update is copied from the server rather than from the App Store.

Because the local network is normally much faster than the Internet, the second client (and all subsequent clients) downloads updates much faster.

The following figure is an example of a single private subnet with a caching server:

Single subnet caching server

What if my network is more complicated than that?

Caching service can be used with several kinds of network configurations. You can set up caching service for individual subnets, private IP address range subnets, and even subnets of publicly accessible IP address ranges.

Usually a caching server is limited to a specific subnet, but you can set it to provide service for:

If your network has multiple subnets that share the same public IP address, all the subnets can take advantage of a single caching server. For example, the following figure shows a network with two subnets sharing a single caching server:

Multiple subnet caching server

Can I have more than one caching server?

When your network has more than one caching server, the servers automatically become peers and can consult and share cached software. For example, if your network has two caching servers on the same local network, when a request for an item isn’t available on one caching server, the server can consult its peer server on the same network for the requested item. If the requested item is available, it’s downloaded locally from the peer server. If it’s not available, the caching server must download the item from the Internet. The use of peer servers further reduces the need to access the Internet for every download request. Clients automatically select the right server, when more than one caching server is available.

Where are the cached files stored?

The default location for cached content is the boot volume. You can choose an alternate location and specify how much of the volume is used by Caching service. When the caching server receives and accepts requests to download and cache content, more of your disk space is used to store the cached content. When the disk space for the cached content reaches the maximum you specified in the Caching pane, or when the available space on the volume reaches 25 GB, the caching server deletes the least used cached content to make space for the next request.

Compare Caching service to Software Update service

The Software Update server and the caching server both provide updates to software installed on Mac clients with some key differences:

If you need client management functionality, use the Software Update server for updating your Mac clients. Also, if you configure your client to use the Software Update server, it takes precedence and the client cannot use the caching server.

Important:  The Caching and Software Update servers can coexist on the same server, but they don’t share cached content, which may result in additional disk space being used.

Performance best practices

You can get the best performance from your caching server by connecting it to your network using Ethernet. The caching server 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.

To determine if your server hardware is your performance bottleneck when a large numbers of clients are accessing the server simultaneously, check the Processor Usage graph in the Stats pane. If the processor usage is constantly at or near the maximum, you may want to add additional caching servers to distribute your clients’ caching requests across multiple servers.

Also, if your server is in an environment where clients download a wide variety of large amounts of content, be sure to set the cache size limit high enough. This prevents the caching server from deleting cached data frequently, which may cause it to download the same content over again, at the expense of more Internet bandwidth consumption.

See also
Provide a Caching server
DNS settings for Caching without a NAT