You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Bernd Fehling <be...@uni-bielefeld.de> on 2018/05/04 07:13:40 UTC
Howto disable PrintGCTimeStamps in Solr
Hi list,
this sounds simple but I can't disable PrintGCTimeStamps in solr_gc logging.
I tried with GC_LOG_OPTS in start scripts and --verbose reporting during
start to make sure it is not in Solr start scripts.
But if Solr is up and running there are always TimeStamps in solr_gc.log and
the file reports at the top with "CommandLine flags:" that the option
-XX:+PrintGCTimeStamps has been set.
But where?
Is it something passed down from Jetty?
Regards,
Bernd
Re: Howto disable PrintGCTimeStamps in Solr
Posted by Dominique Bejean <do...@eolya.fr>.
Hi,
Which version of Solr are you using ?
Regards
Dominique
Le ven. 4 mai 2018 à 09:13, Bernd Fehling <be...@uni-bielefeld.de>
a écrit :
> Hi list,
>
> this sounds simple but I can't disable PrintGCTimeStamps in solr_gc
> logging.
> I tried with GC_LOG_OPTS in start scripts and --verbose reporting during
> start to make sure it is not in Solr start scripts.
> But if Solr is up and running there are always TimeStamps in solr_gc.log
> and
> the file reports at the top with "CommandLine flags:" that the option
> -XX:+PrintGCTimeStamps has been set.
> But where?
>
> Is it something passed down from Jetty?
>
> Regards,
> Bernd
>
>
>
> --
Dominique Béjean
06 08 46 12 43
Re: Howto disable PrintGCTimeStamps in Solr
Posted by Shawn Heisey <ap...@elyograg.org>.
On 5/7/2018 8:22 AM, Bernd Fehling wrote:
> thanks for asking, I figured it out this morning.
> If setting -Xloggc=<log_file> the option -XX:+PrintGCTimeStamps will be set
> as default and can't be disabled. It's inside JAVA.
>
> Currently using Solr 6.4.2 with
> Java HotSpot(TM) 64-Bit Server VM (25.121-b13) for linux-amd64 JRE (1.8.0_121-b13)
What is the end goal that has you trying to disable PrintGCTimeStamps?
Is it to reduce the size of the GC log by only including one timestamp,
or something else?
Running java 1.8.0_144, I cannot seem to actually do it. I tried
removing the parameter from the start script, and I also tried
*changing* the parameter to explicitly disable it:
-XX:-PrintGCTimeStamps
Both times, I verified that the commandline had changed. GC logging
still includes both the full date stamp, which PrintGCDateStamps
enables, and seconds since JVM start, which PrintGCTimeStamps enables.
For the attempt where I changed the parameter instead of removing it,
this is the full commandline on the running java process that the start
script executed:
"C:\Program Files\Java\jdk1.8.0_144\bin\java" -server -Xms512m -Xmx512m
-Duser.timezone=UTC -XX:NewRatio=3 -XX:SurvivorRatio=4
-XX:TargetSurvivorRatio=90 -XX:MaxTenuringThreshold=8
-XX:+UseConcMarkSweepGC -XX:ConcGCThreads=4
-XX:ParallelGCThreads=4 -XX:+CMSScavengeBeforeRemark
-XX:PretenureSizeThreshold=64m -XX:+UseCMSInitiatingOccupancyOnly
-XX:CMSInitiatingOccupancyFraction=50
-XX:CMSMaxAbortablePrecleanTime=6000 -XX:+CMSParallelRemarkEnabled
-XX:+ParallelRefProcEnabled -XX:-OmitStackTraceInFastThrow
-verbose:gc -XX:+PrintHeapAtGC -XX:+PrintGCDetails
-XX:-PrintGCTimeStamps -XX:+PrintGCDateStamps
-XX:+PrintTenuringDistribution -XX:+PrintGCApplicationStoppedTime
"-Xloggc:C:\Users\sheisey\Downloads\solr-7.3.0\server\logs\solr_gc.log"
-XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=9 -XX:GCLogFileSize=20M
-Xss256k
-Dsolr.log.dir="C:\Users\sheisey\Downloads\solr-7.3.0\server\logs"
-Dlog4j.configuration="file:C:\Users\sheisey\Downloads\solr-7.3.0\server\resources\log4j.properties"
-DSTOP.PORT=7983 -DSTOP.KEY=solrrocks -Dsolr.log.muteconsole
-Dsolr.solr.home="C:\Users\sheisey\Downloads\solr-7.3.0\server\solr"
-Dsolr.install.dir="C:\Users\sheisey\Downloads\solr-7.3.0"
-Dsolr.default.confdir="C:\Users\sheisey\Downloads\solr-7.3.0\server\solr\configsets\_default\conf"
-Djetty.host=0.0.0.0 -Djetty.port=8983
-Djetty.home="C:\Users\sheisey\Downloads\solr-7.3.0\server"
-Djava.io.tmpdir="C:\Users\sheisey\Downloads\solr-7.3.0\server\tmp" -jar
start.jar "--module=http" ""
That change should have done it. I think we're dealing with a Java
bug/misfeature.
Solr 5.5.5 with Java 1.7.0_80, 1.7.0_45, and 1.7.0_04 behave the same as
7.3.0 with Java 8. I have also verified that Solr 4.7.2 with Java
1.7.0_72 has the same issue. I do not have any information for Java 6
versions. All java versions examined are from Sun/Oracle.
I filed a bug with Oracle. They have accepted it and it is now visible
publicly.
https://bugs.java.com/bugdatabase/view_bug.do?bug_id=JDK-8202752
Thanks,
Shawn
Re: Howto disable PrintGCTimeStamps in Solr
Posted by Bernd Fehling <be...@uni-bielefeld.de>.
Hi Shawn,
the goal is that some GCviewer get confused if both DateStamps and TimeStamps
are present in solr_gc.log file. And _not_ to reduce the GC log size, that
would be stupid.
Now I have a Perl-Script which will remove the TimeStamps (and only leaf the
DateStamps) for Analysis of solr_gc.log for some GCviewers.
Problem solved :-)
Generally I can understand that DateStamps or TimeStamps are added as default
when logging to a file, but it should be only one type and not both at once possible.
Thanks for filing the bug report, I missed that.
Regards
Bernd
Am 08.05.2018 um 11:32 schrieb Shawn Heisey:
> On 5/7/2018 8:22 AM, Bernd Fehling wrote:
>> thanks for asking, I figured it out this morning.
>> If setting -Xloggc=<log_file> the option -XX:+PrintGCTimeStamps will be set
>> as default and can't be disabled. It's inside JAVA.
>>
>> Currently using Solr 6.4.2 with
>> Java HotSpot(TM) 64-Bit Server VM (25.121-b13) for linux-amd64 JRE (1.8.0_121-b13)
>
> What is the end goal that has you trying to disable PrintGCTimeStamps?
> Is it to reduce the size of the GC log by only including one timestamp,
> or something else?
>
> Running java 1.8.0_144, I cannot seem to actually do it. I tried
> removing the parameter from the start script, and I also tried
> *changing* the parameter to explicitly disable it:
>
> -XX:-PrintGCTimeStamps
>
> Both times, I verified that the commandline had changed. GC logging
> still includes both the full date stamp, which PrintGCDateStamps
> enables, and seconds since JVM start, which PrintGCTimeStamps enables.
>
> For the attempt where I changed the parameter instead of removing it,
> this is the full commandline on the running java process that the start
> script executed:
>
> "C:\Program Files\Java\jdk1.8.0_144\bin\java" -server -Xms512m -Xmx512m
> -Duser.timezone=UTC -XX:NewRatio=3 -XX:SurvivorRatio=4
> -XX:TargetSurvivorRatio=90 -XX:MaxTenuringThreshold=8
> -XX:+UseConcMarkSweepGC -XX:ConcGCThreads=4
> -XX:ParallelGCThreads=4 -XX:+CMSScavengeBeforeRemark
> -XX:PretenureSizeThreshold=64m -XX:+UseCMSInitiatingOccupancyOnly
> -XX:CMSInitiatingOccupancyFraction=50
> -XX:CMSMaxAbortablePrecleanTime=6000 -XX:+CMSParallelRemarkEnabled
> -XX:+ParallelRefProcEnabled -XX:-OmitStackTraceInFastThrow
> -verbose:gc -XX:+PrintHeapAtGC -XX:+PrintGCDetails
> -XX:-PrintGCTimeStamps -XX:+PrintGCDateStamps
> -XX:+PrintTenuringDistribution -XX:+PrintGCApplicationStoppedTime
> "-Xloggc:C:\Users\sheisey\Downloads\solr-7.3.0\server\logs\solr_gc.log"
> -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=9 -XX:GCLogFileSize=20M
> -Xss256k
> -Dsolr.log.dir="C:\Users\sheisey\Downloads\solr-7.3.0\server\logs"
> -Dlog4j.configuration="file:C:\Users\sheisey\Downloads\solr-7.3.0\server\resources\log4j.properties"
> -DSTOP.PORT=7983 -DSTOP.KEY=solrrocks -Dsolr.log.muteconsole
> -Dsolr.solr.home="C:\Users\sheisey\Downloads\solr-7.3.0\server\solr"
> -Dsolr.install.dir="C:\Users\sheisey\Downloads\solr-7.3.0"
> -Dsolr.default.confdir="C:\Users\sheisey\Downloads\solr-7.3.0\server\solr\configsets\_default\conf"
> -Djetty.host=0.0.0.0 -Djetty.port=8983
> -Djetty.home="C:\Users\sheisey\Downloads\solr-7.3.0\server"
> -Djava.io.tmpdir="C:\Users\sheisey\Downloads\solr-7.3.0\server\tmp" -jar
> start.jar "--module=http" ""
>
> That change should have done it. I think we're dealing with a Java
> bug/misfeature.
>
> Solr 5.5.5 with Java 1.7.0_80, 1.7.0_45, and 1.7.0_04 behave the same as
> 7.3.0 with Java 8. I have also verified that Solr 4.7.2 with Java
> 1.7.0_72 has the same issue. I do not have any information for Java 6
> versions. All java versions examined are from Sun/Oracle.
>
> I filed a bug with Oracle. They have accepted it and it is now visible
> publicly.
>
> https://bugs.java.com/bugdatabase/view_bug.do?bug_id=JDK-8202752
>
> Thanks,
> Shawn
>
Re: Howto disable PrintGCTimeStamps in Solr
Posted by Bernd Fehling <be...@uni-bielefeld.de>.
Hi Dominique,
thanks for asking, I figured it out this morning.
If setting -Xloggc=<log_file> the option -XX:+PrintGCTimeStamps will be set
as default and can't be disabled. It's inside JAVA.
Currently using Solr 6.4.2 with
Java HotSpot(TM) 64-Bit Server VM (25.121-b13) for linux-amd64 JRE (1.8.0_121-b13)
Regards,
Bernd
Am 07.05.2018 um 14:50 schrieb Dominique Bejean:
> Hi,
>
> Which version of Solr are you using ?
>
> Regards
>
> Dominique
>
>
> Le ven. 4 mai 2018 à 09:13, Bernd Fehling <be...@uni-bielefeld.de>
> a écrit :
>
>> Hi list,
>>
>> this sounds simple but I can't disable PrintGCTimeStamps in solr_gc
>> logging.
>> I tried with GC_LOG_OPTS in start scripts and --verbose reporting during
>> start to make sure it is not in Solr start scripts.
>> But if Solr is up and running there are always TimeStamps in solr_gc.log
>> and
>> the file reports at the top with "CommandLine flags:" that the option
>> -XX:+PrintGCTimeStamps has been set.
>> But where?
>>
>> Is it something passed down from Jetty?
>>
>> Regards,
>> Bernd
>>
>>
>>
>> --
> Dominique Béjean
> 06 08 46 12 43
>