Java Option

993 views
Skip to first unread message

Keesun Baik

unread,
Sep 12, 2012, 10:47:57 PM9/12/12
to ve...@googlegroups.com
Hi all,

How can I set the java options like, -Xms, -Xmx, -XX:MaxPermSize, when I use 'vertx run' or 'vertx runmod'?

Thanks

Jettro Coenradie

unread,
Sep 13, 2012, 2:37:54 AM9/13/12
to ve...@googlegroups.com
You can edit the vertx.bat or vertx.sh file. In here you find the following lines:
@rem Add default JVM options here. You can also use JAVA_OPTS and VERTX_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=

So you can add them to JAVA_OPTS or change the mentioned start-up script.

regards Jettro

--
You received this message because you are subscribed to the Google Groups "vert.x" group.
To view this discussion on the web, visit https://groups.google.com/d/msg/vertx/-/YYgzB5s_CmwJ.
To post to this group, send an email to ve...@googlegroups.com.
To unsubscribe from this group, send email to vertx+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/vertx?hl=en-GB.



--
Jettro Coenradie
http://www.gridshore.nl

Keesun Baik

unread,
Sep 13, 2012, 3:20:10 AM9/13/12
to ve...@googlegroups.com, jettro.c...@gridshore.nl
Thank you!

2012년 9월 13일 목요일 오후 3시 37분 56초 UTC+9, Jettro Coenradie 님의 말:

Tom

unread,
Oct 31, 2014, 6:05:29 PM10/31/14
to ve...@googlegroups.com, jettro.c...@gridshore.nl
Hi guys,

I'm passing -Xmx and -Xms in our startup script but it doesn't seem to pick up the options. Here's the relevant part:

VERTX_HOME=/opt/vertx
VERTX_MODS
=/opt/vertx/mods
PID_FILE
=/var/run/vertx.pid
VERTX_OPTS
='-Dorg.vertx.logger-delegate-factory-class-name=org.vertx.java.core.logging.impl.SLF4JLogDelegateFactory'
JVM_OPTS
='-Xms2g -Xmx2g'


I also tried JAVA_OPTS and passing in under VERTX_OPTS, but in all cases running java -XX:+PrintFlagsFinal -version | grep HeapSize gets me this:

 java -XX:+PrintFlagsFinal -version | grep HeapSize
    uintx ErgoHeapSizeLimit                         = 0               {product}
    uintx HeapSizePerGCThread                       = 87241520        {product}
    uintx InitialHeapSize                          := 61676288        {product}
    uintx LargePageHeapSizeThreshold                = 134217728       {product}
    uintx MaxHeapSize                              := 987758592       {product}
java version "1.7.0_65"
OpenJDK Runtime Environment (IcedTea 2.5.2) (7u65-2.5.2-3~14.04)
OpenJDK 64-Bit Server VM (build 24.65-b04, mixed mode)

Do you see anything I might be missing?

Thanks.

Alexander Lehmann

unread,
Nov 1, 2014, 4:57:05 AM11/1/14
to ve...@googlegroups.com, jettro.c...@gridshore.nl
Which command are you using to start your vert.x program (verx, maven, gradle)?

the verx script evaluates JAVA_OPTS, but sets JVM_OPTS to a fixed value in the script, so it will not use the value for JVM_OPTS you have set in the environment.

You could either use VERTX_OPTS or JAVA_OPTS I assume.

You can check which options are actually passed to the java command by the vertx script, you can set DEBUG=1.
Reply all
Reply to author
Forward
0 new messages