Questions tagged [jvm-arguments]

Command-line options and environment variables that can affect the performance characteristics of the Java Virtual Machine

There are several categories of JVM arguments:

  1. Standard options recognized by the Java application launcher (e.g. -client, -classpath, ...)
  2. Options that begin with -X which are non-standard (not guaranteed to be supported on all VM implementations) and are subject to change without notice in subsequent releases of the JDK (e.g. -Xbootclasspath, -Xms, -Xloggc, ...)
  3. Options that are specified with -XX are not stable and are subject to change without notice (e.g. -XX:+PrintGCDetails, -XX:-UseParallelGC, ...)

References:

703 questions
7
votes
1 answer

What is thread stack size option(-Xss) given to jvm? Why does it have a limit of atleast 68k in a windows pc?

I have seen JVM option -Xss - What does it do exactly? this link, but my question is how is this option useful. Because, if we set a very minimum limit to the -Xss value, maybe the threads are not going to work properly as it may throw…
Navaneeth Sen
  • 6,315
  • 11
  • 53
  • 82
7
votes
4 answers

Java Invalid maximum heap size

I just installed Ubuntu 64Bit on my VServer and JRE build 1.7.0_67-b01. If I want to run a java jar-file it says Invalid maximum heap size: -Xmx Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred. Program…
Yss
  • 111
  • 1
  • 3
  • 11
7
votes
2 answers

creating a JVM from within a JNI method

Is it possible to create a JVM from within a JNI method using the JNI API? I've tried to do this using the JNI function "JNI_CreateJavaVM()", but it's not working (the function keeps returning a value less than zero). Here is the basic code I'm…
DR.
  • 71
  • 1
  • 2
7
votes
1 answer

Why is the JVM total allocated memory greater than -Xmx?

The JVM options: -Xms20M -Xmx20M -Xmn10M -XX:+PrintGCDetails -XX:SurvivorRatio=8 As expected, the JVM will allocate almost 20MB memory for the JVM heap. But please see the following GC detail: PSYoungGen total 9216K, used 4612K…
Liping Huang
  • 4,378
  • 4
  • 29
  • 46
7
votes
1 answer

Override log level (java.util.logging) with JVM-argument?

Is it possible to override/set log level of java.util.logging.Logger by passing an JVM option on start of the application?
aksamit
  • 2,325
  • 8
  • 28
  • 40
7
votes
2 answers

How can I increase the global heap size for java on Mac OSX

Apple has seen fit to remove the Java Preferences app from the Utilities folder so there's no longer any GUI way to go about increasing the allocated memory limit for Java. I'm not really a commandline guy so I thought I'd ask here. I have a few…
secondman
  • 3,233
  • 6
  • 43
  • 66
7
votes
1 answer

force jvm to return native memory

I am running from time to time in eclipse tasks that require very big amount of memory. So jvm while task is running swallows about 2-3gb of RAM, that is ok. But once jvm took that memory it does not release it and I have a situation when used…
michael nesterenko
  • 14,222
  • 25
  • 114
  • 182
6
votes
3 answers

Why is New Relic eating lot of tomcat memory?

Recently we started using New Relic to monitor our production webapp hosted in tomcat 7.0.6 server but we have observed that memory footprint of this tomcat is increasing continuously and within a week it eats up all the server(AWS High-Memory…
ThinkFloyd
  • 4,981
  • 6
  • 36
  • 56
6
votes
1 answer

How can I set Dlog4j2.formatMsgNoLookups=true in JVM?

In one of my computers, there is JRE 1.8.0_45 and in another machine there is OpenJDK. I want to set the JVM flag Dlog4j2.formatMsgNoLookups=true, but where can I write this piece of configuration?
Simant
  • 3,142
  • 4
  • 32
  • 61
6
votes
1 answer

Is there a max size limit on the value of a JAVA_OPTS "-D" flag in Java?

I have a situation where the one of the JVM options, the "-D" flag is large, over 1000 characters. Is there a limit how large this value can…
Vijay Kumar
  • 2,439
  • 2
  • 32
  • 51
6
votes
3 answers

Elasticsearch ignores my JVM heap size settings

I am running Elasticsearch inside a Docker container in Linux (Ubuntu). I am having a lot of circuit_breaking_exception problems, citing a 486.3mb limit; so I've decided to raise my JVM heap size a bit. My machine has 6 GB physical memory, so up to…
Gorpik
  • 10,940
  • 4
  • 36
  • 56
6
votes
3 answers

Find deprecated JVM flags

I'm using the java -XX:+PrintFlagsFinal -version as per the Print all JVM flags question, to compare results between difference JDKs on my upgrade path to JVM 11. I've noticed though that the result of PrintFlagsFinal will still return deprecated…
anotherdave
  • 6,656
  • 4
  • 34
  • 65
6
votes
0 answers

Pass JVM arguments to Google Cloud Dataflow

We are running our Apache Beam code in Google cloud dataflow, we need to pass some JVM argument to our program. We found links related to Execution Parameters, but nothing related to JVM arguments. How to pass the JVM arguments to Google Cloud…
SANN3
  • 9,459
  • 6
  • 61
  • 97
6
votes
1 answer

Kafka Consumers throwing java.lang.OutOfMemoryError: Direct buffer memory

I am using single node Kafka broker (0.10.2) and single node zookeeper broker (3.4.9). I am having a consumer server (single core and 1.5 GB RAM). Whenever I am running a process with 5 or more threads my consumer's threads are getting killed after…
6
votes
3 answers

Spring boot application as a service + VM Options

I have a Spring boot application that is started as a service using Linux's systemd. It is based on this documentation : http://docs.spring.io/spring-boot/docs/current/reference/html/deployment-install.html With the default script, the jar file…
YLombardi
  • 1,755
  • 5
  • 24
  • 45