Page 1 of 3 123 LastLast
Results 1 to 10 of 24

Thread: Windows tuning, running the "server" Java VM (tuning)

  1. #1

    Default Windows tuning, running the "server" Java VM (tuning)

    Issue
    By default Windows will run the client version of the Java runtime environment. The Wowza Pro server will function better when using the server version of the Java runtime environment that ships with the Java JDK. Below are the instructions to switch to the server version of the Java runtime environment.

    Resolution
    1. If you have the Java runtime environment installed (rather than the Java Development Kit - JDK) then unstinstall the Java runtime environment and install the most recent version of the Sun Java Development Kit (http://java.sun.com).
    2. After installation delete the following files from the C:\WINDOWS\SYSTEM32 folder:
      Code:
      java.exe
      javacpl.cpl
      javaw.exe
      javaws.exe
    3. Add the path to the Java Development Kit to your system PATH variable. You can do this by doing the following:
      1. Open the System Control Panel
      2. Select the Advanced tab
      3. Click the Environment Variables button
      4. Double click the Path variable in the System variable section and add the full path the Java JDK bin folder inside the JDK folder surrounded by double quotes to the end of the list of path entries (path entries are separated by the ; character). For example, the string you add to the Path variable might look like this:
        Code:
        ;"C:\Program Files\Java\jdk1.6.0_04\bin"
    4. To test that is is working, open a command prompt and enter the following command:
      Code:
      java -server -version
      It should return something similar to:
      Code:
      java version "1.6.0_04"
      Java(TM) SE Runtime Environment (build 1.6.0_04-b12)
      Java HotSpot(TM) Server VM (build 10.0-b19, mixed mode)
    5. With this in place you can now edit two Wowza Pro startup files to switch to the server VM.

      Edit [install-dir]/bin/setenv.bat
      Code:
      change:
      set JAVA_OPTS=-Xmx768M
      
      to:
      set JAVA_OPTS=-server -Xmx768M
      Edit [install-dir]/bin/WowzaMediaServerPro-Service.conf
      Code:
      change:
      # Java Additional Parameters
      wrapper.java.additional.1=-Dcom.wowza.wms.AppHome="%WMSAPP_HOME%"
      wrapper.java.additional.2=-Dcom.wowza.wms.ConfigHome="%WMSCONFIG_HOME%"
      wrapper.java.additional.3=-Dcom.wowza.wms.ConfigURL=
      wrapper.java.additional.4=-Dcom.sun.management.jmxremote=true
      wrapper.java.additional.5=-Dorg.tanukisoftware.wrapper.WrapperManager.mbean=true
      wrapper.java.additional.6=-Dorg.tanukisoftware.wrapper.WrapperManager.mbean.testing=false
      #wrapper.java.additional.7=-Dcom.sun.management.jmxremote.port=1099
      #wrapper.java.additional.8=-Dcom.sun.management.jmxremote.authenticate=false
      #wrapper.java.additional.9=-Dcom.sun.management.jmxremote.ssl=false
      #wrapper.java.additional.10=-Dcom.sun.management.jmxremote.password.file="%WMSCONFIG_HOME%/conf/jmxremote.password"
      #wrapper.java.additional.11=-Dcom.sun.management.jmxremote.access.file="%WMSCONFIG_HOME%/conf/jmxremote.access"
      #wrapper.java.additional.12=-Djava.rmi.server.hostname=192.168.1.7
      
      to:
      # Java Additional Parameters
      wrapper.java.additional.1=-Dcom.wowza.wms.AppHome="%WMSAPP_HOME%"
      wrapper.java.additional.2=-Dcom.wowza.wms.ConfigHome="%WMSCONFIG_HOME%"
      wrapper.java.additional.3=-Dcom.wowza.wms.ConfigURL=
      wrapper.java.additional.4=-Dcom.sun.management.jmxremote=true
      wrapper.java.additional.5=-Dorg.tanukisoftware.wrapper.WrapperManager.mbean=true
      wrapper.java.additional.6=-Dorg.tanukisoftware.wrapper.WrapperManager.mbean.testing=false
      wrapper.java.additional.7=-server
      #wrapper.java.additional.7=-Dcom.sun.management.jmxremote.port=1099
      #wrapper.java.additional.8=-Dcom.sun.management.jmxremote.authenticate=false
      #wrapper.java.additional.9=-Dcom.sun.management.jmxremote.ssl=false
      #wrapper.java.additional.10=-Dcom.sun.management.jmxremote.password.file="%WMSCONFIG_HOME%/conf/jmxremote.password"
      #wrapper.java.additional.11=-Dcom.sun.management.jmxremote.access.file="%WMSCONFIG_HOME%/conf/jmxremote.access"
      #wrapper.java.additional.12=-Djava.rmi.server.hostname=192.168.1.7
      Note: If you have uncommented some of these entries to turn on the JMX interface then you need to make sure the entries remain numbered in serial order. So if you have uncommented all of these entries then you need to add the server entry to the end of the list like this:
      Code:
      # Java Additional Parameters
      wrapper.java.additional.1=-Dcom.wowza.wms.AppHome="%WMSAPP_HOME%"
      wrapper.java.additional.2=-Dcom.wowza.wms.ConfigHome="%WMSCONFIG_HOME%"
      wrapper.java.additional.3=-Dcom.wowza.wms.ConfigURL=
      wrapper.java.additional.4=-Dcom.sun.management.jmxremote=true
      wrapper.java.additional.5=-Dorg.tanukisoftware.wrapper.WrapperManager.mbean=true
      wrapper.java.additional.6=-Dorg.tanukisoftware.wrapper.WrapperManager.mbean.testing=false
      wrapper.java.additional.7=-Dcom.sun.management.jmxremote.port=1099
      wrapper.java.additional.8=-Dcom.sun.management.jmxremote.authenticate=false
      wrapper.java.additional.9=-Dcom.sun.management.jmxremote.ssl=false
      wrapper.java.additional.10=-Dcom.sun.management.jmxremote.password.file="%WMSCONFIG_HOME%/conf/jmxremote.password"
      wrapper.java.additional.11=-Dcom.sun.management.jmxremote.access.file="%WMSCONFIG_HOME%/conf/jmxremote.access"
      wrapper.java.additional.12=-Djava.rmi.server.hostname=192.168.1.7
      wrapper.java.additional.13=-server


    Charlie
    Last edited by charlie; 03-01-2008 at 09:02 AM.

  2. #2
    Join Date
    Oct 2008
    Posts
    1

    Default Windows tuning, running the "server" Java VM (tuning)

    Thanks for the information....

  3. #3
    Join Date
    Nov 2008
    Posts
    1

    Default

    I had to update the JAVA_HOME environment variable as well. The server wouldn't start without it.

  4. #4
    Join Date
    Apr 2009
    Posts
    1

    Default

    For a more detailed peek inside the HotSpot JVM you can add these settings to WowzaMediaServerPro-Service.conf

    wrapper.java.additional.12=-verbose:gc
    wrapper.java.additional.13=-XX:+PrintGCDetails
    wrapper.java.additional.14=-XX:+PrintGCDateStamps
    wrapper.java.additional.15=-XX:+PrintHeapAtGC
    wrapper.java.additional.16=-XX:+PrintTenuringDistribution
    wrapper.java.additional.17=-Xloggc:"%WMSAPP_HOME%"\logs\heap.log

    This produces a heap.log in the logs directory with information about what HotSpot is doing with the heap.

    Shows OldGen, YoungGen, PermGen sizes along with the frequency and duration of minor and major gc's
    Last edited by jcaddel; 04-14-2009 at 09:46 PM.

  5. #5

    Default

    What exactly did you update...My server isnt starting, maybe this would help

  6. #6
    Join Date
    Dec 2007
    Posts
    28,412

    Default

    Check the Wowza environment variables for a slash:
    http://www.wowza.com/forums/showthread.php?t=6332#10

    Richard

  7. #7

    Default

    My /WowzaMediaServerPro-Service.conf file does not have what you have there.... it has this....so what do i change this too

    Code:
    # Java Additional Parameters
    # Make sure the uncommented items are numbered sequentially
    wrapper.java.additional.1=-Xmx768M
    wrapper.java.additional.2=-Dcom.wowza.wms.AppHome="%WMSAPP_HOME%"
    wrapper.java.additional.3=-Dcom.wowza.wms.ConfigHome="%WMSCONFIG_HOME%"
    wrapper.java.additional.4=-Dcom.wowza.wms.ConfigURL=
    wrapper.java.additional.5=-Dcom.sun.management.jmxremote=true
    wrapper.java.additional.6=-Dorg.tanukisoftware.wrapper.WrapperManager.mbean=true
    wrapper.java.additional.7=-Dorg.tanukisoftware.wrapper.WrapperManager.mbean.testing=false
    # If running JDK, uncomment to run server environment (faster)
    wrapper.java.additional.8=-server
    # Better garbage collection setting to avoid long pauses
    #wrapper.java.additional.9=-XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:NewSize=1024m
    #wrapper.java.additional.10=-Djava.rmi.server.hostname=192.168.1.7
    #wrapper.java.additional.11=-Dcom.sun.management.jmxremote.port=1099
    #wrapper.java.additional.12=-Dcom.sun.management.jmxremote.authenticate=false
    #wrapper.java.additional.13=-Dcom.sun.management.jmxremote.ssl=false
    #wrapper.java.additional.14=-Dcom.sun.management.jmxremote.password.file="%WMSCONFIG_HOME%/conf/jmxremote.password"
    #wrapper.java.additional.15=-Dcom.sun.management.jmxremote.access.file="%WMSCONFIG_HOME%/conf/jmxremote.access"

  8. #8
    Join Date
    Dec 2007
    Posts
    28,412

    Default

    No, the actual environment variables, in System Properties> Advanced> Environment variables > System variables, scroll down. They sometimes end up with slash at the end.

    Richard

  9. #9
    Join Date
    Jan 2011
    Posts
    17

    Default

    Sorry to revive an old thread, but I have the exact same question... did this ever get answered?

    Quote Originally Posted by trini_tech View Post
    My /WowzaMediaServerPro-Service.conf file does not have what you have there.... it has this....so what do i change this too

    Code:
    # Java Additional Parameters
    # Make sure the uncommented items are numbered sequentially
    wrapper.java.additional.1=-Xmx768M
    wrapper.java.additional.2=-Dcom.wowza.wms.AppHome="%WMSAPP_HOME%"
    wrapper.java.additional.3=-Dcom.wowza.wms.ConfigHome="%WMSCONFIG_HOME%"
    wrapper.java.additional.4=-Dcom.wowza.wms.ConfigURL=
    wrapper.java.additional.5=-Dcom.sun.management.jmxremote=true
    wrapper.java.additional.6=-Dorg.tanukisoftware.wrapper.WrapperManager.mbean=true
    wrapper.java.additional.7=-Dorg.tanukisoftware.wrapper.WrapperManager.mbean.testing=false
    # If running JDK, uncomment to run server environment (faster)
    wrapper.java.additional.8=-server
    # Better garbage collection setting to avoid long pauses
    #wrapper.java.additional.9=-XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:NewSize=1024m
    #wrapper.java.additional.10=-Djava.rmi.server.hostname=192.168.1.7
    #wrapper.java.additional.11=-Dcom.sun.management.jmxremote.port=1099
    #wrapper.java.additional.12=-Dcom.sun.management.jmxremote.authenticate=false
    #wrapper.java.additional.13=-Dcom.sun.management.jmxremote.ssl=false
    #wrapper.java.additional.14=-Dcom.sun.management.jmxremote.password.file="%WMSCONFIG_HOME%/conf/jmxremote.password"
    #wrapper.java.additional.15=-Dcom.sun.management.jmxremote.access.file="%WMSCONFIG_HOME%/conf/jmxremote.access"

  10. #10
    Join Date
    Dec 2007
    Posts
    28,412

    Default

    What is the problem you are having now?

    Richard

Page 1 of 3 123 LastLast

Similar Threads

  1. Wowza server hanged "java.lang.OutOfMemoryError: Java heap space "
    By dhamibirendra in forum Performance Tuning Discussion
    Replies: 5
    Last Post: 12-15-2013, 06:52 AM
  2. WMS RTSP Playback on Windows 8 "Metro" App in C#/XAML
    By ReignOfComputer in forum Media Players and Devices Discussion
    Replies: 2
    Last Post: 05-21-2013, 12:04 PM

Posting Permissions

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