Hello All,
I have noticed that I have 1 server out of 5 in the cluster, that stores the majority of the data/indices.
Also, one of the nodes holds a lower number of shards.
How can I balance the indices across the nodes?
How can I balance the shards across the nodes?
What is the history, i.e. were there more indexes before, or perhaps unbalanced when that node was down and some indexes created, etc.? Are all nodes the same in terms of disk/ RAM/JVM, etc.? And what is typical index setting for shards/replicas?
@AClerk
I am assuming cluster rebalance is not blocked and node3 disk does not have anything other than ES data. The later is important as available disk space matters not the size of the disk. You can verify this using node stats API _nodes/<node_id>/stats/fs?pretty or _nodes/stats/fs?pretty.
Unless you are experiencing performance issue I won't worry about it. In my experience, unless you hit disk high watermark or certain node is overloaded ES doesn't move shards. Because moving a shard is an expensive operation, consumes network bandwidth, incurs gc and loses caches. When I new shard is allocated it takes available disk space into account. But ES cannot predict how big this shard going to grow in size. It treats all shards equally. Some shards may grow faster but won't be moved unless you hit watermark.
If you are experiencing performance issue, you need to first decide which shard to move. This depends on your query volume on each index and shard size. You can use then use cluster route api to move specific shard(s).
For a long term solution, I would explore something on the lines of ILM since you are using time based shards. Your cluster size is small. So you need to assess based on query volume on the old data.
Finally for some reason you want all nodes to have roughly equal utilization, compute (total data size on all nodes * 100) / (5 * disk size). The set low and high watermarks slightly higher than that. This will force ES to rebalance. Once rebalancing completes you can set those back to default. Make sure you create hourly indices for several hours and may be even daily for a day or two before changing watermark. I won't recommend this as I don't see major benefits but it can go wrong badly if not done correctly. Including option only for information.
Hi @Vinayak_Sapre
thanks for your reply.
I do have performance issues and I am truing to find the root cause.
It is not necessarily because of nodes balance.
I have more than 2TB available on the disks for each node. So I think this is not an issue.
Based on the different time periods covered by the indices it sounds like you could be having indices of very different sizes. How large is your largest index? How many indices around that size do you have? How large is your smallest index?
Slow won't affect where shards go - we have a new visual view we are working on for the cluster and by index to see where things are going; couple other tools have a bit of that, but there must be some reason over time, especially if you are creating new indexes all the time.
By size, I'm pretty sure Christian mans in types/store size; doc counts don't matter as they can be 10B or 100MB each. Size might affect where things go, especially if huge, I guess.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.