# Do I have too many shards?

**URL:** <https://discuss.elastic.co/t/do-i-have-too-many-shards/358027>\
**Category:** Elasticsearch\
**Tags:** docker\
**Created:** [April 23, 2024, 12:50pm UTC](https://discuss.elastic.co/t/do-i-have-too-many-shards/358027 "2024-04-23T12:50:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yoann\_Buzenet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yoann_buzenet/32/133522_2.png) [@Yoann\_Buzenet](https://discuss.elastic.co/u/Yoann_Buzenet)\
**Post date:** [April 23, 2024, 12:50pm UTC](https://discuss.elastic.co/t/do-i-have-too-many-shards/358027/1 "2024-04-23T12:50:13Z")

</div>

My ELK stack passed in red status this morning because of missing memory on disk. After cleaning it a bit, it could reassign an unassigned shard and it came back to yellow again and it works.

I checked the health endpoint and I wanted to have your opinion on it.

```auto
{
"cluster_name": "docker-cluster",
"status": "yellow",
"timed_out": false,
"number_of_nodes": 1,
"number_of_data_nodes": 1,
"active_primary_shards": 57,
"active_shards": 57,
"relocating_shards": 0,
"initializing_shards": 0,
"unassigned_shards": 4,
"delayed_unassigned_shards": 0,
"number_of_pending_tasks": 0,
"number_of_in_flight_fetch": 0,
"task_max_waiting_in_queue_millis": 0,
"active_shards_percent_as_number": 93.44262295081968
}

```

Here is disk usage from this curl command :

```auto
curl -X GET "localhost:9200/_cat/allocation?v=true&h=node,shards,disk.*&pretty"

```

```auto
node shards disk.indices disk.used disk.avail disk.total disk.percent
elasticsearch 57 71.8mb 78.9gb 12.3gb 91.2gb 86
UNASSIGNED 4 

```

I have 4000 documents with one dense\_vector for each. Do you think this is optimal, or do I have way too many shards?

Thank you!

---

<div class="post-metadata">

**Author:** ![Kathleen\_DeRusso](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kathleen_derusso/32/132039_2.png) [@Kathleen\_DeRusso](https://discuss.elastic.co/u/Kathleen_DeRusso)\
**Post date:** [April 24, 2024, 2:15pm UTC](https://discuss.elastic.co/t/do-i-have-too-many-shards/358027/2 "2024-04-24T14:15:03Z")

</div>

Some things to consider when choosing the number of shards are [shard size](https://www.elastic.co/guide/en/elasticsearch/reference/current/size-your-shards.html) and memory. It's likely worth experimenting with smaller shard sizes to see if it's better for your use case.

---

<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:** [May 22, 2024, 2:15pm UTC](https://discuss.elastic.co/t/do-i-have-too-many-shards/358027/3 "2024-05-22T14:15:25Z")

</div>

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