Publishers of technology books, eBooks, and videos for creative people

Home > Articles > Apple > Operating Systems

From the book Reference 16.4 Troubleshooting the Caching Service

Reference 16.4 Troubleshooting the Caching Service

The Caching service is transparent, so there isn’t much troubleshooting necessary. The first time a client downloads an item that isn’t already cached, that initial download isn’t any faster. However, subsequent downloads of the same item, whether from the same client or from a different client, are limited only by the speed of the disks of the client and the server, or the bandwidth of the local network.

Deleting Items to Test the Caching Service

To test downloading items, you can use a computer that’s an eligible client of the Caching server to download an item from iTunes (11.0.2 or later), the Mac App Store, or the App Store, then delete it, and download it again (or download the same item from multiple eligible clients) and confirm that the subsequent download speeds are appropriate for downloading items locally as opposed to across the Internet.

Confirming the Basics

If you suspect problems with the Caching service:

  • For iTunes, confirm that iTunes is version 11.0.2 or later. On a Mac, choose iTunes > About iTunes. On a PC with Windows and iTunes, on the Help menu, click About iTunes.
  • Confirm that the Caching service is turned on in the Server app. The Caching service status indicator in the Server app sidebar list of services is green when the service is turned on.
  • Confirm that the client and the server have the same public IPv4 source address on the Internet side of a NAT device.
  • Confirm that the Mac clients are not configured to use a Software Update server.
  • Confirm that iOS devices are using the same network as your Caching service. In other words, confirm that the iOS device is using Wi-Fi, and is not using only a cellular network.
  • Check the Cache Used field. If the value is “None,” perhaps no eligible client has downloaded any eligible content.

Use Activity Monitor to confirm that your server is downloading items from the Internet and then serving items to clients. On your server, open Activity Monitor, choose View > All Processes, click the Network tab, set the pop-up menu to Data, and monitor the graph. When the Caching service downloads an item from the Internet to cache it, this is reflected in a purple “Data received/sec” line. When the Caching service sends a cached item to a local client, this is reflected in a red “Data sent/sec” line.

Using the Caching Service Logs

You can use the Logs pane of the Server app to check the service log for the basics. In the Logs pop-up menu, choose Service Log under the Caching menu item. If the system log has been automatically rotated as part of daily system maintenance tasks, the Logs field may simply contain “No contents to display.” This view filters out any line in the generic system log that does not contain the “AssetCache” string.

For more detailed information, use the Console app on your server. Choose File > Open, navigate to /Library/Server/Caching/Logs, select Debug.log, and click Open. You can click Hide Log List in the Console app toolbar to devote more room to displaying the log contents.

Some strings in Debug.log that might help you understand what is happening include:

  • “Issuing outgoing full request” when the Caching service downloads an item from public servers
  • “Data already cached for asset” when the Caching service already has an item cached locally

Some items have human-recognizable names, but other items have names that might seem random.

Understanding Performance Bottlenecks

A single Caching server can handle hundreds of clients simultaneously and can saturate a Gigabit Ethernet network interface. To determine if your server (as opposed to local network capacity) is the bottleneck, open Activity Monitor on your server, click the CPU tab, and monitor the CPU Usage graph. If your server’s CPU usage is near its maximum, consider additional servers for the Caching service.

Moving the Caching Service Data Volume

If you attach a new volume to your server after you’ve started the Server app and connected to your server, choose View > Refresh (or press Command-R) in order to select the newly attached volume as the destination for the Caching service. After you choose a new location, the Server app automatically moves the cached content to the new volume.

Peachpit Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from Peachpit and its family of brands. I can unsubscribe at any time.