Bad MediaCache Performance (Amazon s3)

Hello Wowza Tech Support!

I am experiencing issues with my Media Cache setup.

I have a content stored in s3 bucket and i setup a mediacache with s3 MediaSource with wowza. MediaCache is very slow and some times i get 504 with my cdn url. (screenshots attached)

i read the MediaCache Tuning articles various times on wowza website and i try almost all the recommended settings. Also i have done similar setups in other solutions but never experience this issue before.

I am using Wowza Streaming Engine 4 Subscription Edition 4.7.5.02 build22076

Also after i enable the MediaCache DebugLog i noticed that s3 fetch rate decrease with time.

Earlier i though may be remote s3 bandwidth is slow, but strange thing is every thing move back to normal when i restart wowza.

SLOW VOD loading:

MediaCacheItemHTTPImpl.read[s3]: req,resp:[true:15387874/16384,15387874/16384:1517790600] url:----- status:206 try:0 rate:37.5Kbps

FAST VOD LOADING:

MediaCacheItemHTTPImpl.read[s3]: req,resp:
[true:10100370/264,10100370/264:566979208] url:----- status:206 try:0 rate:8000.0Kbps Here is the bandwidth test results on my amazon ec2 instance. Download: 4908.97 Mbit/s Upload: 1035.18 Mbit/s

Download from s3 on http is also great. but not with wowza media cache.

Thanks

MediaCache JMX clearAll() functon call fix the issue for a while. ClearAll Call Empty the MediaCache storage directory. I am not sure what is the best way to handle this programmatically? I dont think clearing all the cache is the best way to increase VOD Playback perfromance.