Movatterモバイル変換


[0]ホーム

URL:


Skip to content
DEV Community
Log in Create account

DEV Community

Cover image for Seven rules for OpenSearch sizing
AWS Community Builders  profile imagedejanualex
dejanualex forAWS Community Builders

Posted on • Edited on

     

Seven rules for OpenSearch sizing

OpenSearch splitsindices intoshards. Each shard stores a subset of alldocuments in an index.

  1. Shard sizes should be between10–50 GB per shard, 10–30 GB for workloads prioritizing low latency (e.g. search workloads), or between 30–50GB (e.g. logs workloads).

  2. Estimate the total size of the data you plan to store in the index, decide on a shard size based on the rule above, and calculate the number ofprimary shards:ingested_data_size/shard_size.

  3. The number and size of shards you set for an index corresponds to the size of an index, OpenSearchdefaults toone primary andone replica shard, for a total of two shards per index.

  4. Shardcount issecondary to shardsize.

  5. Shardsize impacts both search latency and write performance, toomany small shards willexhaust thememory (JVM Heap), and toofew large shards prevent OpenSearch from properlydistributing requests. The JVM heap size should be based on the available RAM: SetXms andXmx to the same value, and no more than50% of yourtotal memory.

  6. Forfast indexing (ingestion), you need asmany shards as possible; forfast searching, it is better to have asfew shards as possible.

  7. Number of shards for index: you should have at least 1 shard per data node, ideally try to make theindex shard count an even multiple of the data node count.

🛠️ Last, here's a simpleOpenSearch calculator for shard sizing.

Top comments(0)

Subscribe
pic
Create template

Templates let you quickly answer FAQs or store snippets for re-use.

Dismiss

Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment'spermalink.

For further actions, you may consider blocking this person and/orreporting abuse

Build On!

Would you like to become an AWS Community Builder? Learn more about the program and apply to join when applications are open next.

More fromAWS Community Builders

DEV Community

We're a place where coders share, stay up-to-date and grow their careers.

Log in Create account

[8]ページ先頭

©2009-2025 Movatter.jp