jvm.options 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. ## JVM configuration
  2. ################################################################
  3. ## IMPORTANT: JVM heap size
  4. ################################################################
  5. ##
  6. ## You should always set the min and max JVM heap
  7. ## size to the same value. For example, to set
  8. ## the heap to 4 GB, set:
  9. ##
  10. ## -Xms4g
  11. ## -Xmx4g
  12. ##
  13. ## See https://www.elastic.co/guide/en/elasticsearch/reference/current/heap-size.html
  14. ## for more information
  15. ##
  16. ################################################################
  17. # Xms represents the initial size of total heap space
  18. # Xmx represents the maximum size of total heap space
  19. -Xms2g
  20. -Xmx2g
  21. ################################################################
  22. ## Expert settings
  23. ################################################################
  24. ##
  25. ## All settings below this section are considered
  26. ## expert settings. Don't tamper with them unless
  27. ## you understand what you are doing
  28. ##
  29. ################################################################
  30. ## GC configuration
  31. -XX:+UseConcMarkSweepGC
  32. -XX:CMSInitiatingOccupancyFraction=75
  33. -XX:+UseCMSInitiatingOccupancyOnly
  34. ## optimizations
  35. # disable calls to System#gc
  36. -XX:+DisableExplicitGC
  37. # pre-touch memory pages used by the JVM during initialization
  38. -XX:+AlwaysPreTouch
  39. ## basic
  40. # force the server VM
  41. -server
  42. # set to headless, just in case
  43. -Djava.awt.headless=true
  44. # ensure UTF-8 encoding by default (e.g. filenames)
  45. -Dfile.encoding=UTF-8
  46. # use our provided JNA always versus the system one
  47. -Djna.nosys=true
  48. # flags to keep Netty from being unsafe
  49. -Dio.netty.noUnsafe=true
  50. -Dio.netty.noKeySetOptimization=true
  51. # log4j 2
  52. -Dlog4j.shutdownHookEnabled=false
  53. -Dlog4j2.disable.jmx=true
  54. -Dlog4j.skipJansi=true
  55. ## heap dumps
  56. # generate a heap dump when an allocation from the Java heap fails
  57. # heap dumps are created in the working directory of the JVM
  58. -XX:+HeapDumpOnOutOfMemoryError
  59. # specify an alternative path for heap dumps
  60. # ensure the directory exists and has sufficient space
  61. #-XX:HeapDumpPath=${heap.dump.path}
  62. ## GC logging
  63. #-XX:+PrintGCDetails
  64. #-XX:+PrintGCTimeStamps
  65. #-XX:+PrintGCDateStamps
  66. #-XX:+PrintClassHistogram
  67. #-XX:+PrintTenuringDistribution
  68. #-XX:+PrintGCApplicationStoppedTime
  69. # log GC status to a file with time stamps
  70. # ensure the directory exists
  71. #-Xloggc:${loggc}
  72. # Elasticsearch 5.0.0 will throw an exception on unquoted field names in JSON.
  73. # If documents were already indexed with unquoted fields in a previous version
  74. # of Elasticsearch, some operations may throw errors.
  75. #
  76. # WARNING: This option will be removed in Elasticsearch 6.0.0 and is provided
  77. # only for migration purposes.
  78. #-Delasticsearch.json.allow_unquoted_field_names=true