Elasticsearch配置官方建议
第一 有关内存 修改ES_MIN_MEM 和 ES_MAX_MEM 建议: in general, the more memory allocated to the process, the better(通常,越大越好) It is recommended to set the min and max memory to the same value, and enable mlockall.(建议设置成相同的值,并且开启mlockall) No more than 50% of available RAM (不要超过内存的一半) No more than 32 GB: If the heap is less than 32 GB, the JVM can use compressed pointers, which saves a lot of memory: 4 bytes per pointer instead of 8 bytes.(不要超过32G,因为对于JVM,小于32G的时候会使用压缩指针,这个会节省很大内存) Increasing the heap from 32 GB to 34 GB would mean that you have much less memory available, because all pointers are taking double the space. Also, with bigger heaps, garbage collection becomes more costly and can result in node instability.(从32G到34G,意味着你失去了更多的可用内存,因为所有的内存指针都变成了double,而且heap越大,GC花销越大,这将是不稳定因素) ...