This article describes how to optimize performance in advanced Media Cache configurations.
Optimize source performance
Media Cache Source properties describe how data is retrieved from a source when content is requested. Understanding how the three source properties—DefaultBlockSize, ReadAhead, and ReadAheadThreshold—work together will help you to choose the most effective settings for your deployment.
The default values for DefaultBlockSize (1M) and ReadAheadThreshold (30) indicate that whenever content is required, it's retrieved in 1 MB blocks, and when 30 percent of one block is read, the next block is retrieved.
To select an appropriate DefaultBlockSize value, determine the average size of all assets in use, and then divide by 1000. For example, if the average asset size is 1G, the DefaultBlockSize should be 1000K (1M). This value is four times larger than the default value and will reduce the number of requests to the source for the complete asset to one-fourth the default rate.
Note: DefaultBlockSize values greater than 4M might not increase performance.
To select an appropriate ReadAheadThreshold value, consider the speed of the source and the bandwidth between the source and the Wowza Streaming Engine server. The default value (30) signifies that when 30 percent of the current block is used, the next block is retrieved. If the source or connectivity is slow, you may need to reduce the value. For example, try a value of 25.
Note: ReadAheadThreshold should not be set to a value greater than 50 percent, even with an extremely fast and well-connected source.
Optimize local cache performance
The speed of the local cache is critical to Media Cache performance. We recommend using a third-party tool that tests storage speed to determine the maximum write speed for the cache. If the store's Write Rate value is too high, write failures and read errors may occur and cause performance to degrade.