-
Notifications
You must be signed in to change notification settings - Fork 594
Added config toggle for verbose GC logging #3663
Added config toggle for verbose GC logging #3663
Conversation
This fixes #3659 |
Co-authored-by: Oliver Bristow <evilumbrella+github@gmail.com>
Co-authored-by: Oliver Bristow <evilumbrella+github@gmail.com>
Co-authored-by: Oliver Bristow <evilumbrella+github@gmail.com>
Co-authored-by: Oliver Bristow <evilumbrella+github@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At least the python side appears ok. I can't approve on the Java side without further reading, but I'd double check the naming and how it connects to the executor (particularly as this may be the first is_flag
example so my earlier suggestion may case issues, and this may be the first Boolean option)
I'm going to do some actual testing before merging, so hopefully will catch any name mismatches. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall LGTM other than the question about "-Xloggc".
"-Djava.net.preferIPv4Stack=true " \ | ||
"-XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:+UseStringDeduplication " \ | ||
"-XX:MaxGCPauseMillis=100 -XX:InitiatingHeapOccupancyPercent=30 " \ | ||
"-XX:+HeapDumpOnOutOfMemoryError -XX:ParallelGCThreads=4 " \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Xloggc:log-files/gc.%s.log" and the instance_name
are still necessary I feel since all the logs are in the same folder.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-Xloggc
set of flags are all related to the GC logging. In my testing, I still saw JVM component log files in the log-files
folder. This change should only remove the GC specific logging (unless someone chooses to enable at submit time).
I believe if the verbose-gc
flag is not set, the changes I made to the code will not set those JVM flags. This unit test is testing with the defaults, so what you see here matches what was generated by the heron_executor.py
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah. The flag is for gc logs only, but it separates different gc logs into different files. For example, the gc log for this process would be "log-files/gc.healthmgr.log" and each process has its own gc log file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the heron_executor
functionality that was setting that path and log file names is still there. It's just not there for the default submission. You have to use the flag to enable those parameters.
These lines of code that you are commenting on are test results for the default case that does not have verbose_gc
enabled. If there was a test for the verbose_gc
use case, then we would have another version of this string that included the various GC log parameters. I'm not sure how much more work it will be to add another test case that captures that scenario, but I will look into making it.
"-XX:GCLogFileSize=100M -XX:+PrintPromotionFailure -XX:+PrintTenuringDistribution " \ | ||
"-XX:+PrintHeapAtGC -XX:+HeapDumpOnOutOfMemoryError -XX:ParallelGCThreads=4 " \ | ||
"-Xloggc:log-files/gc.healthmgr.log " \ | ||
"-Djava.net.preferIPv4Stack=true " \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"-Xloggc:log-files" might be necessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as comment above. I believe -Xloggc:log-files
is a GC specific setting. This does not impact the default logging.
"-Djava.net.preferIPv4Stack=true " \ | ||
"-XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:+UseStringDeduplication " \ | ||
"-XX:MaxGCPauseMillis=100 -XX:InitiatingHeapOccupancyPercent=30 " \ | ||
"-XX:+HeapDumpOnOutOfMemoryError -XX:ParallelGCThreads=4 " \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"-Xloggc:log-files" might be necessary.
"-Djava.net.preferIPv4Stack=true " \ | ||
"-XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:+UseStringDeduplication " \ | ||
"-XX:MaxGCPauseMillis=100 -XX:InitiatingHeapOccupancyPercent=30 " \ | ||
"-XX:+HeapDumpOnOutOfMemoryError -XX:ParallelGCThreads=4 " \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"-Xloggc:log-files" might be necessary.
@nwangtw Is it ok that I modified the Heron CLI to add the new argument? In the future I want to also add a flag to toggle the heap dump JVM feature. Would I also add that as a flag on the CLI? It's there a more generic way to provide overrides per analytic submission when submitting to a remote Heron server? |
Yeah. I think passing from CLI could be very useful. I remember we can pass extra topology configs from CLI now but I can't remember the details. @huijunw @xiaoyao1991 ? |
I think it's here: Something like
|
@Code0x58 Github is still showing that you have "1 change requested". I'm not sure if that is something I can resolve or if you need to re-review to clear that state. |
Also a general re-review is probably warranted. I was able to test running an analytic with and without the flag and it seemed to operate as I wanted. |
I added a config item to toggle the verbose GC logging. Not sure if this is the best way to do it. There was another option to add it to the heron_internals.yml. In the end I thought this might be the better approach because it would allow for the analytic to set the value.
I also removed some of the pre-JDK9 config options because Heron is now on JDK 11.