elasticsearch笔记


elasticsearch

安装

优化

  • 关闭swap
    swapoff -a
    # 注释 /etc/fstab swap
    sysctl -p
    
  • unlimit调整
    sysctl -w vm.max_map_count=262144
    echo 'vm.max_map_count=262144' >> /etc/sysctl.conf
    
  • 使用ssd

重启

curl -X PUT "localhost:9200/_cluster/settings" -H 'Content-Type: application/json' -d'
{
  "persistent": {
    "cluster.routing.allocation.enable": "none"
  }
}
'
curl -X POST "localhost:9200/_flush/synced …