ES数据库高可用配置 (2)

1、skywalking的elastixsearch配置优化

#bulkActions默认1000次请求批量写入一次改到4000次。 bulkActions: ${SW_STORAGE_ES_BULK_ACTIONS:4000} # Execute the bulk every 1000 requests #flushInterval每10秒刷新一次堆改为每30秒刷新。 flushInterval: ${SW_STORAGE_ES_FLUSH_INTERVAL:30} # flush the bulk every 10 seconds whatever the number of requests #concurrentRequests并发请求的数量由2改为4。 concurrentRequests: ${SW_STORAGE_ES_CONCURRENT_REQUESTS:4} # the number of concurrent requests #metadataQueryMaxSize查询的最大数量由5000改为8000。 metadataQueryMaxSize: ${SW_STORAGE_ES_QUERY_MAX_SIZE:8000}

2、elasticsearch内置参数优化

index.merge.scheduler.max_thread_count# 索引 merge 最大线程数 index.refresh_interval#index 刷新间隔 index.translog.durability# 这个可以异步写硬盘,增大写的速度 index.translog.sync_interval #translog 间隔时间 curl -H "Content-Type: application/json" -u -key elastic:elastic -X PUT 'http://172.16.45.7:9200/_all/_settings?preserve_existing=true' -d '{ "index.merge.scheduler.max_thread_count" : "1", "index.refresh_interval" : "30s", "index.translog.durability" : "async", "index.translog.sync_interval" : "120s" }'

3、验证ES高可用配置

:9200/_all/_settings

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/zyjgyw.html