Wowza Community

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

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.

After a Wowza restart the memory usage only decreased slightly.

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

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

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

:       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

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

Hi niemion, can you check

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://emrekaratasoglu.com

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

:       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.

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.

Hello,

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

Best regards,

Andrew