Wowza Community

Problem with wowza and java memory usage

Hello.

I have a question, I installed Wowza 4.0.1 in my Debian Server. The server have the next configuration.

• Intel Xeon E3-1220 (4Coeurs/3,1Ghz) (ou supérieur)

• 16384 Mo

• 2 x 1000 Go SATA RAID 1

• BP incluse: 1000 Mbps

The problem is, when I start Wowza service, the Java virtual machine use approximately 10GB of memory without any user or only one.

This is the information about java.

Java Version: 1.7.0_51

Java VM Version: 24.51-b03

Java Architecture: 64

Memory

Total: 15.65 GB

Available: 425.52 MB

Why? This is normally? Can I reduce it? This memory is used or reserved?

Thanks.

Hello Israel,

When logged in to Wowza Streaming Engine Manager, selecting Server and then Performance Tuning > Java Settings, there is an option for Development Level and Production Level under Java Heap Size. By chance did you select Production Level? If so, try switching back to Development Level, restart (you will be promoted) and evaluate updated memory utilization.

-Tim

The java heap setting allocates memory, so you are seeing memory reserved by Java even though it is not being used. To see what is really being used by Java you can use JConsole.

Richard

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

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, only when memory is needed it removes it.

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.

Jason

Hello,

I am not adept at java or what wowza tuning options will affect what, so please excuse any tangents or minconceptions. :slight_smile:

I am seeing similar behavior on our server. We are running Wowza 4.0.1 on Debian 7 with OpenJDK 1.7. I noticed that on 4.0.0 the heap and the memory would exponentially grow for a few hours then suddenly the heap would drop to normal levels and the memory usage would level off. The exponential growth portion was curbed in 4.0.1, but I am seeing a slow, linear increase in what I assume to be mostly reserved memory usage. Also, I have tried both GC options and not noticed a difference in the memory usage. Unfortunately our server is used for other applications outside Wowza and we can’t have it reserving 90% of the memory and forcing other applications to use swap. :confused:

One thing to check is the media cache. I noticed on a fresh install of Wowa 4.0.* the media cache is turned on. That ate up 5+ GB in < 8 hours and is used for VOD, not live streaming.

Also, I am using OpenJDK from the debian repos. Are you building your java from the oracle source code or downloading OpenJDK from the debian repos? From the research I have done there shouldn’t be much, if any, difference between the two. That being said if there is a difference then that might cause a problem.

Have you tried the different GC options? Any difference in bahavior or memory usage?

-Michael

Hi Israel,

So you compiled JDK directly from Oracle. That rules out any incompatibility with OpenJDK. :confused: I have sent an email to Wowza support asking for their help. Once I hear back I will let you know what happens.

-Michael

So far the friendly tech at Wowza has recommended using a custom heap size between the production level and development level. With 8 GB total memory I am running a 3.5 GB heap size. So far the memory usage has stayed relatively constant at 7.5 GB and I haven’t seen any more swap being used. I am still in talks with Wowza, but as a temporary fix you can try reducing the heap size. Another consideration is that the minimum specifications on Wowza’s home page lists an 8 GB memory minimum. Wowza 4.0 might just take up a lot of reserved memory. :confused: If all else fails I might need to buy more ram so that I can run other applications on our server. :confused:

I hope this helps.

-Michael

Hello Tim,

I had selected the Production level, but I’ve changed as you’ve shown me so to Development level, and I restarted wowza and the result is practically the same, the RAM consumption is now 13.5 GB without any user connected to server. This server is used only for running wowza, alarm me why this consumption without any user connected.

What is happen when we have 300 users connected

Thanks

Hi Michael,

we have installed OpenJDK 1.7 directly from oracle. In addition we have made ​​several changes in GC without getting any change in the use of our server RAM, even running wowza instance in development mode

Israel