# Linux and OSX tuning, running the "server" Java VM (tuning)

**URL:** <https://community.wowza.com/t/linux-and-osx-tuning-running-the-server-java-vm-tuning/44>\
**Category:** Wowza Streaming Engine\
**Created:** [March 11, 2008, 7:17am UTC](https://community.wowza.com/t/linux-and-osx-tuning-running-the-server-java-vm-tuning/44 "2008-03-11T07:17:59Z")\
**Posts on this page:** 5\
**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 11, 2008, 7:17am UTC](https://community.wowza.com/t/linux-and-osx-tuning-running-the-server-java-vm-tuning/44/1 "2008-03-11T07:17:59Z")

</div>

**Issue**

Depending on your platform, the installed version of the Java VM and Wowza Pro configuration, you may be running the **client** version of the Java VM. 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 VM.

_Note: For **Windows** the solution is a little more involved. See the following forum post for the complete instructions:_

[http://community.wowza.com/t/-/41](http://community.wowza.com/t/-/41)

**Resolution (Linux and OSX)**

First, open a command prompt and enter the command:

```auto
java -server -version

```

It should return something similar to this:

```auto
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)

```

_Note: The key part being the **Server VM** part of the last line._

If it returns an error message then the **server** version is not available under your current Java VM installation. The solution is to install the most recent Java JDK from the Sun web site [http://java.sun.com](http://java.sun.com). Once you have installed the most recent VM, execute the **java -server -version** and it should return the correct VM information.

With this in place you can now edit the setenv.sh startup file to switch to the **server** VM.

Edit [install-dir]/bin/setenv.bat

```auto
change:
set JAVA_OPTS="-Xmx768M"
to:
set JAVA_OPTS="-server -Xmx768M"

```

Charlie

---

<div class="post-metadata">

**Author:** ![Alex\_Carter](https://avatars.discourse-cdn.com/v4/letter/a/d2c977/32.png) [@Alex\_Carter](https://community.wowza.com/u/Alex_Carter)\
**Post date:** [October 31, 2008, 1:00pm UTC](https://community.wowza.com/t/linux-and-osx-tuning-running-the-server-java-vm-tuning/44/2 "2008-10-31T13:00:24Z")

</div>

**On Mac OSX**

The

Edit [install-dir]/bin/setenv.bat

line should read:

Edit [install-dir]/bin/setenv.sh

Also in order to run java in 64 bit (subject to hardware capability of course) edit the JAVA\_OPTS line to read:

JAVA\_OPTS="-d64 -server -Xmx3000M"

the “set” as quoted above is not relevant to OSX

---

<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:** [February 4, 2010, 4:02pm UTC](https://community.wowza.com/t/linux-and-osx-tuning-running-the-server-java-vm-tuning/44/3 "2010-02-04T16:02:34Z")

</div>

See if this post helps. It is really a bunch of tuning of the VM:

[http://stackoverflow.com/questions/198577/real-differences-between-java-server-and-java-client](http://stackoverflow.com/questions/198577/real-differences-between-java-server-and-java-client)

Charlie

---

<div class="post-metadata">

**Author:** ![Eric\_Harvey](https://avatars.discourse-cdn.com/v4/letter/e/8c91f0/32.png) [@Eric\_Harvey](https://community.wowza.com/u/Eric_Harvey)\
**Post date:** [February 4, 2010, 2:21pm UTC](https://community.wowza.com/t/linux-and-osx-tuning-running-the-server-java-vm-tuning/44/4 "2010-02-04T14:21:56Z")

</div>

In what way does Wowza “function better” using the Server version of the VM?

---

<div class="post-metadata">

**Author:** ![Douglas\_Pumphry](https://avatars.discourse-cdn.com/v4/letter/d/f14d63/32.png) [@Douglas\_Pumphry](https://community.wowza.com/u/Douglas_Pumphry)\
**Post date:** [July 27, 2012, 5:32am UTC](https://community.wowza.com/t/linux-and-osx-tuning-running-the-server-java-vm-tuning/44/5 "2012-07-27T05:32:45Z")

</div>

> See if this post helps. It is really a bunch of tuning of the VM:
> 
> [http://stackoverflow.com/questions/198577/real-differences-between-java-server-and-java-client](http://stackoverflow.com/questions/198577/real-differences-between-java-server-and-java-client)
> 
> Charlie

thank you for this post. I am writing a paper on the difference between java server and java client. ( sorry for posting on a thread this old)

* * *

[Accieee](http://Accieee.org)
