﻿---
title: Increase in shards count
description: Describes what AutoOps detects and surfaces with the Increase in shards count insight: The number of shards on a node jumped sharply compared with the prior observation window, faster than normal growth for that cluster.
url: https://docs-v3-preview.elastic.dev/elastic/autoops-insights/tree/main/elasticsearch/increase_in_shards_count
products:
  - Elastic Cloud Enterprise
  - Elastic Cloud Hosted
  - Elastic Cloud on Kubernetes
  - Elasticsearch
applies_to:
  - Elastic Cloud Hosted: Generally available
  - Elastic Cloud on Kubernetes: Generally available
  - Elastic Cloud Enterprise: Generally available
  - Self-managed Elastic deployments: Generally available
---

# Increase in shards count
The number of shards on a node jumped sharply compared with the prior observation window, faster than normal growth for that cluster. Frequent index creation, high primary counts per index, daily rollovers, extra replicas, splits, or ingest spikes are common drivers.
<note>
  For a complete list of insights, refer to [AutoOps insights](https://docs-v3-preview.elastic.dev/elastic/autoops-insights/tree/main/elasticsearch).
</note>


## Insight details


| Field     | Value                              |
|-----------|------------------------------------|
| Component | Elasticsearch                      |
| Severity  | Medium                             |
| Scope     | Index                              |
| Domains   | index-management, shard-allocation |


## Customization settings

You can customize these settings to adjust when AutoOps detects this event and presents the insight. Refer to [AutoOps event settings](https://docs-v3-preview.elastic.dev/elastic/docs-content/tree/main/deploy-manage/monitor/autoops/ec-autoops-event-settings) for details.
The default customization settings are:

| Setting                              | Type       | Default |
|--------------------------------------|------------|---------|
| Minimum shards count threshold       | Integer    | 500     |
| Minimum shards increase percentage   | Percentage | 50      |
| Shard increase check period in hours | Integer    | 12      |
| Minimum shards count increase        | Integer    | 50      |


## Example: What you might see in AutoOps

The following is an example of what you might see when this insight is triggered. Real insights use live data and links from your deployment or cluster.

### Sharp increase of shards on node `es-data-01`


#### What was detected

An unusual increase in the number of shards was identified on node `es-data-01` and `es-data-02`. Over the past 48 hours, the number of shards has increased by 12%. However, in the previous period of 48 hours, the number of shards had increased only by 12%.

#### Recommendations

<note>
  AutoOps shows different recommendations depending on how their conditions match your deployment or cluster.
</note>

<dropdown title="Add data node">
  **Condition**: Shown when shard growth exceeds cluster capacity.Add a data node to increase capacity and reduce pressure on the existing nodes.
</dropdown>

<dropdown title="Reduce shard count">
  **Condition**: Shown when index has high primary shard count.Use the shrink API to reduce primary shards on logs-prod-000045 to 12 in logs-prod-000046. See the [Shrink API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-shrink) for prerequisites.
  ```json

  {
    "settings": {
      "index.number_of_shards": 12
    }
  }
  ```

  <note>
    Requires the `manage cluster` privilege. Requires Elasticsearch 8.0.0 or later. This action changes cluster or index configuration.
  </note>
</dropdown>

<dropdown title="Reduce shard replicas">
  **Condition**: Shown when shard growth exceeds cluster capacity.Reduce replica count on logs-prod-000045 from 1 to 2 to free disk space. Start with indices that have more than two shard copies.
  ```json

  {
    "index": {
      "number_of_replicas": 2
    }
  }
  ```

  <note>
    Requires the `manage` index privilege. Requires Elasticsearch 8.0.0 or later. This action changes cluster or index configuration.
  </note>
</dropdown>


#### Background and impact

The sharp increase of shards can occur due to frequent index creation, high shard settings per index, daily time-based indices, rollover actions, excessive use of replicas, index splitting, increased data intake, or a lack of shard optimization or merging. A rapid, unsupervised rise in the number of shards can negatively impact performance.

### Guide

[Size your shards](https://www.elastic.co/guide/en/elasticsearch/reference/current/size-your-shards.html)