0

It seems these should go in the ${configDir}/jvm.options"} (/var/lib/elasticsearch/config/jvm.options ?) looking at the package at https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/services/search/elasticsearch.nix

Possibly I could use the ES_JAVA_OPTS environment variable?

  • Have you seen this, elastic.co/guide/en/elasticsearch/reference/current/… ? It is the first reference found by Googling elastisearch heap size. It contains the full answer to your question, including using an environment variable. – MariusMatutiae Feb 18 at 8:49
  • I have - the difficulty is knowing how to integrate this ENVS / config with Nixos. – Chris Stryczynski Feb 18 at 8:52
  • 1
    The jvm.options file is copied from the Nix store to /var/lib/elasticsearch/config/ every time ElasticSearch is started. Hence changes to the file would get overwritten. Assuming ES_JAVA_OPTS takes precedence over jvm.options, you can do something like services.elasticsearch.extraJavaOptions = [ "-Xms2g" "-Xmx2g" ] – Emmanuel Rosa Feb 18 at 13:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.