ES combat record expansion

In the IT operation and maintenance work we use as a tool elasticsearch millions of large data queries, we often encounter case due to insufficient memory es es cluster fragmentation damage,

Between the above, I am here to provide you es cluster expansion correct operation

I use two here es as a data node, respectively es1 and es2, in order to both server nodes are adjusted from 4G to 16G,

Adjust the premise for the entire cluster must have a slice of the server is complete, whether the person will lead to fragmentation incomplete, clustered recovery failed expansion failed! ! !

First, use the command free -m check the system memory size, ezsonar4.0 we are using the es 5.6 version of elastirsearch,

Using cluster head View cluster status at this time is a normal situation.

Close es2 process operation by the line expansion

ps -ef |grep elastic

kill -9 es_pid

After closing process es cluster being given a red state

Memory modify the configuration file is /ES_HOME/config/jvm.options

4G will not modify 16G, es best memory revised to 50% of system memory, my memory, this server is 32G, the best memory is 16G.

cd / ES_HOME / bin /

./startup.sh

ps -ef |grep elastic

top track view memory consumption,

Use head to view the system remains the case that can not be used, but after observing restart the discovery of system memory in use gradually be quickly read, here you can rest assured,

During the recovery process you will see below, the cluster will turn from red to yellow, then green. Here is the case in the process of being restored. But this practice will be very long

We are above the expansion recover es2, then recovery is complete,

Last night es2 I do every other day off work in the afternoon es1 period of expansion, and way above, I will not repeat, expansion back to normal this morning to see the results as shown below.

There is no point of praise to one, you are encouraged to praise ah.

Guess you like

Origin www.cnblogs.com/qianxiaoruofeng/p/10118695.html