Skip to content

Instantly share code, notes, and snippets.

@PSJoshi
Last active August 29, 2015 14:17
Show Gist options
  • Save PSJoshi/090f7d9d953e6156cb3d to your computer and use it in GitHub Desktop.
Save PSJoshi/090f7d9d953e6156cb3d to your computer and use it in GitHub Desktop.
Elasticsearch tunning
vi /etc/elasticsearch/elasticsearch.yml
#Add the following line somewhere in the file, to disable dynamic scripts:
script.disable_dynamic: true
bootstrap.mlockall: true
http.cors.allow-origin: "/.*/"
http.cors.enabled: true
#Add to /etc/sysctl.conf
fs.file-max = 65536
vm.max_map_count=262144
#Add to /etc/security/limits.conf
* soft nproc 65535
* hard nproc 65535
* soft nofile 65535
* hard nofile 65535
elasticsearch - nofile 65535
elasticsearch - memlock unlimited
#Uncomment the following lines and change the values in /etc/sysconfig/elasticsearch:
#Set ES_HEAP_SIZE to half of your dedicated RAM max 16GB
ES_HEAP_SIZE=8g
MAX_OPEN_FILES=65535
MAX_LOCKED_MEMORY=unlimited
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment