# Jvm uses the client vm, make sure to run \`java\` with the server vm for best performance by adding \`-server\` to the command line

**URL:** <https://discuss.elastic.co/t/jvm-uses-the-client-vm-make-sure-to-run-java-with-the-server-vm-for-best-performance-by-adding-server-to-the-command-line/7244>\
**Category:** Elasticsearch\
**Created:** [April 5, 2012, 8:57pm UTC](https://discuss.elastic.co/t/jvm-uses-the-client-vm-make-sure-to-run-java-with-the-server-vm-for-best-performance-by-adding-server-to-the-command-line/7244 "2012-04-05T20:57:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kuido\_Kuido](https://avatars.discourse-cdn.com/v4/letter/k/3d9bf3/32.png) [@Kuido\_Kuido](https://discuss.elastic.co/u/Kuido_Kuido)\
**Post date:** [April 5, 2012, 8:57pm UTC](https://discuss.elastic.co/t/jvm-uses-the-client-vm-make-sure-to-run-java-with-the-server-vm-for-best-performance-by-adding-server-to-the-command-line/7244/1 "2012-04-05T20:57:03Z")

</div>

Hello

I'm trying to start Java in Server VM mode for elasticsearch but no  
success

Ubuntu 10.04.4 LTS

/etc/environment file is set environment variable  
ES\_JAVA\_OPTS="-server"

echo $ES\_JAVA\_OPTS shows  
-server

in elasticsearch.conf file  
set.default.ES\_JAVA\_OPTS=-server

java -showversion -server  
java version "1.6.0\_20"  
OpenJDK Runtime Environment (IcedTea6 1.9.13)  
(6b20-1.9.13-0ubuntu1~10.04.1)  
OpenJDK Server VM (build 19.0-b09, mixed mode)

but in elasticsearch,conf file is still error  
[WARN][bootstrap] jvm uses the client vm, make sure  
to run `java` with the server vm for best performance by adding `- server` to the command line

Which is the correct place to put -server command line option ?

Kuido

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [April 8, 2012, 6:01pm UTC](https://discuss.elastic.co/t/jvm-uses-the-client-vm-make-sure-to-run-java-with-the-server-vm-for-best-performance-by-adding-server-to-the-command-line/7244/2 "2012-04-08T18:01:04Z")

</div>

If you run it without the wrapper does it work? You can't set the  
ES\_JAVA\_OPTS with teh Java service wrapper, you might need to add it  
explicitly in the JVM configs later on in the wrapper configuration.

On Thu, Apr 5, 2012 at 11:57 PM, Kuido Kuido [kuido20@yahoo.com](mailto:kuido20@yahoo.com) wrote:

> Hello
> 
> I'm trying to start Java in Server VM mode for elasticsearch but no  
> success
> 
> Ubuntu 10.04.4 LTS
> 
> /etc/environment file is set environment variable  
> ES\_JAVA\_OPTS="-server"
> 
> echo $ES\_JAVA\_OPTS shows  
> -server
> 
> in elasticsearch.conf file  
> set.default.ES\_JAVA\_OPTS=-server
> 
> java -showversion -server  
> java version "1.6.0\_20"  
> OpenJDK Runtime Environment (IcedTea6 1.9.13)  
> (6b20-1.9.13-0ubuntu1~10.04.1)  
> OpenJDK Server VM (build 19.0-b09, mixed mode)
> 
> but in elasticsearch,conf file is still error  
> [WARN][bootstrap] jvm uses the client vm, make sure  
> to run `java` with the server vm for best performance by adding `- server` to the command line
> 
> Which is the correct place to put -server command line option ?
> 
> Kuido

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 3:33am UTC](https://discuss.elastic.co/t/jvm-uses-the-client-vm-make-sure-to-run-java-with-the-server-vm-for-best-performance-by-adding-server-to-the-command-line/7244/3 "2017-07-06T03:33:14Z")

</div>


