Results 1 to 7 of 7

Thread: Running multiple Listeners in a single heap

  1. #1
    Join Date
    Oct 2012
    Posts
    10

    Default Running multiple Listeners in a single heap

    Hello I having problems with memory.

    I have multiple Listeners that all share some large static objects. The code is designed to run as multiple threads sharing memory. I want to run each listener in its own thread inside a single VM.

    However, my current Wowza 3 is starting each listener in its own process. and each process is loading its own copy of the static objects.

    What controls whether Listeners are run as a Thread, or as a separate VM?

    Thank you
    Peter

  2. #2
    Join Date
    Dec 2007
    Posts
    22,013

    Default

    Peter,

    A static object in Java means one per VM/process. If you want it to be per thread, it would not be static object.

    Richard

  3. #3
    Join Date
    Oct 2012
    Posts
    10

    Default

    Hi Richard, thanks.

    By static, I mean "not changing". These are very large Java objects that are read by multiple threads. The code is written to check if these objects are already in memory, if so it uses the one already loaded.

    Unfortunately, Wowza is starting each of my Listeners in its own VM. So each instance is loading its own copy of the very-large-object. My server rapidly runs out of memory.

    I want my Wowza application to run in a single VM. How do I control this?

    P
    Last edited by Peter Wolf; 10-05-2012 at 01:26 PM.

  4. #4

    Default

    Hi Peter,

    What do you mean by "I have multiple Listeners"?

    HTTPProviders? Vhosts? Hostports?

    Also, I'm not quite sure what you mean by VM in this context. My understanding is there is just one Java VM per Wowza server instance. Perhaps you're you're talking about different Wowza vHosts that have their own hostports (a.k.a. listeners)?

    You can pass data between modules in an application: http://www.wowza.com/forums/showthre...with-eachother

    Or between modules in different applications: http://www.wowza.com/forums/showthre...r-and-a-module

    If you're talking about multiple vHosts then yes, the Shared Objects will be unique to that vHost. A good first question in this case is: Do you really need to run multiple vHosts?

  5. #5
    Join Date
    Oct 2012
    Posts
    10

    Default

    Hi Richard,

    I just learned some more...

    Our application is written with ActiveMQ. It is designed to run inside a single Java VM with multiple AMQ Processors all sharing some very large Java objects.

    We recently switched from Wowza2 to Wowza3 and started having severe memory problems.

    When I SSH into our server, and use HTOP or equivalent to look at the processes, I see many Java processes running. Each one is using a large amount of memory.

    So, I am trying to find where this behavior is controlled. It might be that ActiveMQ is actually starting the Java VMs, but what we changed was Wowza2 to Wowza3

  6. #6

    Default

    There will only be one Java VM because the "java" executable is only run one time for a single instance of Wowza server.

    If you've noticed a performance degradation when moving from WMS 2.x to WMS 3.x, probably you have not "Tuned" the new Wowza installation. Please implement the applicable steps in the Tuning Guide, especially the "-server" flag.

  7. #7
    Join Date
    Dec 2007
    Posts
    22,013

    Default

    Peter,

    Did you tune the new server?

    http://www.wowza.com/forums/content....ormance-tuning

    Richard

Similar Threads

  1. Multiple IMediaStreamActionNotify3 listeners
    By yevgune2 in forum General Forum
    Replies: 1
    Last Post: 03-06-2014, 02:41 AM
  2. Multiple Or Single Shared Object
    By pixelsmith in forum General Forum
    Replies: 1
    Last Post: 06-03-2013, 06:34 AM
  3. Load balancing with multiple listeners
    By catdude in forum AddOn: Other AddOns
    Replies: 2
    Last Post: 03-04-2013, 01:31 PM
  4. multiple Listeners Loadbalancer
    By MARY2006 in forum AddOn: Other AddOns
    Replies: 1
    Last Post: 12-03-2012, 10:07 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •