jvm-arguments

Java VM tuning - Xbatch and -Xcomp

删除回忆录丶 提交于 2019-11-28 19:47:43
问题 I am looking at the JVM configuration options for running Alfresco, mainly this document on the Alfresco Wiki. One of the recommendations is to use the JVM flags -Xcomp and -Xbatch . The justification of this is: If you wish to have Hotspot precompile the classes, you can add [-Xcomp and -Xbatch]. This will, however, significantly increase the server startup time, but will highlight missing dependencies that can be hit later. From what I have read elsewhere about the -Xcomp and -Xbatch flags,

JVM Options List - still being maintained post Oracle?

点点圈 提交于 2019-11-28 16:00:23
Is the JVM Options List still being maintained anywhere? It seems to have disappeared from Oracle's website, but luckily the Wayback Machine has a copy . Use java -XX:+PrintFlagsFinal to print available -XX options. More diagnostic and experimental options can be added to list with following options: -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions (for Sun) -XX:+UnlockInternalVMOptions (for JRockit) NOTE : Current version of javac docs for Java 8 contains list of most -XX options: https://docs.oracle.com/javase/8/docs/technotes/tools/windows/java.html Oracle's guide with 80+

Difference between -XX:UseParallelGC and -XX:+UseParNewGC

断了今生、忘了曾经 提交于 2019-11-28 14:43:07
问题 They are algorithms for the young generation garbage collection. The second one (UseParNewGC) gets activated automatically with the concurrent tenured generation garbage collection (see Java Concurrent and Parallel GC) but, is there a difference between the two parallel algorithms? 回答1: After a lot of searching, the best explanation I've found is from Java Performance Tuning website in Question of the month: 1.4.1 Garbage collection algorithms, January 29th, 2003 Young generation garbage

Java heap Xms and linux free memory different

有些话、适合烂在心里 提交于 2019-11-28 11:48:29
I have a java program running in centos Box. My -Xmx and -Xms set to 4000 Mb. The program works fine. But when i do free -m , the used memory is showing as 506 MB. As per my understanding , XMS memory should be reserved for JVM. Why does free command not showing the java used memory ? I have also done jstat -gccapacity $(pidof java) and there NGCMN and NGCMX updated and have the same value ? Any support would be helpful. I'm running my program as java -Xms41000m -Xmx42000m -jar Even when -Xmx and -Xms set to the same value, the space reserved for Java Heap is not immediately allocated in RAM.

Reducing JVM pause time > 1 second using UseConcMarkSweepGC

南笙酒味 提交于 2019-11-28 10:03:22
I'm running a memory intensive app on a machine with 16Gb of RAM, and an 8-core processor, and Java 1.6 all running on CentOS release 5.2 (Final). Exact JVM details are: java version "1.6.0_10" Java(TM) SE Runtime Environment (build 1.6.0_10-b33) Java HotSpot(TM) 64-Bit Server VM (build 11.0-b15, mixed mode) I'm launching the app with the following command line options: java -XX:+UseConcMarkSweepGC -verbose:gc -server -Xmx10g -Xms10g ... My application exposes a JSON-RPC API, and my goal is to respond to requests within 25ms. Unfortunately, I'm seeing delays up to and exceeding 1 second and it

NewRatio parameter not working with CMS garbage collector

只谈情不闲聊 提交于 2019-11-28 09:18:51
问题 I switched to CMS collector for my application and throughput of application decreased by half. From GC logs, I see a high frequency of minor GCs happening (aroung 10 per second ). I have allocated a heap size of 4G . The JVM be default is using very small size for young gen (less than 40MB ). I want to try out CMS via increasing the size of young gen. Can you point me to right JVM parameter for this. I tried -XX:NewRatio but JVM ignored this parameter and there was no change in young gen

Cassandra and Java 9 - ThreadPriorityPolicy=42 is outside the allowed range

谁都会走 提交于 2019-11-28 08:14:35
Very recently I installed JDK 9 and Apache Cassandra from the official site. But now when I start cassandra in foreground, I get this message: apache-cassandra-3.11.1/bin$ ./cassandra -f [0.000s][warning][gc] -Xloggc is deprecated. Will use -Xlog:gc:/home/mmatak/monero/apache-cassandra-3.11.1/logs/gc.log instead. intx ThreadPriorityPolicy=42 is outside the allowed range [ 0 ... 1 ] Improperly specified VM option 'ThreadPriorityPolicy=42' Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred. Program will exit. So far I didn't find any solution for this. Is it

Default values for Xmx, Xms, MaxPermSize on non-server-class machines

白昼怎懂夜的黑 提交于 2019-11-28 04:38:35
What are the default values for the following options in Java 6 on a non-server-class machine ? -Xmx -XX:MaxPermSize Oracle's documentation states that: On server-class machines running the server VM, the garbage collector (GC) has changed from the previous serial collector (-XX:+UseSerialGC) to a parallel collector (-XX:+UseParallelGC). and On server-class machines running either VM (client or server) with the parallel garbage collector (-XX:+UseParallelGC) the initial heap size and maximum heap size have changed The page doesn't describe the defaults for non-server-class machines, only that,

Which arguments stand for what in JVM memory options?

霸气de小男生 提交于 2019-11-28 04:33:13
There a lot of JVM arguments that affect the JVM's memory usage like -Xms, -Xmx, -Xns, -XX:MaxPermSize... What do they do? Are there any more? Which one do I have to increase when I get what error (e.g. OutOfMemoryError , StackOverflowError ...)? I cannot find a good cheat sheet for them - let's create one here. -Xms: this option sets the initial and minimum Java heap size. -Xmx: This option sets the maximum Java heap size. The Java heap (the “heap”) is the part of the memory where blocks of memory are allocated to objects and freed during garbage collection. -XX:PermSize: -XX:MaxPermSize: are

Java disable dpi-aware not working

喜欢而已 提交于 2019-11-27 17:53:09
I'm trying to run a Java application with -Dsun.java2d.dpiaware=false argument but nothing happens. I expect to have a blurred UI but with normal size of icons and fonts, it seems that this flag does not work. I'm using JDK 1.8.0_45 on Windows 8.1. I found this bug https://bugs.openjdk.java.net/browse/JDK-8080153 but I don't understand how to workaround it. Fix for Windows, follow these steps: Create a windows regedit new DWORD Press Windows Button + R, type “regedit”, and then click OK. Navigate to the following registry subkey: HKEY_LOCAL_MACHINE > SOFTWARE > Microsoft > Windows >