Wowza Community

How to know when MediaCache store is full?

I’m using MediaCache with NFS source (WowzaStreamingEngine 4.7.7) but the VOD output streams are not fast as it should be. I see data transfer in from NFS took about the same size as data transfer out to clients.

I suspected that my MediaCache store may not big enough to hold all the requested VOD.

Is there any log or error message that I can confirm this?

There are a couple of options to figure it out @Pittaya Sroilong

1. The first is, if on linux, you can look at the difference between the two following commands.

du -hs /usr/local/WowzaStreamingEngine/mediacache
du -hs --apparent-size /usr/local/WowzaStreamingEngine/mediacache

The first one is the size that mediaCache will see.

2. The second way to check is the actual utilization. When you add an item to mediaCache, you allocate the full file size to mediaCache.

You need to tune the TTL’s (Time to Live) to suit the individual use case.

With mediaCache, there are two TTLs. minTTL is used to flush items when the cache is full. maxTTL is used for normal flushing. Both timers start from when the last player stops playing a file.

We normally suggest that you need to look at the average file size x average unique streams over the TTL period to make sure you have a large enough store and low enough TTLs.

If doing ABR streaming then you need to use the sum of all the ABR rendition file sizes in the calculation because we will reserve cache space for all of the files.

yes, that is right. The apparent size is what the disk usage would be if the files were 100% cached. Initially, we just reserve enough space for them but they are empty. The other du command just shows what has actually been written to the partition.

Thank you for you reply.

When I use those 2 du commands, the result shows the apparent size one is always the bigger. Is this an expected behavior?

My MediaCache store is configured to 600GB. The first du result is 280GB, the second one results 600GB. Does this mean my MediaCache is not full yet?

MediaCache uses the apparent size when calculating how full it is. So when apparent size == MediaCache configured store size, then it is full. Hope that makes it clear.

Thank you for clear explanation. This helps a lot.

That is awesome to hear. Glad to help out. :slight_smile: