How to change Elasticsearch max memory size

后端 未结 11 831
时光取名叫无心
时光取名叫无心 2020-11-30 16:57

I have an Apache server with a default configuration of Elasticsearch and everything works perfectly, except that the default configuration has a max size of 1GB.

I

11条回答
  •  野性不改
    2020-11-30 17:59

    In elasticsearch 2.x :

    vi /etc/sysconfig/elasticsearch 
    

    Go to the block of code

    # Heap size defaults to 256m min, 1g max
    # Set ES_HEAP_SIZE to 50% of available RAM, but no more than 31g
    #ES_HEAP_SIZE=2g
    

    Uncomment last line like

    ES_HEAP_SIZE=2g
    

提交回复
热议问题