Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GC log is rotated too often on Java >= 9 #2395

Closed
1 of 2 tasks
hmhagberg opened this issue May 29, 2020 · 0 comments · Fixed by #2396
Closed
1 of 2 tasks

GC log is rotated too often on Java >= 9 #2395

hmhagberg opened this issue May 29, 2020 · 0 comments · Fixed by #2396

Comments

@hmhagberg
Copy link
Contributor

hmhagberg commented May 29, 2020

Issue Type:

  • Bug report
  • Feature request

What happened:

On Java >= 9, GC log is rotated when the log file reaches 10KB. Since only 10 files are kept around, linkerd starts to overwrite old GC logs very quickly. In our case, we have GC logs only for the last ~10 minutes.

What you expected to happen:

GC log rotation should be less aggressive.

On Java >= 9, which uses unified JVM logging, linkerd uses -Xlog option filesize=10000. The unit for filesize is bytes so log is rotated every 10KB. For Java 8, there is corresponding option -XX:GCLogFileSize=10M i.e. GC log is rotated when it reaches 10MB. I propose setting filesize=10M to match Java 8 behavior.

How to reproduce it (as minimally and precisely as possible):

Run linkerd with default GC log configuration. Observe that GC logs get rotated every 10KB.

Anything else we need to know?:

Environment:
linkerd 1.7.3 with Java11 but this affects older linkerd versions as well.

hmhagberg added a commit to hmhagberg/linkerd that referenced this issue May 29, 2020
hmhagberg added a commit to hmhagberg/linkerd that referenced this issue May 29, 2020
hmhagberg added a commit to hmhagberg/linkerd that referenced this issue May 29, 2020
cpretzer pushed a commit that referenced this issue Jun 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant