# 在java里面GC是很常见的,但在GC时间比较长的时候。在默认配置下,节点会频繁失联。节点的失联又会导致数据频繁重传,甚至会导致整个集群基本不可用。
# discovery参数是用来做集群之间节点通信的,默认超时时间是比较小的。我们把参数适当调大,避免集群GC时间较长导致节点的丢失、失联。
discovery.zen.ping.timeout: 60s
discovery.zen.fd.ping_timeout: 200s
discovery.zen.fd.ping.interval: 30s
discovery.zen.fd.ping.retries: 6
#index.mapper.dynamic: false # 是否压缩
index.refresh_interval: 60s
indices.fielddata.cache.size: 40%
indices.breaker.fielddata.limit: 50%
script.inline: on
script.indexed: on
script.file: on
ES_MIN_MEM: 15g
ES_MAX_MEN: 15g
#每个碎片都有一个事务日志文件,事务日志文件主要是为了保证索引写和删除过程的可靠性,你不需要显式的去提交每个请求(对应于lucene的commit),这一切都是自动的,你也可以显式的执行flush操作来进行请求的提交,还可以使用下面这些参数来进行控制:
#index.translog.flush_threshold_ops:设置当累计操作达到多少时就执行flush操作,默认值 5000
#index.translog.flush_threshold_size:一旦你的事务日志文件的大小(translog)达到设置的这个值,则开始执行flush操作,默认值500mb
#index.translog.flush_threshold_period:每隔多长时间执行一次flush,默认 60m.
#index.merge.scheduler.max_thread_count: 1
#index.translog.flush_threshold_size: 1024M
index.translog.flush_threshold_ops: 100000 # 该值适当的调大