OS X Server – Caching Service Part 2

By David Acland and Richard Mallion

In a previous blog (Caching Service Part 1), we discussed the Caching service that Apple shipped with the latest update to OS X Server.

In this blog we will discuss some of the advanced settings available.

In addition to the standard server.app “on/off” functionality, there is a config file that has a load of extra options.  The values are stored in /Library/Server/Caching/Config/Config.plist.  There is a long list of options but the ones that appear most interesting are:

CacheLimit

Default value – 0 (unlimited)
This option sets the amount of disk space (in bytes) that can be used by the caching service.  E.g:

<key>CacheLimit</key>
<!– Set a CacheLimit of 400 GB –>
<integer>400000000000</integer>

DataPath

Default value – /Library/Server/Caching/Data
This is the path to the cache store.  E.g:

<key>DataPath</key>
<string>/Volumes/BigDisk/Caching/Data</string>

Interface

Default value – Listen on all interfaces
You can use this option to set the BSD Name of the network interface the caching service will listen on.  E.g:

<key>Interface</key>
<string>en1</string>

LogLevel

Default value – info
Use this option to set the logging level for the service.  You can use either off, error, warn, info or verbose.  E.g:

<key>LogLevel</key>
<string>info</string>

MaxConcurrentClients

Default value – 0 (unlimited)
Use this option to set the maximum number of concurrent client connections.  E.g:

<key>MaxConcurrentClients</key>
<integer>100</integer>

Port

Default value – 0 (use any port)
This is the TCP port that the caching service will listen for incoming requests.  E.g:

<key>Port</key>
<integer>54321</integer>

ReservedVolumeSpace

Default value – 25000000000
This sets a limit on the minimum free space the cache drive can have.  E.g:

<key>ReservedVolumeSpace</key>
<!– Set the ReservedVolumeSpace to 1 GB –>
<integer>1000000000</integer>

ListenRanges

Default value – None
You can use this option to specify preferred caching servers when you have more advanced network setups where there are more than one caching server behind a single public IP address.  It stores its data as an array, e.g:

<key>ListenRanges</key>
<array>
<dict>
<key>type</key>
<string>IPv4</string>
<key>first</key>
<string>192.168.14.1</string>
<key>last</key>
<string>192.168.14.254</string>
</dict>
<dict>
<key>type</key>
<string>IPv4</string>
<key>first</key>
<string>192.168.15.1</string>
<key>last</key>
<string>192.168.15.254</string>
</dict>
</array>

To learn more about the Caching Service and other features available to you  in OS X Server why not sit our training course.

Share this post online:

One Response to “OS X Server – Caching Service Part 2”

  1. nsfw says:

    Looks like you can’t trick the DataPath into being a AFP or NFS mounted volume which is a shame. There is no reason not to allow a network mounted disk for this task.

Leave a Reply