# Optimizing shard placement for indexing

**URL:** https://discuss.elastic.co/t/optimizing-shard-placement-for-indexing/276227
**Category:** Elasticsearch
**Created:** [June 17, 2021, 7:49am UTC](https://discuss.elastic.co/t/optimizing-shard-placement-for-indexing/276227 "2021-06-17T07:49:20Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Timur\_Makarchuk](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/timur_makarchuk/32/88755_2.png) [@Timur\_Makarchuk](https://discuss.elastic.co/u/Timur_Makarchuk)
#### Post date: [June 17, 2021, 7:49am UTC](https://discuss.elastic.co/t/optimizing-shard-placement-for-indexing/276227/1 "2021-06-17T07:49:20Z")

</div>

Good day, everyone!

I'm currently working on a tool that would spread indices in our cluster to spread indexing load more optimally, as inspired by this article ([Optimal Shard Placement in a Petabyte Scale Elasticsearch Cluster - Meltwater Engineering Blog](https://underthehood.meltwater.com/blog/2018/11/05/optimal-shard-placement-in-a-petabyte-scale-elasticsearch-cluster/)).

I have quite a few indices with very uneven write-load between them. So it seems like this would make sense for my index.

The problem I'm seeing is that two write-load markers I'm observing aren't necessarily following each other. Those two markers are increase of `thread_pool.write.completed_tasks` and increase of sum of `indexing.index_time_in_millis`over all the shards allocated on node in question.

My question is which one of those provides better optimization function for my use case.

My broader question is: Is it possible to understand what kind of tasks Write Threads are executing. I understand from docs that those are indexing and bulk tasks, but bulk I'd like to learn some details about that. Would `bulk` request produce task for Write Thread on a node request hits? Will actions from bulk request produce more tasks or the whole bulk request would produce just one task?

Thank you in advance.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [July 15, 2021, 7:49am UTC](https://discuss.elastic.co/t/optimizing-shard-placement-for-indexing/276227/2 "2021-07-15T07:49:40Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
