Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
143 views
in Technique[技术] by (71.8m points)

Elasticsearch configuration in a shared server

I do know it's better to have separate server for each job, but I have a shared server between Elasticsearch and MySQL, with a total 8 Gig RAM. I want to assign 4G to Elasticsearch and 4G to MySQL. We know that in Elasticsearch :

As a rule of the thumb, the maximum heap size should be set up to 50% of your RAM,

Question No.1 : I don't know, I need to set the min and max JVM heap size, to 4G or 2G in this case which we have 8G memory shared with MySQL?

 -Xms4g
 -Xmx4g
Or :
 -Xms2g
 -Xmx2g

Another configuration: we should avoid swapping in Elasticsearch, so I set bootstrap.memory_lock: true, and I need to set/uncomment MAX_LOCKED_MEMORY=unlimited in file /etc/default/elasticsearch.

Question No.2: Do I have to set this to unlimited while we know that only 4G must be assigned to Elasticsearch? How do I set MAX_LOCKED_MEMORY to 4G for example and not to unlimited? cause I have 8G shared memory between Elasticsearch and MySQL, and is this true in this case to set it to 4G instead of unlimited? If not, what's the best configuration? I think it should be something like this maybe:

MAX_LOCKED_MEMORY= 4G
question from:https://stackoverflow.com/questions/65950194/elasticsearch-configuration-in-a-shared-server

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...