Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shards should rebalance across multiple path.data on one node #11271

Closed
mikemccand opened this issue May 20, 2015 · 4 comments
Closed

Shards should rebalance across multiple path.data on one node #11271

mikemccand opened this issue May 20, 2015 · 4 comments
Assignees

Comments

@mikemccand
Copy link
Contributor

Follow-on from #11185:

As of #9398 we now allocate an entire shard to one path on node's path.data, instead of file by file.

Even though we do the initial allocation to the path.data with the most free space, if the shards then grow in lopsided ways (an "adversary"), we can get to a state where one path.data is nearly full while others are very empty, on a single node. I suspect such adversaries would not be uncommon in practice...

Yet, DiskThresholdDecider only looks at total usable space on the node (not per-path on path.data) so it won't notice when only one path is close to full... we need to fix that? Also, the shard allocation process needs to see/address each path.data separately somehow?

Sometimes a shard would just move from one path.data to another path.data on the same node (maybe we should bias for that, all other criteria being nearly equal, since we save on network traffic).

I think it's important to fix this but this is beyond my knowledge of ES now ...

@mikemccand mikemccand added >bug v2.0.0-beta1 blocker :Core/Infra/Core Core issues without another label labels May 20, 2015
@dakrone
Copy link
Member

dakrone commented May 20, 2015

DiskThresholdDecider only looks at total usable space on the node (not per-path on path.data) so it won't notice when only one path is close to full... we need to fix that?

+1, I think instead of doing the average for all the paths we can just use the max used data path on the node?

@mikemccand
Copy link
Contributor Author

I think instead of doing the average for all the paths we can just use the max used data path on the node?

I think so, at least for the logic that notices when a node is "getting full" and triggers a rebalance.

@clintongormley
Copy link
Contributor

I think there are only two possible solutions here:

  1. Write a path-aware allocator
  2. Remove multi-path support

@clintongormley
Copy link
Contributor

If we remove multi-path support, users can run multiple instances per server, and we'd need to provide a tool to migrate data before starting the cluster (or use snapshot/restore)

@clintongormley clintongormley mentioned this issue Aug 11, 2015
14 tasks
s1monw added a commit to s1monw/elasticsearch that referenced this issue Aug 21, 2015
…ation

Today we only guess how big the shard will be that we are allocating on a node.
Yet, we have this information on the master but it's not available on the data nodes
when we pick a data path for the shard. We use some rather simple heuristic based on
existing shard sizes on this node which might be complete bogus. This change adds
the expected shard size to the ShardRouting for RELOCATING and INITIALIZING shards
to be used on the actual node to find the best data path for the shard.

Closes elastic#11271
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants