Skip to content

Commit 5c8c0bc

Browse files
authored
Add migration docs for GC logging
This commit adds a note to the 6.2 docs for the addition of out-of-the-box GC logging. Relates #27631
1 parent b01832c commit 5c8c0bc

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

docs/reference/migration/migrate_6_2.asciidoc

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,31 @@ existing <<jvm-options,`jvm.options`>>, you should add the line
2323
`-Djava.io.tmpdir=${ES_TMPDIR}`. It is safe to do this on all OS as we preserve
2424
using a private temporary directory on non-Linux systems with the same
2525
mechanism.
26+
27+
=== GC logging
28+
29+
Starting in Elasticsearch 6.2.0, JVM <<gc-logging,GC logging>> is enabled out of
30+
the box. This lightweight facility gives insight into GC issues. The settings
31+
for this are in <<jvm-options,`jvm.options`>> and default to keeping 2 GB worth
32+
(rotating every 64 MB) of logs in the default logs directory. If you are
33+
upgrading from a previous version of Elasticsearch and preserve your existing
34+
<<jvm-options,`jvm.options`>>, you should add the following GC logging settings
35+
so that this valuable debugging information is available:
36+
37+
[source,sh]
38+
--------------------------------------------------
39+
-XX:+PrintGCDetails
40+
-XX:+PrintGCDateStamps
41+
-XX:+PrintTenuringDistribution
42+
-XX:+PrintGCApplicationStoppedTime
43+
-Xloggc:logs/gc.log or /var/log/elasticsearch/gc.log <1>
44+
-XX:+UseGCLogFileRotation
45+
-XX:NumberOfGCLogFiles=32
46+
-XX:GCLogFileSize=64m
47+
--------------------------------------------------
48+
49+
<1> If you have installed Elasticsearch from the RPM or the Debian packaging
50+
distributions and use the default logging location use `/var/log/elasticsearch`
51+
otherwise if you have installed from the `tar.gz` or `zip` archive distributions
52+
and use the default logging location use `logs/gc.log`; otherwise, set the
53+
location to the absolute path to your log files.

0 commit comments

Comments
 (0)