Edit: I am rewriting this post as I solved my first problem, but am having another...
So I got MediaCache working, and it seems to do so properly
In a nutshell, I have a test server with an USB3 external RAID array in RAID5 (set up as a source in file mode), and an internal WD Black 1TB hard drive, which I am using as the cache storage. Videos are 1200kbps, about 1GB in size each.
Now the problem I am having, if several different videos are played, the server's RAM quickly gets filled, then I get Java out of memory errors. I've already tweaked the settings as per the performance guide, with a 4GB heap size (There's 6GB RAM on the server).
I've tried all sorts of combinations of WriteRates, RequestSizes, DefaultBlockSizes, all to pretty much the same effect... The first 4 or 5 videos played create a small increase in RAM usage, less than 100MB. But there seems to be a threshold at which if I play one more, RAM usage just increases steadily until the system crashes.
My theory is that my RAID array is actually faster at reading than my cache HD is at writing, so any data that can't be written fast enough goes to RAM, until it just can't handle it? So in theory a faster cache HDD *should* resolve this? (production Edge server will have 4x SSDs in RAID0, should be plenty fast!). But, it's my understanding from the documentation that if the cache HDD can't handle all the write requests, the system will fall back to streaming directly from the media source?
Additionally, I tried a different usage scenarios, I played a few different videos at once until the RAM usage was high but still under the heap size. Then stopped the videos, and waited until they'd all been cached to disk (I keep an eye on the HDD activity using the windows resource monitor, quite a useful too to see open files and their read/write rates). Once this happened, though, used RAM never went down, even after an hour of no activity. Is this not where the Garbage Collector system comes into play? Or should I try a lower MaxTimeToLive (does this value affect RAM cache too?)
Well, sorry for all these questions, I will keep experimenting but would greatly appreciate any insight and advice!