Give elasticsearch more heap memory.
* modules/logstash/files/elasticseach.default: Elasticsearch does not handle running out of memory very gracefully. Recommended allocation is half of the hosts memory. Give elasticsearch 4GB of the 8GB host. * modules/logstash/manifests/elasticseach.pp: Copy new elasticsearch defaults file into place on the host. Change-Id: I9ed14148c901cd3fd4ec38333a722821adb77ff5 Reviewed-on: https://review.openstack.org/27870 Approved: Clark Boylan <clark.boylan@gmail.com> Reviewed-by: Clark Boylan <clark.boylan@gmail.com> Tested-by: Jenkins
This commit is contained in:
parent
661d2cff30
commit
4cb22b5643
38
modules/logstash/files/elasticsearch.default
Normal file
38
modules/logstash/files/elasticsearch.default
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
# Run ElasticSearch as this user ID and group ID
|
||||||
|
#ES_USER=elasticsearch
|
||||||
|
#ES_GROUP=elasticsearch
|
||||||
|
|
||||||
|
# Heap Size (defaults to 256m min, 1g max)
|
||||||
|
ES_HEAP_SIZE=4g
|
||||||
|
|
||||||
|
# Heap new generation
|
||||||
|
#ES_HEAP_NEWSIZE=
|
||||||
|
|
||||||
|
# max direct memory
|
||||||
|
#ES_DIRECT_SIZE=
|
||||||
|
|
||||||
|
# Maximum number of open files, defaults to 65535.
|
||||||
|
#MAX_OPEN_FILES=65535
|
||||||
|
|
||||||
|
# Maximum locked memory size. Set to "unlimited" if you use the
|
||||||
|
# bootstrap.mlockall option in elasticsearch.yml. You must also set
|
||||||
|
# ES_HEAP_SIZE.
|
||||||
|
#MAX_LOCKED_MEMORY=unlimited
|
||||||
|
|
||||||
|
# ElasticSearch log directory
|
||||||
|
#LOG_DIR=/var/log/elasticsearch
|
||||||
|
|
||||||
|
# ElasticSearch data directory
|
||||||
|
#DATA_DIR=/var/lib/elasticsearch
|
||||||
|
|
||||||
|
# ElasticSearch work directory
|
||||||
|
#WORK_DIR=/tmp/elasticsearch
|
||||||
|
|
||||||
|
# ElasticSearch configuration directory
|
||||||
|
#CONF_DIR=/etc/elasticsearch
|
||||||
|
|
||||||
|
# ElasticSearch configuration file (elasticsearch.yml)
|
||||||
|
#CONF_FILE=/etc/elasticsearch/elasticsearch.yml
|
||||||
|
|
||||||
|
# Additional Java OPTS
|
||||||
|
#ES_JAVA_OPTS=
|
@ -47,9 +47,22 @@ class logstash::elasticsearch {
|
|||||||
require => Package['elasticsearch'],
|
require => Package['elasticsearch'],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
file { '/etc/default/elasticsearch':
|
||||||
|
ensure => present,
|
||||||
|
source => 'puppet:///modules/logstash/elasticsearch.default',
|
||||||
|
replace => true,
|
||||||
|
owner => 'root',
|
||||||
|
group => 'root',
|
||||||
|
mode => '0644',
|
||||||
|
require => Package['elasticsearch'],
|
||||||
|
}
|
||||||
|
|
||||||
service { 'elasticsearch':
|
service { 'elasticsearch':
|
||||||
ensure => running,
|
ensure => running,
|
||||||
require => Package['elasticsearch'],
|
require => Package['elasticsearch'],
|
||||||
subscribe => File['/etc/elasticsearch/elasticsearch.yml'],
|
subscribe => [
|
||||||
|
File['/etc/elasticsearch/elasticsearch.yml'],
|
||||||
|
File['/etc/default/elasticsearch'],
|
||||||
|
],
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user