##################### Elasticsearch Configuration Example ##################### index.cache.field.type: soft index.cache.field.max_size: 500000 index.cache.field.expire: 5m index.cache.filter.max_size: 500000 index.cache.filter.expire: 5m indices.fielddata.cache.size: 8g #index.translog.flush_threshold_ops: 5000 index.translog.flush_threshold_size: 1024mb #max_shard_index_buffer_size: 5mb index.store.type: niofs #cache.memory.large_cache_size: 10mb #index.merge.policy.merge_factor: 3 #index.merge.policy.min_merge_docs: 3 #index.merge.policy.max_merge_docs: 3 #index.merge.policy.use_compound_file: false #index.merge.policy.max_merged_segment: 1g indices.store.throttle.max_bytes_per_sec: 50mb #index.store.fs.memory.enabled: false indices.memory.index_buffer_size: 20% #index.compound_format: false index.merge.scheduler.max_thread_count: 5 cluster.routing.allocation.disk.threshold_enabled: true cluster.routing.allocation.disk.watermark.low: 92% cluster.routing.allocation.disk.watermark.high: 95% cluster.info.update.interval: 30s cluster.routing.allocation.disk.include_relocations: true ################################## Discovery ################################## discovery.zen.ping.timeout: 10s ################################## Slow Log ################################## # Shard level query and fetch threshold logging. #index.search.slowlog.threshold.query.warn: 10s #index.search.slowlog.threshold.query.info: 5s #index.search.slowlog.threshold.query.debug: 2s #index.search.slowlog.threshold.query.trace: 500ms #index.search.slowlog.threshold.fetch.warn: 1s #index.search.slowlog.threshold.fetch.info: 800ms #index.search.slowlog.threshold.fetch.debug: 500ms #index.search.slowlog.threshold.fetch.trace: 200ms #index.indexing.slowlog.threshold.index.warn: 10s #index.indexing.slowlog.threshold.index.info: 5s #index.indexing.slowlog.threshold.index.debug: 2s #index.indexing.slowlog.threshold.index.trace: 500ms ################################## GC Logging ################################ #monitor.jvm.gc.young.warn: 1000ms #monitor.jvm.gc.young.info: 700ms #monitor.jvm.gc.young.debug: 400ms #monitor.jvm.gc.old.warn: 10s #monitor.jvm.gc.old.info: 5s #monitor.jvm.gc.old.debug: 2s http.cors.enabled: true threadpool: bulk: size: 192 queue_size: 1920 index.refresh_interval: 30s network.host: 192.168.3.156 transport.tcp.port: 9300 http.port: 9200 path.logs: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx discovery.zen.minimum_master_nodes: 11 node.master: true node.data: true cluster.name: es path.data: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx discovery.zen.ping.multicast.enabled: false discovery.zen.ping.unicast.hosts: ["192.168.xxx.xxx","192.168.xxx"] bootstrap.mlockall: true index.cache.query.enable: true indices.cache.query.size: 10%
单机下多实例配置:
discovery.zen.ping.multicast.enabled: false
discovery.zen.ping.unicast.hosts: ["127.0.0.1:9300", "127.0.0.1:9301", "127.0.0.1:9302"]
network.host: 127.0.0.1
http.port: 9200
transport.tcp.port: 9300
index.number_of_shards: 6
index.number_of_replicas: 0