Skip to content
Snippets Groups Projects
Commit 98e615f2 authored by jurgenhaas's avatar jurgenhaas
Browse files

Configure memory size and jvm options

parent 44e3efc2
No related branches found
No related tags found
No related merge requests found
......@@ -6,6 +6,12 @@
- [Licensing](https://www.elastic.co/de/subscriptions)
- [Download BEATS](https://www.elastic.co/de/downloads/beats)
# Create basic users
```
bin/elasticsearch-setup-passwords auto -u http://localhost:9200
```
# Trouble-Shooting
Get a list of indides:
......
......@@ -53,6 +53,20 @@
- regexp: 'path.repo'
line: 'path.repo: ["/var/backups/elasticsearch"]'
- name: Configure JVM options
lineinfile:
dest: /etc/elasticsearch/jvm.options
regexp: '{{ item.regexp|default(omit) }}'
line: '{{ item.line }}'
state: '{{ item.state|default(omit) }}'
with_items:
- regexp: '^-Xms'
line: '-Xms{{ elasticsearch.memory|default("2g") }}'
- regexp: '^-Xmx'
line: '-Xmx{{ elasticsearch.memory|default("2g") }}'
- line: '-XX:+UseConcMarkSweepGC'
state: absent
- name: Prepare backup directory
file:
path: /var/backups/elasticsearch
......
......@@ -15,7 +15,7 @@ ES_PATH_CONF=/etc/elasticsearch
#PID_DIR=/var/run/elasticsearch
# Additional Java OPTS
ES_JAVA_OPTS="-Xms2g -Xmx2g"
ES_JAVA_OPTS="-Xms{{ elasticsearch.memory|default("2g") }} -Xmx{{ elasticsearch.memory|default("2g") }}"
# Configure restart on package upgrade (true, every other setting will lead to not restarting)
#RESTART_ON_UPGRADE=true
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment