On Sat, Jan 27, 2018 at 4:41 PM, Felix Schumacher <
[email protected]> wrote:

> Am 27.01.2018 um 16:24 schrieb [email protected]:
>
>> Author: pmouawad
>> Date: Sat Jan 27 15:24:32 2018
>> New Revision: 1822417
>>
>> URL: http://svn.apache.org/viewvc?rev=1822417&view=rev
>> Log:
>> Comment JAVAVER better as per Felix note
>> Adapt some GC tuning based on:
>> - http://www.evanjones.ca/jvm-mmap-pause.html
>> - https://docs.oracle.com/javase/9/gctuning/garbage-first-
>> garbage-collector-tuning.htm
>>
> I think it would be better to leave GC tuning to the user, as it is really
> specific to the users environment.
>
> The first URL points to problems with GC that happened on a JVM with at
> least 17G of RAM.

I agree that it breaks jstat, if you feel we should keep it commented ok
for me.
Regarding heap size, are you sure ? where did you find it ?



> Our default is 512M (which is pretty low nowadays).

I think we should increase it to 1G , I never really run it with default
options.


> The problem occurred on a program, that used memory mapped files. Does
> JMeter use it by default? I don't know.
>

Isn't it related to Java ?
https://bugs.openjdk.java.net/browse/JDK-8076103


> And as a side effect the options from the first URL will break jstat - a
> tool, that I often use to find memory and performance problems.
>
> Another thing to keep in mind is, that G1 is designed for heap sizes of
> 32G and more.
>
In my experience (but I am not very good at GC tuning), I had better
results regarding STW with G1 (even for heaps > 3g ) than with other
policies.

>
> But on the other hand, if you found those options to be helpful with your
> tests, it is good to document them.
>
> Felix
>
>
>
>> Modified:
>>      jmeter/trunk/bin/jmeter
>>      jmeter/trunk/bin/jmeter.bat
>>
>> Modified: jmeter/trunk/bin/jmeter
>> URL: http://svn.apache.org/viewvc/jmeter/trunk/bin/jmeter?rev=182
>> 2417&r1=1822416&r2=1822417&view=diff
>> ============================================================
>> ==================
>> --- jmeter/trunk/bin/jmeter (original)
>> +++ jmeter/trunk/bin/jmeter Sat Jan 27 15:24:32 2018
>> @@ -35,7 +35,7 @@
>>   ##
>>   ##   JMETER_GC_ALGO   (Optional) Java runtime options to specify JVM
>> garbage collection
>>   ##                    algorithm
>> -##                    Defaults to "-XX:+UseG1GC -XX:MaxGCPauseMillis=250
>> -XX:G1ReservePercent=20"
>> +##                    Defaults to "-XX:+UseG1GC -XX:MaxGCPauseMillis=100
>> -XX:G1ReservePercent=20 -XX:+ParallelRefProcEnabled
>> -XX:+PerfDisableSharedMem"
>>   ##
>>   ##   JMETER_HEAP      (Optional) Java runtime options for memory
>> management
>>   ##                    used when JMeter is started.
>> @@ -173,7 +173,7 @@ esac
>>   # RUN_IN_DOCKER="-XX:+UnlockExperimentalVMOptions
>> -XX:+UseCGroupMemoryLimitForHeap"
>>     # Finally, some tracing to help in case things go astray:
>> -: "${JMETER_GC_ALGO:="-XX:+UseG1GC -XX:MaxGCPauseMillis=250
>> -XX:G1ReservePercent=20"}"
>> +: "${JMETER_GC_ALGO:="-XX:+UseG1GC -XX:MaxGCPauseMillis=100
>> -XX:G1ReservePercent=20 -XX:+ParallelRefProcEnabled
>> -XX:+PerfDisableSharedMem"}"
>>       # Always dump on OOM (does not cost anything unless triggered)
>>
>> Modified: jmeter/trunk/bin/jmeter.bat
>> URL: http://svn.apache.org/viewvc/jmeter/trunk/bin/jmeter.bat?rev
>> =1822417&r1=1822416&r2=1822417&view=diff
>> ============================================================
>> ==================
>> --- jmeter/trunk/bin/jmeter.bat (original)
>> +++ jmeter/trunk/bin/jmeter.bat Sat Jan 27 15:24:32 2018
>> @@ -37,7 +37,7 @@ rem   JVM_ARGS    - (Optional) Java opti
>>   rem                 Defaults to '-Duser.language="en"
>> -Duser.region="EN"'
>>   rem
>>   rem   GC_ALGO     - (Optional) JVM garbage collector options
>> -rem                 Defaults to '-XX:+UseG1GC -XX:MaxGCPauseMillis=250
>> -XX:G1ReservePercent=20'
>> +rem                 Defaults to '-XX:+UseG1GC -XX:MaxGCPauseMillis=100
>> -XX:G1ReservePercent=20 -XX:+ParallelRefProcEnabled
>> -XX:+PerfDisableSharedMem'
>>   rem
>>   rem   HEAP        - (Optional) JVM memory settings used when starting
>> JMeter
>>   rem                 Defaults to '-Xms512m -Xmx512m
>> -XX:MaxMetaspaceSize=256m'
>> @@ -92,7 +92,9 @@ if not defined JAVAVER (
>>       rem Check if version is from OpenJDK or Oracle Hotspot JVM prior to
>> 9 containing 1.${version}.x
>> -rem JAVAVER will contain "XXXX", so we extract 2 chars starting from
>> index 1
>> +rem JAVAVER will be equal to "9.0.4" (quotes are part of the value) for
>> Oracle Java 9
>> +rem JAVAVER will be equal to "1.8.0_161" (quotes are part of the value)
>> for Oracle Java 8
>> +rem so we extract 2 chars starting from index 1
>>   IF "%JAVAVER:~1,2%"=="1." (
>>       set JAVAVER=%JAVAVER:"=%
>>       for /f "delims=. tokens=1-3" %%v in ("%JAVAVER%") do (
>> @@ -146,7 +148,7 @@ rem Uncomment this to generate GC verbos
>>   rem set VERBOSE_GC=-Xlog:gc*,gc+age=trace,gc+heap=debug:file=gc_jmet
>> er_%%p.log
>>     if not defined GC_ALGO (
>> -    set GC_ALGO=-XX:+UseG1GC -XX:MaxGCPauseMillis=250
>> -XX:G1ReservePercent=20
>> +    set GC_ALGO=-XX:+UseG1GC -XX:MaxGCPauseMillis=100
>> -XX:G1ReservePercent=20 -XX:+ParallelRefProcEnabled
>> -XX:+PerfDisableSharedMem
>>   )
>>     set SYSTEM_PROPS=-Djava.security.egd=file:/dev/urandom
>>
>>
>>
>


-- 
Cordialement.
Philippe Mouawad.

Reply via email to