# Memory Usage increases to 100 % over time (Streaming Engine 4.1.0 on EC2 instance)

**URL:** <https://community.wowza.com/t/memory-usage-increases-to-100-over-time-streaming-engine-4-1-0-on-ec2-instance/39477>\
**Category:** Wowza Streaming Engine\
**Created:** [October 9, 2014, 10:49am UTC](https://community.wowza.com/t/memory-usage-increases-to-100-over-time-streaming-engine-4-1-0-on-ec2-instance/39477 "2014-10-09T10:49:13Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Johan\_Niemi](https://avatars.discourse-cdn.com/v4/letter/j/a183cd/32.png) [@Johan\_Niemi](https://community.wowza.com/u/Johan_Niemi)\
**Post date:** [October 9, 2014, 10:49am UTC](https://community.wowza.com/t/memory-usage-increases-to-100-over-time-streaming-engine-4-1-0-on-ec2-instance/39477/1 "2014-10-09T10:49:13Z")

</div>

On my EC2 instance I have noticed that Wowza’s memory usage is accumulating over time, and it seems to be unable to release it again.

I’m going to restart Wowza, but do you have any suggestions on how to avoid this in the future? It is a c3.large instance with 3.75 GB of memory.

There has been _very_ limited activity on the server, about 1-2 incoming connections max and 1-2 outgoing connections, but mostly _no activity_ at all.

![](http://i61.tinypic.com/s1n9g3.jpg)

![](http://i62.tinypic.com/2a7idjo.png)

---

<div class="post-metadata">

**Author:** ![Johan\_Niemi](https://avatars.discourse-cdn.com/v4/letter/j/a183cd/32.png) [@Johan\_Niemi](https://community.wowza.com/u/Johan_Niemi)\
**Post date:** [October 9, 2014, 1:49pm UTC](https://community.wowza.com/t/memory-usage-increases-to-100-over-time-streaming-engine-4-1-0-on-ec2-instance/39477/2 "2014-10-09T13:49:12Z")

</div>

**After a Wowza restart the memory usage only decreased slightly.**

![](http://i58.tinypic.com/oqzyo1.png)

![](http://i62.tinypic.com/3026esi.png)

---

<div class="post-metadata">

**Author:** ![Gil\_Villa](https://avatars.discourse-cdn.com/v4/letter/g/cdc98d/32.png) [@Gil\_Villa](https://community.wowza.com/u/Gil_Villa)\
**Post date:** [November 5, 2015, 5:35am UTC](https://community.wowza.com/t/memory-usage-increases-to-100-over-time-streaming-engine-4-1-0-on-ec2-instance/39477/3 "2015-11-05T05:35:37Z")

</div>

> Hi,
> 
> The memory usage is really misrepresented. Just like the Linux ‘top’ and ‘free’ commands, total memory usage is combined Physical Memory, Virtual memory and buffers / cache.
> 
> If you look at the output of the ‘top’ command you’ll see Res, Virt, and buffers/cache for each process. The one that indicates actual memory usage is Res. as that is physical memory used by a process.
> 
> The virtual memory and buffers can be freed at any time for other application use. You’ll find that the Res. figures from the ‘top’ command, for each Java process, are close to what you would actually expect.
> 
> So the graphs show all memory usage, but do not represent what portions can be made available by the OS.
> 
> Daren

---

<div class="post-metadata">

**Author:** ![Daren\_Johnson](https://avatars.discourse-cdn.com/v4/letter/d/ee59a6/32.png) [@Daren\_Johnson](https://community.wowza.com/u/Daren_Johnson)\
**Post date:** [December 20, 2014, 12:45am UTC](https://community.wowza.com/t/memory-usage-increases-to-100-over-time-streaming-engine-4-1-0-on-ec2-instance/39477/4 "2014-12-20T00:45:34Z")

</div>

Hi,

The memory usage is really misrepresented. Just like the Linux ‘top’ and ‘free’ commands, total memory usage is combined Physical Memory, Virtual memory and buffers / cache.

If you look at the output of the ‘top’ command you’ll see Res, Virt, and buffers/cache for each process. The one that indicates actual memory usage is Res. as that is physical memory used by a process.

The virtual memory and buffers can be freed at any time for other application use. You’ll find that the Res. figures from the ‘top’ command, for each Java process, are close to what you would actually expect.

So the graphs show all memory usage, but do not represent what portions can be made available by the OS.

Daren

---

<div class="post-metadata">

**Author:** ![Jason\_Hilton](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/jason_hilton/32/437_2.png) [@Jason\_Hilton](https://community.wowza.com/u/Jason_Hilton)\
**Post date:** [November 5, 2015, 3:37pm UTC](https://community.wowza.com/t/memory-usage-increases-to-100-over-time-streaming-engine-4-1-0-on-ec2-instance/39477/5 "2015-11-05T15:37:31Z")

</div>

Hi,

Please note that Total Memory is referring to the memory of the entire server, the memory Wowza is using is the Wowza Heap which is low.

You could try getting a process output and see what processes are running on the server.

Under Linux if you access a file then it will store some/all of it in memory if it is available to do so. As additional memory is needed, Linux removes unused files from the cache.

For example

```auto
: total used free shared buffers cached
Mem: 10225612 5122476 5103136 0 157464 4525664
-/+ buffers/cache: 439348 9786264
Swap: 2097148 66828 2030320

```

You can see here that 4525664 is used as cached space.

As this is being “used” Wowza will show this in the Total Memory as used but is nothing to be concerned about.

Jason

---

<div class="post-metadata">

**Author:** ![Johan\_Niemi](https://avatars.discourse-cdn.com/v4/letter/j/a183cd/32.png) [@Johan\_Niemi](https://community.wowza.com/u/Johan_Niemi)\
**Post date:** [October 9, 2014, 1:52pm UTC](https://community.wowza.com/t/memory-usage-increases-to-100-over-time-streaming-engine-4-1-0-on-ec2-instance/39477/6 "2014-10-09T13:52:43Z")

</div>

**Only after rebooting the EC2-instance, the memory usage returned to normal**

![](http://i57.tinypic.com/2hye14n.png)

![](http://i62.tinypic.com/2e2fsl5.png)

---

<div class="post-metadata">

**Author:** ![Emre\_Karatasoglu\_Adv](https://avatars.discourse-cdn.com/v4/letter/e/0ea827/32.png) [@Emre\_Karatasoglu\_Adv](https://community.wowza.com/u/Emre_Karatasoglu_Adv)\
**Post date:** [October 9, 2014, 3:01pm UTC](https://community.wowza.com/t/memory-usage-increases-to-100-over-time-streaming-engine-4-1-0-on-ec2-instance/39477/7 "2014-10-09T15:01:43Z")

</div>

Hi niemion, can you check

> [http://your-ec-ins:8088/enginemanager/Home.htm#server/_defaultVHost_/javaSettings](http://your-ec-ins:8088/enginemanager/Home.htm#server/_defaultVHost_/javaSettings)

[select server \> performance tuning]

You’ll see that wowza try to use the memory as much as it get . ie : my 1Gb mem ec2 ins , 300Mb aviable , but default settings of wowza usage ,it shows 409mb.

What’s your os ?

If windows , you should know that windows use memory source much than linux instance. So it’s normal to see that usage .Probably your default settings of wowza try to use 3gb at least. Please decrease the number in default settings as 768M or 1000.

Emre Karatasoglu

emre.karatasoglu@hotmail.com

[http://letheasoftware.com](http://letheasoftware.com)

[http://emrekaratasoglu.com](http://emrekaratasoglu.com)

---

<div class="post-metadata">

**Author:** ![Lenny\_Sibaja](https://avatars.discourse-cdn.com/v4/letter/l/c68b51/32.png) [@Lenny\_Sibaja](https://community.wowza.com/u/Lenny_Sibaja)\
**Post date:** [May 31, 2016, 6:41pm UTC](https://community.wowza.com/t/memory-usage-increases-to-100-over-time-streaming-engine-4-1-0-on-ec2-instance/39477/8 "2016-05-31T18:41:30Z")

</div>

> Hi,
> 
> Please note that Total Memory is referring to the memory of the entire server, the memory Wowza is using is the Wowza Heap which is low.
> 
> You could try getting a process output and see what processes are running on the server.
> 
> Under Linux if you access a file then it will store some/all of it in memory if it is available to do so. As additional memory is needed, Linux removes unused files from the cache.
> 
> For example
> 
> ```auto
> : total used free shared buffers cached
> Mem: 10225612 5122476 5103136 0 157464 4525664
> -/+ buffers/cache: 439348 9786264
> Swap: 2097148 66828 2030320
> 
> ```
> 
> You can see here that 4525664 is used as cached space.
> 
> As this is being “used” Wowza will show this in the Total Memory as used but is nothing to be concerned about.
> 
> Jason

Thank you so much for the explanation! I checked the memory using the [free command](http://www.binarytides.com/linux-command-check-memory-usage/).

---

<div class="post-metadata">

**Author:** ![Vineet\_Verma](https://avatars.discourse-cdn.com/v4/letter/v/96bed5/32.png) [@Vineet\_Verma](https://community.wowza.com/u/Vineet_Verma)\
**Post date:** [December 19, 2014, 1:46pm UTC](https://community.wowza.com/t/memory-usage-increases-to-100-over-time-streaming-engine-4-1-0-on-ec2-instance/39477/9 "2014-12-19T13:46:44Z")

</div>

Hello There,

I’m having the same issue, Wowza memory consumption is about 96% of the memory and its there consistently, even restarting wowza too is not releasing memory.

Here are the details about the system. Since Wowza adjust memory automatically based on the usage, we are running on default settings.

Streaming Engine 4.1, EC2 Linux

OS Architecture: amd64

Memory:Total: 7.30 GB

Available: 274.27 MB

Processor Cores: 4

Java Version:1.7.0\_65

Java Bitness:64

Problem is that even with 100 connection Wowza is eating almost 8 GB memory, is this Normal ? How do we optimize it

Please suggest. Enclosing relevant snapshots.

![](http://182.18.165.43/download/wowza/wowza8.png)

![](http://182.18.165.43/download/wowza/wowza9.png)

![](http://182.18.165.43/download/wowza/wowza10.png)

![](http://182.18.165.43/download/wowza/wowza11.png)

---

<div class="post-metadata">

**Author:** ![Andrew\_Ramberg](https://avatars.discourse-cdn.com/v4/letter/a/7c8e57/32.png) [@Andrew\_Ramberg](https://community.wowza.com/u/Andrew_Ramberg)\
**Post date:** [June 20, 2016, 3:50pm UTC](https://community.wowza.com/t/memory-usage-increases-to-100-over-time-streaming-engine-4-1-0-on-ec2-instance/39477/10 "2016-06-20T15:50:11Z")

</div>

Hello,

We’re glad this helped and appreciate you adding your findings.

Best regards,

Andrew
