jvm-arguments

ZGC max heap size exceed physical memory

我的未来我决定 提交于 2020-07-19 11:08:45
问题 JVM options is -server -Xmx100g -Xms100g -XX:MaxMetaspaceSize=1G -Xss512k -XX:+UnlockExperimentalVMOptions -XX:+UseZGC -XX:MaxGCPauseMillis=30 -XX:ConcGCThreads=4 -XX:ParallelGCThreads=12 -XX:+DisableExplicitGC -XX:LargePageSizeInBytes=128m RAM is 256G total used free shared buffers cached Mem: 251 250 1 100 0 138 -/+ buffers/cache: 112 139 Swap: 7 0 7 the top command show the process's RES is 303G PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 240731 xxx 20 0 17.0t 302g 297g S 6.6 119

Difference between -XX:+PrintGC and -verbose:gc

醉酒当歌 提交于 2020-05-14 18:57:08
问题 I want to understand the difference between: -XX:+PrintGC and -verbose:gc Apparently these look similar. This article doesn't list the verbose:gc http://www.oracle.com/technetwork/articles/java/vmoptions-jsp-140102.html I also saw these two questions: How to redirect verbose garbage collection output to a file? and https://stackoverflow.com/a/1818039/2266682 but couldn't get much understanding. 回答1: In JDK 8 -verbose:gc is an exact alias for -XX:+PrintGC . However, -verbose:gc is a standard

In Java 8 it is shown as none of the available 4 collectors (GC) are selected by default

ε祈祈猫儿з 提交于 2020-03-13 12:32:25
问题 I have a container running a Spring Boot microservice. I am using openjdk version "1.8.0_212" under OpenJDK Runtime Environment (IcedTea 3.12.0) (Alpine 8.212.04-r0) When I use - XX:+PrintFlagsFinal flag and print the JVM parameters I expected to see -XX:+UseParallelGC as true But to my surprise none of the 4 collectors (-XX:+UseSerialGC,-XX:+UseParallelGC,-XX:+UseConcMarkSweepGC,–XX:+UseG1GC) were active. Shown below is my dockerfile: FROM openjdk:8-jdk-alpine ADD ./demo-0.0.1-SNAPSHOT.jar

How to set JVM parameter values in a java program

筅森魡賤 提交于 2020-02-25 23:52:12
问题 I have a long list of JVM parameter values: -XX:+UseSerialGC -XX:+ResizePLAB -XX:-ResizeOldPLAB -XX:-AlwaysPreTouch -XX:-ParallelRefProcEnabled -XX:+ParallelRefProcBalancingEnabled -XX:+UseTLAB -XX:-ResizeTLAB -XX:-ZeroTLAB -XX:-FastTLABRefill -XX:+NeverActAsServerClassMachine -XX:-AlwaysActAsServerClassMachine -XX:+UseAutoGCSelectPolicy -XX:+UseAdaptiveSizePolicy -XX:+UsePSAdaptiveSurvivorSizePolicy -XX:-UseAdaptiveGenerationSizePolicyAtMinorCollection -XX:

Possible values for the “java.compiler” system property

依然范特西╮ 提交于 2020-01-14 07:42:28
问题 (I know this is probably a duplicate, but is it almost impossible to search this topic on Google or on SO.) I know the java.compiler system property can take " NONE " which disables the JIT compiler, but I am interested in what other values are there and what are their performance characteristics. 回答1: In the early days I believe it was intended that there be competition among external vendors to supply an external .dll/.so named by this property. symcjit.dll was the only one I ever

How to add custom “-Djava” arguments to Grails app?

一笑奈何 提交于 2020-01-04 04:40:10
问题 Say I wanted to run a Grails (2.3+) app with an extra " -Djava.fizz.buzz=3 " JVM arg. Is it as simple as: grails run-app -Djava.fizz.buzz=3 Or is there special config (say, in BuildConfig.groovy ) that would need to take place? 回答1: The answer to your question is yes, that will work. JVM args work a bit differently. Both are in the docs about the command line. 回答2: That should work. And to have access to the arg you just created, you may call System.properties[] anywhere in your code: if

loading clojure-contrib

为君一笑 提交于 2020-01-04 02:34:34
问题 I'm new to the whole JVM thing, and trying to play with clojure. I'm attempting to load clojure-contrib and failing: # in bash $ java -cp /path/to/clojure.jar:/path/to/contrib.jar clojure.main # in REPL user=> (require 'clojure.contrib.math) nil user=> (sqrt 2) java.lang.Exception: Unable to resolve symbol: sqrt in this context (NO_SOURCE_FILE:10) Any pointers will be great - thanks. 回答1: I'm no expert, but it seemed like a namespace issue. The solution I employed was this: ;; for REPL user=>

What is the recommended way to set JVM options for the executables created with sbt-native-packager?

|▌冷眼眸甩不掉的悲伤 提交于 2020-01-03 02:36:04
问题 Currently, I use export JAVA_OPTS ... on the command line, but there seem to be other possibilities, using the build.sbt or an external property file. I have found several relevant github issues here, here and here but the many options are confusing. Is there a recommended approach? 回答1: The approach you take to setting JVM options depends mainly on your use case: Inject options every time If you want to be able to specify the options every time you run your service, the two mechanisms are

Dynamically expandable JVM stack

好久不见. 提交于 2020-01-01 17:07:59
问题 The JVM specification indicates the JVM stack can be either fixed size or dynamically expandable. The -Xss JVM option allow to set the fixed size and if I am right not setting this option is setting a default value (around 512-2048k), but how can tell the JVM to dynamically allocate its stack when needed? If I cannot set a dynamical size option, will setting a large -Xss value (let's say 20M) actually allocate 20MB of memory for each thread in my JVM or is it dynamically allocated memory that

Jetty 7: OutOfMemoryError: PermGen space on application redeploy

不问归期 提交于 2020-01-01 03:24:08
问题 First time app starts correctly. Then I delete webapp/*.war file and paste new version of *.war. Jetty start deploying new war but error java.lang.OutOfMemoryError: PermGen space occurs. How can I configure Jetty to fix error / make correct redeploy? This solution doesn't help me. Jetty version: jetty-7.4.3.v20110701 回答1: There is probably no way to configure the problem away. Each JVM has one PermGen memory area that is used for class loading and static data. Whenever your application gets