Advertisement
PrakashLakhara

elasticsearch-jvm.options

Jan 18th, 2022 (edited)
450
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 3.34 KB | None | 0 0
  1. ################################################################
  2. ##
  3. ## JVM configuration
  4. ##
  5. ################################################################
  6. ##
  7. ## WARNING: DO NOT EDIT THIS FILE. If you want to override the
  8. ## JVM options in this file, or set any additional options, you
  9. ## should create one or more files in the jvm.options.d
  10. ## directory containing your adjustments.
  11. ##
  12. ## See https://www.elastic.co/guide/en/elasticsearch/reference/7.16/jvm-options.html
  13. ## for more information.
  14. ##
  15. ################################################################
  16.  
  17.  
  18.  
  19. ################################################################
  20. ## IMPORTANT: JVM heap size
  21. ################################################################
  22. ##
  23. ## The heap size is automatically configured by Elasticsearch
  24. ## based on the available memory in your system and the roles
  25. ## each node is configured to fulfill. If specifying heap is
  26. ## required, it should be done through a file in jvm.options.d,
  27. ## and the min and max should be set to the same value. For
  28. ## example, to set the heap to 4 GB, create a new file in the
  29. ## jvm.options.d directory containing these lines:
  30. ##
  31. -Xms1g
  32. -Xmx1g
  33. ##
  34. ## See https://www.elastic.co/guide/en/elasticsearch/reference/7.16/heap-size.html
  35. ## for more information
  36. ##
  37. ################################################################
  38.  
  39.  
  40. ################################################################
  41. ## Expert settings
  42. ################################################################
  43. ##
  44. ## All settings below here are considered expert settings. Do
  45. ## not adjust them unless you understand what you are doing. Do
  46. ## not edit them in this file; instead, create a new file in the
  47. ## jvm.options.d directory containing your adjustments.
  48. ##
  49. ################################################################
  50.  
  51. ## GC configuration
  52. 8-13:-XX:+UseConcMarkSweepGC
  53. 8-13:-XX:CMSInitiatingOccupancyFraction=75
  54. 8-13:-XX:+UseCMSInitiatingOccupancyOnly
  55.  
  56. ## G1GC Configuration
  57. # NOTE: G1 GC is only supported on JDK version 10 or later
  58. # to use G1GC, uncomment the next two lines and update the version on the
  59. # following three lines to your version of the JDK
  60. # 10-13:-XX:-UseConcMarkSweepGC
  61. # 10-13:-XX:-UseCMSInitiatingOccupancyOnly
  62. 14-:-XX:+UseG1GC
  63.  
  64. ## JVM temporary directory
  65. -Djava.io.tmpdir=${ES_TMPDIR}
  66.  
  67. ## heap dumps
  68.  
  69. # generate a heap dump when an allocation from the Java heap fails; heap dumps
  70. # are created in the working directory of the JVM unless an alternative path is
  71. # specified
  72. -XX:+HeapDumpOnOutOfMemoryError
  73.  
  74. # exit right after heap dump on out of memory error. Recommended to also use
  75. # on java 8 for supported versions (8u92+).
  76. 9-:-XX:+ExitOnOutOfMemoryError
  77.  
  78. # specify an alternative path for heap dumps; ensure the directory exists and
  79. # has sufficient space
  80. -XX:HeapDumpPath=/var/lib/elasticsearch
  81.  
  82. # specify an alternative path for JVM fatal error logs
  83. -XX:ErrorFile=/var/log/elasticsearch/hs_err_pid%p.log
  84.  
  85. ## JDK 8 GC logging
  86. 8:-XX:+PrintGCDetails
  87. 8:-XX:+PrintGCDateStamps
  88. 8:-XX:+PrintTenuringDistribution
  89. 8:-XX:+PrintGCApplicationStoppedTime
  90. 8:-Xloggc:/var/log/elasticsearch/gc.log
  91. 8:-XX:+UseGCLogFileRotation
  92. 8:-XX:NumberOfGCLogFiles=32
  93. 8:-XX:GCLogFileSize=64m
  94.  
  95. # JDK 9+ GC logging
  96. 9-:-Xlog:gc*,gc+age=trace,safepoint:file=/var/log/elasticsearch/gc.log:utctime,pid,tags:filecount=32,filesize=64m
  97.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement