ElasticSearchã§mlockall:trueãå¹ããªãæã«ãã§ãã¯ãããã¨
ElasticSearchã£ã¦æ¥æ¬èªã®æ
å ±å°ãªãã¦è¾ãã§ãã
ä»åã¯mlockall:trueã®è¨å®ãå¹ããªãã£ãæã®ãã§ãã¯é
ç®ãæ®ãã¦ããã¾ãã
mlockall:trueã¨ã¯
ElasticSearchã¯å
¬å¼ã§ãèµ·åæã«ã¡ã¢ãªã確ä¿ããã¹ã¯ããããªãããã«ãããã¨ããè¨å®ãæ¨å¥¨ããã¦ãã¾ãã
â»åç
§ï¼Configuration
ã¾ãèµ·åæã«ã¡ã¢ãªã確ä¿ããããã«ã¯ã/etc/sysconfig/elasticsearch
ã§ES_HEAP_SIZE
ãè¨å®ããå¿
è¦ãããã¾ããï¼å
¬å¼ã§ã¯å®ã¡ã¢ãªã®ååç¨åº¦ã32GBãè¶
ããªãããã«ã¨è¨ã£ã¦ã¾ãï¼
ããã¦ElasticSearchã®ã¡ã¢ãªãã¹ã¯ããããªãããã«ããããã«ã/etc/elasticsearch/elasticsearch.yml
ã§bootstrap.mlockall: true
ãè¨è¿°ããå¿
è¦ãããã¾ãã
以ä¸ã®è¨å®ãããå¾ã§elasticsearchãåèµ·åããã°æ®éã¯è¨å®ãåæ ããã¾ãã
http://localhost::9200/_nodes/process?pretty
ãè¦ã¦mlockallãtrueã«ãªã£ã¦ãããã確èªãã¾ãããã
ã¯ããtrueã«ãªã£ã¦ã¾ããããããã§trueã«ãªã£ã人ã¯ããããä¸ã¯èªã¾ãªãã¦å¤§ä¸å¤«ã§ãã
mlockall:trueã®è¨å®ãå¹ããªãæ
ã¾ãã¯/etc/sysconfig/elasticsearch
ã§MAX_LOCKED_MEMORY=unlimited
ãè¨è¿°ããã¦ããã確èªãã¾ãã
ããã§å¤§æµã®å ´åã¯trueã«ãªãã¯ããªã®ã§ãããCentOS7ãªã©ã§systemdéç¨ããã¦ããå ´åãããã«å ãã¦/etc/systemd/system/elasticsearch.service
ã§LimitMEMLOCK=infinity
ã®è¨è¿°ãå
¥ããå¿
è¦ãããããã§ãã
/etc/systemd/system/elasticsearch.service
ã®éå½¢ã¯/usr/lib/systemd/system/elasticsearch.service
ããæã£ã¦ãã
以ä¸ã®è¨å®ãå
¥ãããsystemctl daemon-reload
ãæã£ãå¾ã«elasticsearchãåèµ·åãã¦ãã ããã
åã®å ´åã¯ããã§ç¡äºã«mlockallãtrueã«ãªãã¾ããã
èªåã®ç¥èä¸è¶³ãããã¾ãããOSS触ã£ã¦ãã¨ããã»ãã¨ã«è§£æ±ºããã®ã¿ãããªäºããããã£ã¦æ¥½ããã§ããã