packaging.asciidoc 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. [[breaking_50_packaging]]
  2. === Packaging
  3. ==== Default logging using systemd (since Elasticsearch 2.2.0)
  4. In previous versions of Elasticsearch, the default logging
  5. configuration routed standard output to /dev/null and standard error to
  6. the journal. However, there are often critical error messages at
  7. startup that are logged to standard output rather than standard error
  8. and these error messages would be lost to the nether. The default has
  9. changed to now route standard output to the journal and standard error
  10. to inherit this setting (these are the defaults for systemd). These
  11. settings can be modified by editing the elasticsearch.service file.
  12. ==== Longer startup times
  13. In Elasticsearch 5.0.0 the `-XX:+AlwaysPreTouch` flag has been added to the JVM
  14. startup options. This option touches all memory pages used by the JVM heap
  15. during initialization of the HotSpot VM to reduce the chance of having to commit
  16. a memory page during GC time. This will increase the startup time of
  17. Elasticsearch as well as increasing the initial resident memory usage of the
  18. Java process.
  19. ==== JVM options
  20. Arguments to the Java Virtual Machine have been centralized and moved
  21. to a new configuration file jvm.options. This centralization allows for
  22. simpler end-user management of JVM options.
  23. This migration removes all previous mechanisms of setting JVM options
  24. via the environment variables `ES_MIN_MEM`, `ES_MAX_MEM`,
  25. `ES_HEAP_SIZE`, `ES_HEAP_NEWSIZE`, `ES_DIRECT_SIZE`, `ES_USE_IPV4`,
  26. `ES_GC_OPTS`, `ES_GC_LOG_FILE`, and `JAVA_OPTS`.
  27. The default location for this file is in config/jvm.options if installing
  28. from the tar or zip distributions, and /etc/elasticsearch/jvm.options if installing
  29. from the Debian or RPM packages. You can specify an alternative location by setting
  30. the environment variable `ES_JVM_OPTIONS` to the path to the file.
  31. ==== /bin/bash is now required
  32. Previously, the scripts used to start Elasticsearch and run plugin
  33. commands only required a Bourne-compatible shell. Starting in
  34. Elasticsearch 5.0.0, the bash shell is now required and `/bin/bash` is a
  35. hard-dependency for the RPM and Debian packages.
  36. ==== Environmental Settings
  37. Previously, Elasticsearch could be configured via environment variables
  38. in two ways: first by using the placeholder syntax
  39. `${env.ENV_VAR_NAME}` and the second by using the same syntax without
  40. the `env` prefix: `${ENV_VAR_NAME}`. The first method has been removed
  41. from Elasticsearch.
  42. Additionally, it was previously possible to set any setting in
  43. Elasticsearch via JVM system properties. This has been removed from
  44. Elasticsearch.
  45. ==== Dying on fatal errors
  46. Previous versions of Elasticsearch would not halt the JVM if out of memory errors or other fatal
  47. errors were encountered during the life of the Elasticsearch instance. Because such errors leave
  48. the JVM in a questionable state, the best course of action is to halt the JVM when this occurs.
  49. Starting in Elasticsearch 5.x, this is now the case. Operators should consider configuring their
  50. Elasticsearch services so that they respawn automatically in the case of such a fatal crash.