jvm-arguments

Java 8 with Jetty on linux memory issue

核能气质少年 提交于 2019-12-18 12:38:32
问题 Can you please help me resolving the following issue: Context: We are trying to migrate our existing application which is currently running on Java6( on Glassfish) in production to Java8 (on Jetty9) setup. Earlier, We were able to successfully migrate the same setup on Java7(on jetty9). But the customer has decided to go with Java 8 now. In this process we have encountered some memory issues and below are the details: Problem Description: After starting the Jetty server, initial (RES)memory

Reducing JVM pause time > 1 second using UseConcMarkSweepGC

不想你离开。 提交于 2019-12-17 19:19:58
问题 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

Java heap Xms and linux free memory different

孤人 提交于 2019-12-17 13:50:34
问题 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 回答1: Even when

Duplicated Java runtime options : what is the order of preference?

一曲冷凌霜 提交于 2019-12-17 10:58:09
问题 Considering the following command line java -Xms128m -Xms256m myapp.jar Which settings will apply for JVM Minimum memory ( Xms option) : 128m or 256m ? 回答1: Depends on the JVM, perhaps the version...perhaps even how many paper clips you have on your desk at the time. It might not even work. Don't do that. If it's out of your control for some reason, compile and run this the same way you'd run your jar. But be warned, relying on the order of the options is a really bad idea. public class

Encourage the JVM to GC rather than grow the heap?

妖精的绣舞 提交于 2019-12-17 10:46:19
问题 (Note that when I say "JVM", I really mean "Hotspot", and I'm running the latest Java 1.6 update.) Example situation: My JVM is running with -Xmx set to 1gb. Currently, the heap has 500mb allocated, of which 450mb is used. The program needs to load another 200 mb on the heap. Currently, there is 300mb worth of "collectable" garbage in the heap (we'll assume it's all in the oldest generation.) Under normal operation, the JVM will grow the heap to 700 mb or so, and garbage collect when it gets

How to set a java system property so that it is effective whenever I start JVM without adding it to the command line arguments

前提是你 提交于 2019-12-17 08:47:58
问题 There was a change in Java 1.7 in the way the default Locale is get from the OS. There are methods of restoring the old behaviour e.g. by setting the flag -Dsun.locale.formatasdefault=true when starting a JVM instance. I would like to set this flag permanently so that I don't have to specify it in command line arguments each time when I start a JVM instance. Is there a file or any other possibility to change the default settings for JVM? Something like the Eclipse.ini file but for the JVM

How can I disable IPv6 stack use for IPv4 IPs on JRE?

亡梦爱人 提交于 2019-12-17 08:33:27
问题 As you can see on below screenshots, eclipse and Android SDK Manager (and other Java programs) are trying to connect to a IPv4 Internet IP via IPv6 TCP/IP stack while Proxifier (a proxy manager program, nevermind) can not support that. How I can disable IPv6 in Java? 回答1: I wanted to use this for some program I hadn't control for running that Java app so ended with this _JAVA_OPTIONS=-Djava.net.preferIPv4Stack=true environment variable. (read about _JAVA_OPTIONS here) If you are using Windows

How can I disable IPv6 stack use for IPv4 IPs on JRE?

落爺英雄遲暮 提交于 2019-12-17 08:33:25
问题 As you can see on below screenshots, eclipse and Android SDK Manager (and other Java programs) are trying to connect to a IPv4 Internet IP via IPv6 TCP/IP stack while Proxifier (a proxy manager program, nevermind) can not support that. How I can disable IPv6 in Java? 回答1: I wanted to use this for some program I hadn't control for running that Java app so ended with this _JAVA_OPTIONS=-Djava.net.preferIPv4Stack=true environment variable. (read about _JAVA_OPTIONS here) If you are using Windows

Passing JVM arguments to Tomcat when running as a service?

别说谁变了你拦得住时间么 提交于 2019-12-17 06:09:30
问题 I need to pass a couple of JVM arguments to the JVM which Tomcat is running in so that my application can pick them up. I want to follow the process outlined in this article to pick up environment variables. How would I go about doing this? UPDATE Sorry This is running under windows (7 on my Dev machine 2003 on client server) 回答1: You need to edit the Windows service. There are three ways to do this: Start Tomcat5w with //MS// ServiceName to get an icon in the system tray which gives you a

Does RSS tracks reserved or commited memory?

拥有回忆 提交于 2019-12-14 03:47:07
问题 I'm running experiments with different jvm options on java 8 in order to lower RSS: Script used for Rss tracking: ps -o rss -o vsz -o pid $pid JVM args for setting up java process: -XX:+PrintNMTStatistics -XX:+UnlockDiagnosticVMOptions -XX:NativeMemoryTracking=detail Taking baseline with jcmd: jcmd $pid VM.native_memory baseline Taking diff with jcmd: jcmd $pid VM.native_memory summary.diff Output (partial for Thread area): - Thread (reserved=130696KB -21564KB, committed=130696KB -21564KB)