# Bad MediaCache Performance (Amazon s3)

**URL:** <https://community.wowza.com/t/bad-mediacache-performance-amazon-s3/51689>\
**Category:** Wowza Streaming Engine\
**Created:** [July 26, 2018, 10:23am UTC](https://community.wowza.com/t/bad-mediacache-performance-amazon-s3/51689 "2018-07-26T10:23:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![pete\_egedi](https://avatars.discourse-cdn.com/v4/letter/p/e47774/32.png) [@pete\_egedi](https://community.wowza.com/u/pete_egedi)\
**Post date:** [July 26, 2018, 10:23am UTC](https://community.wowza.com/t/bad-mediacache-performance-amazon-s3/51689/1 "2018-07-26T10:23:04Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![pete\_egedi](https://avatars.discourse-cdn.com/v4/letter/p/e47774/32.png) [@pete\_egedi](https://community.wowza.com/u/pete_egedi)\
**Post date:** [July 28, 2018, 4:02pm UTC](https://community.wowza.com/t/bad-mediacache-performance-amazon-s3/51689/2 "2018-07-28T16:02:43Z")

</div>

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.
