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

**URL:** <https://community.wowza.com/t/windows-tuning-running-the-server-java-vm-tuning/41>\
**Category:** Wowza Streaming Engine\
**Created:** [March 1, 2008, 7:58am UTC](https://community.wowza.com/t/windows-tuning-running-the-server-java-vm-tuning/41 "2008-03-01T07:58:20Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/system/32/447_2.png) [@system](https://community.wowza.com/u/system)\
**Post date:** [March 1, 2008, 7:58am UTC](https://community.wowza.com/t/windows-tuning-running-the-server-java-vm-tuning/41/1 "2008-03-01T07:58:20Z")

</div>

**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**

- 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)](http://java.sun.com%29).

- After installation delete the following files from the **C:\WINDOWS\SYSTEM32** folder:

- Add the path to the Java Development Kit to your system **PATH** variable. You can do this by doing the following:

- Open the **System** Control Panel

- Select the **Advanced** tab

- Click the **Environment Variables** button

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

- To test that is is working, open a command prompt and enter the following command:

- With this in place you can now edit two Wowza Pro startup files to switch to the **server** VM.

---

<div class="post-metadata">

**Author:** ![Asa\_Pierre](https://avatars.discourse-cdn.com/v4/letter/a/bb73d2/32.png) [@Asa\_Pierre](https://community.wowza.com/u/Asa_Pierre)\
**Post date:** [January 14, 2010, 7:56pm UTC](https://community.wowza.com/t/windows-tuning-running-the-server-java-vm-tuning/41/2 "2010-01-14T19:56:24Z")

</div>

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

```auto
# 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"

```

---

<div class="post-metadata">

**Author:** ![Faith\_Grace](https://avatars.discourse-cdn.com/v4/letter/f/a9a28c/32.png) [@Faith\_Grace](https://community.wowza.com/u/Faith_Grace)\
**Post date:** [October 30, 2008, 2:03am UTC](https://community.wowza.com/t/windows-tuning-running-the-server-java-vm-tuning/41/3 "2008-10-30T02:03:29Z")

</div>

Thanks for the information…😉

---

<div class="post-metadata">

**Author:** ![Gary\_Rumble](https://avatars.discourse-cdn.com/v4/letter/g/3d9bf3/32.png) [@Gary\_Rumble](https://community.wowza.com/u/Gary_Rumble)\
**Post date:** [November 15, 2008, 10:05am UTC](https://community.wowza.com/t/windows-tuning-running-the-server-java-vm-tuning/41/4 "2008-11-15T10:05:06Z")

</div>

I had to update the JAVA\_HOME environment variable as well. The server wouldn’t start without it.

---

<div class="post-metadata">

**Author:** ![Brian\_Steinle](https://avatars.discourse-cdn.com/v4/letter/b/5f8ce5/32.png) [@Brian\_Steinle](https://community.wowza.com/u/Brian_Steinle)\
**Post date:** [September 1, 2012, 9:14am UTC](https://community.wowza.com/t/windows-tuning-running-the-server-java-vm-tuning/41/5 "2012-09-01T09:14:15Z")

</div>

I’m running Wowza 3.1 on Windows Server 2008 R2 Standard, 64 bit, 8GB Ram

C:\Users\administrator\>java -server -version

java version “1.7.0\_05”

Java™ SE Runtime Environment (build 1.7.0\_05-b06)

Java HotSpot™ 64-Bit Server VM (build 23.1-b03, mixed mode)

Question 1: Is it still necessary to add the -server syntax to the following code below? In my System variable I did not add to the Path variable ;“C:\Program Files\Java\jdk1.6.0\_04\bin”. There was a JAVA\_HOME variable pointing to C:\Program Files\Java\jdk1.7.0\_05. For my setup would it be correct to simply change 768 to 4000?

On code:

change:

set JAVA\_OPTS=-Xmx768M

to:

set JAVA\_OPTS=-server -Xmx768M

Questions 2:

On WowzaMediaServer-Service.conf, do I need to add -server syntax to the code following code?

wrapper.java.additional.1=-Xmx4000M

or

wrapper.java.additional.1=-server -Xmx4000M

I believe this file has changed since this tutorial’s been originally posted and I’m guessing the current method is to simply change the wrapper.java.additinal.1 code.

Question 3:

How do I verify that everything is functioning correctly once I make these changes?

I’ve been following this tutorial [https://www.wowza.com/docs/general-tuning](https://www.wowza.com/docs/general-tuning) and getting confused on Step 5 regarding the use of -server syntax. I’ve tried with and without on the set JAVA\_OPTS= code and without on wrapper.java.additional.1 and both work, but I can’t tell if I’m gaining anything in performance. I don’t want to find out the hard way when streaming live and all of a sudden my system decides to not work.

---

<div class="post-metadata">

**Author:** ![Wayne\_Coleman](https://avatars.discourse-cdn.com/v4/letter/w/b2d939/32.png) [@Wayne\_Coleman](https://community.wowza.com/u/Wayne_Coleman)\
**Post date:** [March 30, 2011, 1:50pm UTC](https://community.wowza.com/t/windows-tuning-running-the-server-java-vm-tuning/41/6 "2011-03-30T13:50:33Z")

</div>

How does the server version improve performance over the client version of the Java runtime. We have tested both and see little if any preformance differences.

Thanks

---

<div class="post-metadata">

**Author:** ![Charlie\_Good](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/charlie_good/32/383_2.png) [@Charlie\_Good](https://community.wowza.com/u/Charlie_Good)\
**Post date:** [March 31, 2011, 8:59am UTC](https://community.wowza.com/t/windows-tuning-running-the-server-java-vm-tuning/41/7 "2011-03-31T08:59:58Z")

</div>

I believe it is just setting/config differences. The gc settings are better for shorter gc pauses but more frequent gc runs. The client is optimized for fast startup time.

Charlie

---

<div class="post-metadata">

**Author:** ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)\
**Post date:** [January 15, 2010, 12:49am UTC](https://community.wowza.com/t/windows-tuning-running-the-server-java-vm-tuning/41/8 "2010-01-15T00:49:44Z")

</div>

Check the Wowza environment variables for a slash:

[https://www.wowza.com/forums/showthread.php?t=6332#10](https://www.wowza.com/forums/showthread.php?t=6332#10)

Richard

---

<div class="post-metadata">

**Author:** ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)\
**Post date:** [January 15, 2010, 1:15am UTC](https://community.wowza.com/t/windows-tuning-running-the-server-java-vm-tuning/41/9 "2010-01-15T01:15:32Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)\
**Post date:** [March 24, 2011, 9:16pm UTC](https://community.wowza.com/t/windows-tuning-running-the-server-java-vm-tuning/41/10 "2011-03-24T21:16:07Z")

</div>

What is the problem you are having now?

Richard

---

<div class="post-metadata">

**Author:** ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)\
**Post date:** [March 24, 2011, 10:49pm UTC](https://community.wowza.com/t/windows-tuning-running-the-server-java-vm-tuning/41/11 "2011-03-24T22:49:00Z")

</div>

Looks okay. Be careful with those GC options. The general tuning guide guide recommends not using special GC options unless you are having problems with memory.

Richard

---

<div class="post-metadata">

**Author:** ![Asa\_Pierre](https://avatars.discourse-cdn.com/v4/letter/a/bb73d2/32.png) [@Asa\_Pierre](https://community.wowza.com/u/Asa_Pierre)\
**Post date:** [January 14, 2010, 7:33pm UTC](https://community.wowza.com/t/windows-tuning-running-the-server-java-vm-tuning/41/12 "2010-01-14T19:33:55Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Jeff\_Caddel](https://avatars.discourse-cdn.com/v4/letter/j/3ec8ea/32.png) [@Jeff\_Caddel](https://community.wowza.com/u/Jeff_Caddel)\
**Post date:** [April 14, 2009, 12:18pm UTC](https://community.wowza.com/t/windows-tuning-running-the-server-java-vm-tuning/41/13 "2009-04-14T12:18:08Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Dave\_Potts](https://avatars.discourse-cdn.com/v4/letter/d/f05b48/32.png) [@Dave\_Potts](https://community.wowza.com/u/Dave_Potts)\
**Post date:** [March 24, 2011, 3:02pm UTC](https://community.wowza.com/t/windows-tuning-running-the-server-java-vm-tuning/41/14 "2011-03-24T15:02:11Z")

</div>

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

> My /WowzaMediaServerPro-Service.conf file does not have what you have there… it has this…so what do i change this too
> 
> ```auto
> # 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"
> 
> ```

---

<div class="post-metadata">

**Author:** ![Dave\_Potts](https://avatars.discourse-cdn.com/v4/letter/d/f05b48/32.png) [@Dave\_Potts](https://community.wowza.com/u/Dave_Potts)\
**Post date:** [March 24, 2011, 5:32pm UTC](https://community.wowza.com/t/windows-tuning-running-the-server-java-vm-tuning/41/15 "2011-03-24T17:32:39Z")

</div>

Just like trini\_tech, my default .conf file doesn’t match the documentation above, and as a result, I’m not sure what to do.

Instead of copying and pasting from step 5 above, I uncommented the wrapper.java.additional etc… lines, so that I have:

```auto
# 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"

```

…but now performance is slower than the default, especially for Cupertino streaming. I’m happy to run the default config, but the docs mention that this isn’t recommended for production use.

---

<div class="post-metadata">

**Author:** ![Randall\_Auriemma](https://avatars.discourse-cdn.com/v4/letter/r/85e7bf/32.png) [@Randall\_Auriemma](https://community.wowza.com/u/Randall_Auriemma)\
**Post date:** [October 30, 2011, 9:47am UTC](https://community.wowza.com/t/windows-tuning-running-the-server-java-vm-tuning/41/16 "2011-10-30T09:47:40Z")

</div>

Hi multibc,

The purpose of this thread is to ensure that you are running the “server VM” as opposed to the “client VM”. In Windows this can be tricky because even though you install the JDK, some versions of Windows will still use the default “client VM” that comes with Windows.

You can run “java -server -version” in DOS (step 4) to see if your environment is set up to use the JDK or the JRE. You can only use the server flag when you are running the JDK.

If you do not see “Server VM” when you run that command, then you need to remove the JRE and install the JDK, and ensure that your PATH environment variable points to the JDK bin directory. You can search the net for how to set the path for your particular operating system. For example, you could search google for “How do I set the path in Windows 2008?”

---

<div class="post-metadata">

**Author:** ![Randall\_Auriemma](https://avatars.discourse-cdn.com/v4/letter/r/85e7bf/32.png) [@Randall\_Auriemma](https://community.wowza.com/u/Randall_Auriemma)\
**Post date:** [December 26, 2011, 12:44pm UTC](https://community.wowza.com/t/windows-tuning-running-the-server-java-vm-tuning/41/17 "2011-12-26T12:44:37Z")

</div>

“CET comment server INFO 200 - Java Name: Java HotSpot™ 64-Bit Server VM”

Ok, that looks good. You have it setup correctly.

JAVA\_HOME = “C:\Program Files\Java\jdk1.7.0\_01”

path = “;C:\Program Files\Java\jdk1.7.0\_01\bin”

You’ll want the path ENV var to point to the bin directory so you can run the java executable. This is different from the JAVA\_HOME var which points to the directory containing bin.

---

<div class="post-metadata">

**Author:** ![Randall\_Auriemma](https://avatars.discourse-cdn.com/v4/letter/r/85e7bf/32.png) [@Randall\_Auriemma](https://community.wowza.com/u/Randall_Auriemma)\
**Post date:** [December 26, 2011, 6:35pm UTC](https://community.wowza.com/t/windows-tuning-running-the-server-java-vm-tuning/41/18 "2011-12-26T18:35:17Z")

</div>

You can search google for how to set the path for your OS.

You can see here for definition of path: [http://en.wikipedia.org/wiki/Path\_%28computing%29](http://en.wikipedia.org/wiki/Path_%28computing%29)

You don’t need to create a new one. There should be a “path” environment variable. You just need to append to it. Usually this is done when you install Java.

---

<div class="post-metadata">

**Author:** ![Stefano\_Cavallini](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/stefano_cavallini/32/896_2.png) [@Stefano\_Cavallini](https://community.wowza.com/u/Stefano_Cavallini)\
**Post date:** [December 26, 2011, 10:56pm UTC](https://community.wowza.com/t/windows-tuning-running-the-server-java-vm-tuning/41/19 "2011-12-26T22:56:09Z")

</div>

hello,

i have follow all points, so when start the server appear this question :

“Would you like the JAVA\_HOME environment variable updated to point to this Java environment?”

this after modify point #3 in this guide. just press ‘yes’ and the server reset the variable path like :

C:\Program Files\Java\jdk1.7.0\_01

is correct that the server resetting the value @ original condition ?

the path must be

C:\Program Files\Java\jdk1.7.0\_01

to

C:\Program Files\Java\jdk1.7.0\_01;“C:\Program Files\Java\jdk1.7.0\_01\bin” ??

anyway, in the server logs appear :

CET comment server INFO 200 - Java Name: Java HotSpot™ 64-Bit Server VM

so, i’m sure that running server version ?

thanks

stefano

---

<div class="post-metadata">

**Author:** ![Stefano\_Cavallini](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/stefano_cavallini/32/896_2.png) [@Stefano\_Cavallini](https://community.wowza.com/u/Stefano_Cavallini)\
**Post date:** [December 27, 2011, 12:25am UTC](https://community.wowza.com/t/windows-tuning-running-the-server-java-vm-tuning/41/20 "2011-12-27T00:25:03Z")

</div>

hello,

so, i need create a new entry : path = “;C:\Program Files\Java\jdk1.7.0\_01\bin” in System Properties-\>Advanced-\>Environment Variables-\>Systems variables ??

i don’t understand where i need put this path…

stefano

[Next page](https://community.wowza.com/t/windows-tuning-running-the-server-java-vm-tuning/41.md?page=2)
