elasticsearch写入优化的示例分析-古蔺大橙子建站
RELATEED CONSULTING
相关咨询
选择下列产品马上在线沟通
服务时间:8:30-17:00
你可能遇到了下面的问题
关闭右侧工具栏

新闻中心

这里有您想知道的互联网营销解决方案
elasticsearch写入优化的示例分析

小编今天带大家了解elasticsearch写入优化的示例分析,文中知识点介绍的非常详细。觉得有帮助的朋友可以跟着小编一起浏览文章的内容,希望能够帮助更多想解决这个问题的朋友找到问题的答案,下面跟着小编一起深入学习“elasticsearch写入优化的示例分析”的知识吧。

创新互联公司是专业的永平网站建设公司,永平接单;提供成都网站设计、成都网站建设,网页设计,网站设计,建网站,PHP网站建设等专业做网站服务;采用PHP框架,可快速的进行永平网站开发网页制作和功能扩展;专业做搜索引擎喜爱的网站,专业的做网站团队,希望更多企业前来合作!

全量dump数据时,为优化性能,可做如下优化。

  1. 分片设置,不分片

http://localhost:9200/test_index/_settings/
{
  "index": {
    "number_of_replicas": 0
  }
}
  1. 刷新设置,不刷新

http://localhost:9200/test_index/_settings/
{
  "index": {
    "refresh_interval": "-1"
  }
}
  1. translog 大小设置,调大 默认512M

http://localhost:9200/test_index/_settings/
{
  "index.translog.flush_threshold_size": "1024mb"
}
  1. 如果是SSD硬盘,修改段合并速率

http://localhost:9200/_cluster/settings/
{
  "persistent": {
    "indices.store.throttle.max_bytes_per_sec": "200mb"
  }
}

http://localhost:9200/_cluster/settings/
{
  "transient": {
    "indices.store.throttle.type": "none"
  }
}

全量dump后,再恢复一下

  1. 分片设置

http://localhost:9200/test_index/_settings/
{
  "index": {
    "number_of_replicas": 2
  }
}
  1. 刷新设置,不刷新

http://localhost:9200/test_index/_settings/
{
  "index": {
    "refresh_interval": "1s"
  }
}
  1. translog 大小设置

http://localhost:9200/test_index/_settings/
{
  "index.translog.flush_threshold_size": "512mb"
}

当然应该使用bulk模式, elasticsearch单次提交数据尽量在15M以内。

感谢大家的阅读,以上就是“elasticsearch写入优化的示例分析”的全部内容了,学会的朋友赶紧操作起来吧。相信创新互联小编一定会给大家带来更优质的文章。谢谢大家对创新互联网站的支持!


本文题目:elasticsearch写入优化的示例分析
标题来源:http://scgulin.cn/article/ihoigp.html