一.增加用户可以打开的文件数
bin/elasticsearch -f 前台启动es,查看启动参数,默认max-open-file 998
文件描述符配置设置为32k或者64k,具体配置为:
vim /etc/security/limits.conf
用户名 soft nofile 65536
用户名 hard nofile 65536
二 内存设置,确保elasticsearch使用物理内存,不使用linux swap
es配置文件中修改
bootstrap.mlockall:true
vim /etc/security/limits.conf
用户名 -memlock unlimited
echo "ulimit -n 65535" >> /etc/profile
echo "ulimit -n 65535" >> /etc/profile
$ bin/elasticsearch -f -Des.max-open-files=true