Elasticsearch常用配置及性能参数

cluster.name: estest   集群名称
node.name: “testanya”  节点名称

node.master: false  是否主节点
node.data: true   是否存储数据

index.store.type: niofs 读写文件方式
index.cache.field.type: soft 缓存类型

bootstrap.mlockall: true 禁用swap

gateway.type: local 本地存储

gateway.recover_after_nodes: 3 3个数据节点开始恢复

gateway.recover_after_time: 5m 5分钟后开始恢复数据

gateway.expected_nodes: 4 4个es节点开始恢复

cluster.routing.allocation.node_initial_primaries_recoveries:8 并发恢复分片数
cluster.routing.allocation.node_concurrent_recoveries:2 同时recovery并发数

indices.recovery.max_bytes_per_sec: 250mb 数据在节点间传输最大带宽
indices.recovery.concurrent_streams: 8 同时读取数据文件流线程

discovery.zen.ping.multicast.enabled: false 禁用多播
discovery.zen.ping.unicast.hosts:[“192.168.169.11:9300”, “192.168.169.12:9300”]

discovery.zen.fd.ping_interval: 10s 节点间存活检测间隔
discovery.zen.fd.ping_timeout: 120s 存活超时时间
discovery.zen.fd.ping_retries: 6 存活超时重试次数

http.cors.enabled: true 使用监控

index.analysis.analyzer.ik.type:”ik” ik分词

thread pool setting

threadpool.index.type: fixed 写索引线程池类型
threadpool.index.size: 64 线程池大小(建议2~3倍cpu数)
threadpool.index.queue_size: 1000 队列大小

threadpool.search.size: 64 搜索线程池大小
threadpool.search.type: fixed 搜索线程池类型
threadpool.search.queue_size: 1000 队列大小

threadpool.get.type: fixed 取数据线程池类型
threadpool.get.size: 32 取数据线程池大小
threadpool.get.queue_size: 1000 队列大小

threadpool.bulk.type: fixed 批量请求线程池类型
threadpool.bulk.size: 32 批量请求线程池大小
threadpool.bulk.queue_size: 1000 队列大小

threadpool.flush.type: fixed 刷磁盘线程池类型
threadpool.flush.size: 32 刷磁盘线程池大小
threadpool.flush.queue_size: 1000 队列大小

indices.store.throttle.type: merge
indices.store.throttle.type: none 写磁盘类型
indices.store.throttle.max_bytes_per_sec:500mb 写磁盘最大带宽

index.merge.scheduler.max_thread_count: 8 索引merge最大线程数
index.translog.flush_threshold_size:600MB 刷新translog文件阀值

cluster.routing.allocation.node_initial_primaries_recoveries:8 并发恢复分片数
cluster.routing.allocation.node_concurrent_recoveries:2 同时recovery并发数

使用bulk API 增加入库速度
初次索引的时候,把 replica 设置为 0
增大 threadpool.index.queue_size 1000
增大 indices.memory.index_buffer_size: 20%
index.translog.durability: async –这个可以异步写硬盘,增大写的速度
增大 index.translog.flush_threshold_size: 600MB
增大 index.translog.flush_threshold_ops: 500000

curl -XPOST '127.0.0.1:9200/_cluster/settings' -d '{"transient" : {"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","index.indexing.slowlog.level": "info","index.indexing.slowlog.source": "1000","indices.memory.index_buffer_size": "20%"}}'

curl -XPOST '127.0.0.1:9200/_cluster/settings' -d '{"transient" : {"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"}}'

–节点下线时,把所有后缀为 -2的从集群中排除

curl -XPUT   http://127.0.0.1:9200/_cluster/settings
{ "transient" : {"cluster.routing.allocation.enable" : "all",            "cluster.routing.allocation.exclude._name":".*-2"}}

curl -XPUT ip:9200/_cluster/settings -d
'{"transient": {"logger.discover": "DEBUG" }"persistent": {"discovery.zen.minimum_master_nodes": 2}
}'

—批量指定节点下线

curl -XPUT 127.0.0.1:9200/_cluster/settings -d '{"transient": {"cluster.routing.allocation.exclude._name": "atest11-2,atest12-2,anatest13-2,antest14-2" }}'
curl -XPUT 127.0.0.1:9200/_cluster/settings -d '{"transient": {"cluster.routing.allocation.exclude._name": "test_aa73_2,test_aa73" }}'
curl -XPUT 127.0.0.1:9200/_cluster/settings -d '{"transient": {"cluster.routing.allocation.exclude._name": "" }}'
curl -XPUT 127.0.0.1:9200/_cluster/settings -d '{"transient": {"cluster.routing.allocation.cluster_concurrent_rebalance": 10}}'

curl -XPUT 127.0.0.1:9200/_cluster/settings -d '{"transient": {"indices.store.throttle.type": "none","index.store.type": "niofs","index.cache.field.type": "soft","indices.store.throttle.max_bytes_per_sec": "500mb","index.translog.flush_threshold_size": "600MB","threadpool.flush.type": "fixed","threadpool.flush.size": 32,"threadpool.flush.queue_size": 1000}}'

curl -XPUT 127.0.0.1:9200/_cluster/settings -d '{"transient": {"index.indexing.slowlog.level": "warn" }}'

curl -XGET 127.0.0.1:9200/_cluster/health?level=shardscurl -XGET 127.0.0.1:9200/_cluster/settings?prettycurl -XGET 127.0.0.1:9200/_cluster/pending_tasks?prettycurl -XGET 127.0.0.1:9200/_cat/aliasescurl -XGET 127.0.0.1:9200/_cat/pluginscurl -XGET 127.0.0.1:9200/_cat/nodes/_cat/allocation
/_cat/shards
/_cat/shards/{index}
/_cat/master
/_cat/nodes
/_cat/indices
/_cat/indices/{index}
/_cat/segments
/_cat/segments/{index}
/_cat/count
/_cat/count/{index}
/_cat/recovery
/_cat/recovery/{index}
/_cat/health
/_cat/pending_tasks
/_cat/aliases
/_cat/aliases/{alias}
/_cat/thread_pool
/_cat/plugins
/_cat/fielddata
/_cat/fielddata/{fields}

shard的移动
curl -XPOST 'localhost:9200/_cluster/reroute' -d '{"commands" : [ {"move" :{"index" : "test_aa_20160529", "shard" : 4,"from_node" : "node1", "to_node" : "node2"}},{"allocate" : {"index" : "test", "shard" : 1, "node" : "node3"}}]
}'

curl -XPUT 127.0.0.1:9200/_cluster/settings -d '
{"transient": {"logger.indices.recovery": "DEBUG"}
}'
curl -XPUT 127.0.0.1:9200/_cluster/settings -d '
{"transient": {"cluster.routing.allocation.node_initial_primaries_recoveries": "100" }
}'

curl -XPOST '127.0.0.1:9200/_cluster/settings' -d '{"transient" : {"indices.memory.index_buffer_size": "20%"}}'

curl -XPOST '127.0.0.1:9200/_cluster/settings' -d '{"transient" : {"index.indexing.slowlog.level" :   "info" }}'

Elasticsearch常用配置及性能参数相关推荐

  1. Elasticsearch 常用配置参数总结

    Elasticsearch 重要参数配置 通过阅读官方文档了解到其中重要参数的配置及其说,下面将逐步进行了解. 一. ElasticSearch参数配置 1. data和logs路径配置 如果使用.z ...

  2. elasticsearch常用配置

    一.关于elasticsearch的基本概念 每一个运行实例称为一个节点,每一个运行实例既可以在同一机器上,也可以在不同的机器上. 所谓运行实例,就是一个服务器进程,在测试环境中可以在一台服务器上运行 ...

  3. 计算机参数或性能,电脑配置的性能参数都是什么意思?

    1 主频为CPU的频率(如 Intel Core 2 Duo E6300的主频为1.86 倍频为7 外频 266MHz L1缓存(KB)32          L2缓存1MB*2) 2 CPU主频= ...

  4. 阿里云AMD服务器ECS实例g6a、c6a和r6a性能参数详解

    阿里云AMD服务器ECS计算型c6a.通用型g6a和内存型r6a实例,CPU采用2.6GHz主频的AMD EPYCTM ROME处理器,睿频3.3GHz,计算性能稳定,云服务器吧来详细说下阿里云ECS ...

  5. 阿里云AMD服务器ECS计算型c7a、通用型g7a和内存型r7a性能参数详解

    阿里云第二代AMD服务器ECS计算型c7a.通用型g7a和内存型r7a实例,CPU采用2.55 GHz主频的AMD EPYCTM MILAN处理器,单核睿频最高3.5 GHz,算力更强,云服务器吧详细 ...

  6. ElasticSearch 各模块介绍及参数配置详解

    ElasticSearch包含模块由集群管理Cluster.分片管理Shards.副本管理Replicas.恢复管理Recovery.数据源管理River.持久化存储管理Gateway.节点自动发现管 ...

  7. Elasticsearch-32.生产环境常用配置与上线清单 he 集群写性能优化 he 集群读性能优化

    Elasticsearch 生产环境常用配置和上线清单 Development vs.Production Mode 从ES 5开始,支持Development 和Production 两种运行模式 ...

  8. Sybase常用配置参数

    Sybase常用配置参数 可以采用sp_configure查看SYBASE所有的配置,也可以在sybase根目录下面有"[库名].cfg"配置,该文件中用户没有更改的项全部显示值为 ...

  9. IDEA最全最常用的配置与性能优化(Java必备)

    IDEA最全最常用的配置与性能优化(Java必备) 简介 一.性能优化 1.JVM启动参数 2.清空缓存并重建索引 二.优化设置 1.显示方法分隔符 2.忽略大小写提示 3.主题设置 4.设置字体 5 ...

最新文章

  1. java ee webservice_javaEE调用webservice总结【利用WSDL】(转载)
  2. wince中的hook(钩子)用法
  3. for表达式的语句执行顺序?
  4. 搭建阿里云ecs服务器(一:购买)
  5. linux4.14内核,Linux内核4.14.14,4.9.77,4.4.112和3.18.92更新发布
  6. 回溯 皇后 算法笔记_算法笔记-回溯法
  7. linux系统月初月末,Linux last显示系统开机以来获是从每月初登入者的讯息命令详解...
  8. 下载丨DataGuard环境搭建详细步骤
  9. 问答| car-like robot为何需要设置多个坐标系?
  10. Cisco AP1240多SSID配置简解
  11. Android【报错】android.content.ActivityNotFoundException:activity in yourAndroidManifest.?
  12. 微软启动Menlo计划;英特尔手机处理器上市(每日关注20100505)
  13. python一帧一帧读取视频_如何使用openCV和python从流中逐帧获取视频
  14. 三星 android驱动安装失败,解决三星驱动SAMSUNG Mobile USB CDC Composite Device安装失败问题 - YangJunwei...
  15. python和basic语言的区别_Python语言是什么?学Python语言有前途吗?
  16. 计算机二级真题论文排版,计算机二级word真题:供应链的管理论文排版
  17. phpcms 文件:index.html 不可写,phpcms uploadfile不可写怎么办
  18. foxmail远程主机强迫关闭了一个现有的连接
  19. 区块链行业感受及近期的一些规划
  20. 爬虫与反爬虫,永恒的道高一尺魔高一丈

热门文章

  1. kafka启动报错:kafka.common.InconsistentClusterIdException: The Cluster ID KtS-r0FATSudTYqgf-7Ifw doesn‘t
  2. 【JS动画基础】 闪动,匀速,缓动。
  3. 电容的区别,关键在于介质
  4. 九大狗年生肖宝宝取名原则
  5. 竟然有人把VSCode玩成了IDEA的效果,有点东西
  6. 深度学习笔记(十一)—— 完整性检查[Sanity Checks]
  7. 如何制作京东自提点地图?
  8. 4.7 攻城一起上,有兄弟不孤单——《逆袭大学》连载
  9. 服务器内存16g显示8g可用,电脑安装内存16g可用8g怎么办
  10. 计算机领域常用的英文名称和缩写,计算机常用英文缩写.doc