Reducing OpenSearch log storage cost starts with knowing where the bytes go
If your self-hosted logging cluster is growing faster than the storage budget, the fix is almost never a license change, because OpenSearch is released under the Apache License, Version 2.0 and the OpenSearch FAQ does not describe any paid edition. The savings come from architecture decisions you make per index: the codec and compression level, how long data stays hot and searchable, whether old data moves to cheaper storage, and how many replicas each index keeps. Those four levers are independent, so you can pull one without touching the others, and each one has a price in CPU, query speed or resilience that you should weigh before you change anything.
Start by measuring rather than guessing. Find out which indexes, data streams and time ranges hold most of the bytes, how many replicas each one carries, and how long queries actually reach back into history. A cluster that stores seven days of logs but is searched almost exclusively over the last six hours has a different answer from one where investigators routinely query months of data. Ask your team to confirm the current retention requirement from the business and from any audit obligations before choosing a policy, since deleting data is the one lever you cannot reverse.
Each lever also has a cost you should plan for. A stronger compression setting saves disk but uses more CPU on writes and merges. Moving old indexes to slower storage reduces spend but makes historical searches slower. Dropping a replica saves the most space but removes a copy you may need during node loss, which is why segment replication is worth evaluating separately rather than cutting replicas blindly. The sections that follow take each lever in turn, so treat this one as the inventory step: confirm where the bytes sit before you decide which lever to pull.
Which storage lever fits which log data
This table compares four storage levers for a logging cluster: zstd codecs, ISM deletion, searchable snapshots and segment replication. Read each row for what the lever reduces, what it costs in CPU, query latency, resilience or operations, and the log data it suits. The main takeaway is that these levers stack, but each one trades storage for something else you need to plan for.
| Lever | What it reduces and what it costs | When it fits |
|---|---|---|
| zstd codec with compression levels 1 to 6 | Reduces on-disk size of indexed log data with compression comparable to best_compression and reasonable CPU use. Costs some CPU at index and merge time and requires a reindex or new index to apply. | Hot and warm log indexes where size matters and you want compression close to best_compression without heavy CPU. Not usable on k-NN or Security Analytics indexes. |
| ISM deletion policies | Reduces storage by removing indexes or data streams after a retention period. Costs nothing at query time, but deleted data cannot be searched or recovered from the cluster. | Logs with a defined retention period set by policy or regulation. Confirm retention requirements with compliance and legal owners before configuring deletion. |
| Searchable snapshots on object storage | Moves older index data to a snapshot repository and reads it at search time. Costs query latency, depends on repository access, and needs nodes with the warm role. Indexes are read-only. | Older logs that are rarely searched but must stay queryable. Plan repository availability, network throughput and warm-node capacity before relying on it. |
| Segment replication | Reduces the work of maintaining replicas by copying segments instead of reindexing on each replica. Suits clusters with low replica counts and high write loads. Costs operational complexity and needs validation against your version and workload. | Log analytics clusters with low replica counts and sustained write volume. Confirm behavior and support for your OpenSearch version in the segment replication docs before enabling it. |
How zstd compression levels trade CPU for disk
The zstd codec is the first lever to test on a logging cluster because it can shrink stored log data without the CPU cost usually associated with heavy compression. According to OpenSearch's index codec documentation, zstd gives compression comparable to best_compression with reasonable CPU use and supports compression levels 1 to 6. Each level is a trade: a higher level usually stores less data per shard but takes more CPU during indexing and merges, and the gain is only worth having if the disk saved matters more than the indexing headroom you give up. Set the codec on the index template or index settings for new indexes, since the codec applies to data written after the change rather than rewriting what is already stored.
Test levels against a sample of your own log indexes before you pick one. Take a representative week of indexes from each major source, create a test index per level with the same mapping, replay the same documents into each, and record three measurements: the store size on disk from the _cat/indices output, indexing CPU on the data nodes during the replay, and the latency of the queries your analysts actually run, such as a filtered time range search with an aggregation. Compare the results per level against your own budget for disk and CPU. Confirm with your vendor or cluster documentation how the codec interacts with your OpenSearch version and any force merge you plan to run, because merge behavior changes the final footprint.
Two limits apply before you test. The zstd codec cannot be used for k-NN indexes or Security Analytics indexes, so keep those on their existing settings and plan their storage separately. The size gain also depends on log content: repetitive structured JSON from a single application often compresses far better than free-text messages with random identifiers, and a cluster with mixed sources may see very different results per index. Treat any percentage you read in a vendor article as a hypothesis about your data, and make the decision from the measurements on your own indexes.
Setting up a lower-cost log retention plan
This sequence moves a logging cluster from unmanaged growth to a retention plan where each log class has a codec, a lifecycle policy and a tested restore path. Each step ends with a check you can run against the cluster before the next step begins.
Inventory indices and daily volume
Start by listing every index or data stream on the logging cluster and recording its primary store size and document count. Run
GET _cat/indices?v&s=store.size:descand divide the size of each index family by the number of days it covers to get a daily volume per log source. Your platform team owns this step, with input from the application teams that produce the logs. It is done when you have a table of daily volume per log class and you can name the top five sources by storage, so you know where a change will matter most.Decide retention per log class
Group the sources into log classes such as application debug logs, access logs, audit logs and security events, and set a retention period for each. Audit and security logs often carry retention requirements from your own policies or the frameworks you are assessed against, so confirm those with your compliance lead before you shorten anything. Record the decision in a single table that names the owner of each class. It is done when every index family maps to exactly one class and that class has an approved retention period and owner.
Apply codec settings in an index template
Create or update the index template that matches each new log index so that it sets the
index.codecvalue. The zstd codec is documented with compression levels 1 to 6 and is not usable for k-NN or Security Analytics indexes, so exclude those from this template. Test the level on a copy of a representative index first, comparing store size and indexing CPU, because the right trade-off depends on your hardware. It is done when a newly created index from the template shows the expected codec inGET <index>/_settingsand the store size per day drops compared with the baseline from step one.Build ISM policies with hot, warm and delete states
Write Index State Management policies that move each log class through hot, warm and delete states using the age and rollover conditions you chose in step two. Attach the policy to the index template so new indexes pick it up automatically. Keep existing indexes on their current policy until you have tested the transitions on a non-production cluster. It is done when
GET _plugins/_ism/explain/<index>reports the expected state for a sample index of each class and the policy shows no failed steps.Plan a snapshot repository before moving data
Before any index moves to a searchable snapshot, register a snapshot repository on storage you control and confirm that your snapshot schedule writes to it. Searchable snapshot indexes read from that repository at search time and are read-only, so the repository becomes a dependency for queries on those indexes. Confirm the storage location, access credentials and retention of the repository with the team that owns the object storage. It is done when a test snapshot completes, shows as successful in the snapshot status output, and a test restore of a small index succeeds into a scratch name.
Move selected indexes to searchable snapshots
Choose the log classes whose older data is searched rarely and convert them to searchable snapshot indexes on nodes with the warm role. Start with one index family and keep the hot copy until queries against the snapshot-backed copy return the results your analysts expect. Note in the runbook that these indexes are read-only and that query latency depends on the repository and warm node capacity. It is done when a sample query against the searchable snapshot index returns the expected document count and the warm nodes show healthy disk and memory use.
Test segment replication on a non-production cluster
Segment replication is documented as suited to log analytics clusters with low replica counts and high write loads, so evaluate it on a non-production cluster that mirrors your write pattern. Enable it on a test index template, replay a representative ingest load, and compare indexing throughput, replica lag and recovery behavior against your current document replication setup. Confirm the settings with the OpenSearch segment replication documentation for your version before changing production. It is done when the test report records throughput, replica freshness and a tested node failure, and you have a go or no-go decision for production.
How log data moves from hot storage to deletion
Log data starts on hot nodes as zstd-compressed indexes, then moves to warm nodes as its search needs drop. An ISM policy decides the hand-offs: optionally a snapshot to an object storage repository that is mounted as a read-only searchable snapshot, and finally deletion. Check which indexes qualify for zstd, since k-NN and Security Analytics indexes cannot use it, and confirm which states remain searchable before you set the delete age.
Log indexes move from hot nodes to deletion through ISM states.
When segment replication fits a low-replica logging cluster
Segment replication changes how replicas stay current, which matters most when a logging cluster writes heavily and keeps few replicas. The cards below cover what changes, when the trade-off fits, and what to verify on your own release and write pattern before you adopt it.
What segment replication changes
With document replication, each replica re-indexes every write, so it pays the same CPU and indexing cost as the primary. With segment replication, the primary indexes once and replicas copy the finished segments instead. For a log cluster, that shifts work away from replica nodes during heavy ingest. Check how this affects the indexing and refresh load you measured on your primary before you assume the savings apply to your workload.
Segment replication docsFit with low replica counts
Segment replication suits log analytics clusters that run low replica counts under high write loads. Most log data is written once and rarely changed, so copying segments is a good match for that pattern. If your indices need several replicas for read throughput, the indexing savings may matter less than the read capacity you need. Confirm the replica count you plan to run before you choose a replication model.
Confirm support in your release
Feature availability and default behavior can differ between OpenSearch versions and between index types, so do not rely on general statements alone. Confirm in the release you run whether segment replication is supported for your index settings, your ingest path and any plugins you depend on. Record the result in your change plan so that an upgrade does not silently change the replication model.
Failover and recovery behavior
Replicas that copy segments can hold data that is slightly behind the primary during normal operation, and recovery after a node loss depends on how segments are transferred. Ask how promotion and resync behave in your version, and how long a replica takes to catch up after a restart. Your recovery time objective for logs should be written down and tested against these behaviors rather than assumed.
Test with your own write pattern
Burst traffic from a few busy services, bulk retries after a collector outage, and many small indices behave differently from a steady synthetic load. Run a test that mirrors your real ingest rate, shard count and refresh interval, then compare CPU, disk I/O, replication lag and query latency against your current setup. Keep the results with the cluster design so the decision can be revisited.
Replicas belong on separate nodes
Whichever replication model you choose, a primary and its replica must sit on different nodes, and the docs recommend shard allocation awareness so that copies land in separate failure domains. Reducing replica count saves disk, but it also reduces how many node losses a cluster survives. Plan replica count, node count and allocation awareness together, and confirm the zone layout with your infrastructure team.
Rollups and deletion for old logs and metrics
Deleting old data with Index State Management (ISM) is usually the largest lever on a logging cluster bill, because every day of retained data occupies storage on hot, warm or searchable tiers until a policy removes it. Start by writing down retention per log class: application debug logs, access logs, infrastructure metrics and audit records rarely share a window. Audit requirements in particular are set by your compliance owners and your framework, so confirm the required retention period and the storage location for those records before you write any delete action. An ISM policy that deletes audit indexes on the same schedule as debug logs is a common and costly mistake.
Rollups suit the middle ground, where raw events are no longer searched but summaries still answer questions such as error rates per service or latency trends per day. The main design decision is which fields to keep. Keep timestamps, the grouping keys you actually filter by (for example, service.name or host.name), and the aggregated measures you chart. Drop high-cardinality free text and raw payloads unless an investigation or audit rule needs them. Record the field list and the reason for each field in a short design note, because a rollup cannot recreate fields it did not keep. Confirm in your installed OpenSearch version which rollup and transform features are available, how they are configured and whether they run on the tier where your old data sits. Test a rollup against a copy of real data before you delete the source, and keep the source until you have verified the summary matches your reports.
Security and access considerations for cheaper storage tiers
Moving log data to snapshots and searchable snapshots changes where it lives, not who may see it. The cards below cover the controls that must follow the data across tiers, the audit trail for deletion and restore, and the copies that survive after an index is removed from the cluster.
Repository TLS and object storage credentials
Snapshot repositories hold full copies of log indexes, so the connection between the cluster and the object store needs the same protection as the cluster itself. Confirm that traffic to the repository endpoint uses TLS, that the storage credentials are scoped to a single bucket or prefix, and that they are stored in the OpenSearch keystore rather than in configuration files. Ask who in your organization can rotate these credentials and how a rotation is rehearsed before it is needed.
Security docsRole-based access across tiers
Roles that limit which indexes, documents and fields a team can read are defined against index patterns, so they must still match once an index is mounted as a searchable snapshot or restored from a snapshot. Test a restricted user against a warm or snapshot-backed index before relying on it. Field masking and field-level security should be checked on the restored copy as well, because a role that works on hot data can behave differently on data restored from an older snapshot.
Audit logs for deletion and restore
Deleting an index, changing an ISM policy or restoring a snapshot are the actions that most change what data exists and who can read it. Enable the Security plugin audit logging and decide which categories are recorded, then confirm that entries for these actions reach a log store your security team controls. Set a review step for restores of sensitive indexes, since a restore can bring back data that a retention rule had already removed.
Copies that outlive index deletion
An ISM delete removes an index from the cluster, but snapshots that already contain that index keep their copy until the snapshot itself is deleted. Snapshot retention is therefore a separate control from index retention, and a retention promise made for the cluster may not hold for the repository. Ask who owns snapshot deletion, how it is scheduled, and whether legal hold or regulatory retention requirements apply to the snapshot repository.
Encryption and repository access review
Object storage buckets used for snapshots are often shared by backup jobs, analytics tools and other teams, which widens the set of principals who can read log data. List every identity with read or write access to the bucket, including administrators of the storage platform, and compare that list against the people allowed to read the logs. Confirm that server-side encryption is enabled and that its key management is documented in your own environment.
Questions teams ask before cutting OpenSearch storage cost
Do we need a paid OpenSearch edition to cut log storage cost?
No. All software in the OpenSearch project is released under the Apache License, Version 2.0, and the OpenSearch FAQ does not describe any paid edition. Storage savings come from design decisions you make on your own cluster: the index codec and compression level, how long each index stays hot or warm, when old data is deleted or moved to searchable snapshots, and how many replicas each index keeps. Licensing does not change those levers, so the cost question is really a question about data volume, retention and architecture.
What drives the cost of a storage reduction project, and who pays for what?
The cost has two parts: the engineering work to analyze and redesign the setup, and the infrastructure you already run. Engineering effort rises with the number of log sources, index patterns, retention tiers and compliance rules that must be preserved. Infrastructure cost depends on disk, memory, CPU spent on compression, and object storage if you use snapshot repositories. When you request a quote, ask for the scope of each change, the environments it covers, the testing approach and which items are paid for by the engagement versus your team.
Is cutting log storage cost a one-time project or an ongoing expense?
Most of the work is one-time: measuring current volume, choosing codecs, writing lifecycle policies and validating searches. Some costs recur. Log volume keeps growing, so retention and rollup rules need periodic review. Index policies, snapshot schedules and object storage fees run continuously. Cluster upgrades, which follow the OpenSearch release cadence and maintenance windows, also need the policies re-tested. Ask whether ongoing review is included or offered as a retainer.
How long does a tuning project take for a small cluster compared with a large one?
Duration depends mainly on cluster size, the number of index patterns and how many data types you keep. A single cluster with a few log sources and simple retention rules is faster to analyze than a multi-tenant cluster with traces, metrics, security events and different retention per team. Each additional data type adds analysis, testing and sign-off. The most useful input is an inventory of indices, daily volume per index and the query patterns people actually run. Ask for a timeline that lists these phases separately before you commit.
What must our team provide before a storage review starts?
Three inputs decide how precise the design can be. First, volume data: daily ingest per index or data stream, current disk use, shard counts and replica settings. Second, retention rules: how long each log type must stay searchable, and when it can be deleted or moved. Third, compliance owners: named people who can confirm which logs must be kept, for how long, and where they may be stored. Without these, compression and deletion choices risk removing evidence that an auditor or incident responder needs.
Can our internal platform team reduce storage cost without outside help?
Yes, if the team already operates OpenSearch in production and has time to test changes. The main tasks are measuring volume, applying a zstd codec or compression level to new indices, creating Index State Management policies and testing searchable snapshots. Each change needs a test index, a search regression check and a rollback plan. Teams that lack this experience, or that must keep the work out of production hours, often ask for an outside review to set the design first. Confirm your team's capacity against the inventory and test steps before deciding.
Which codec and tiering choices can break searches or compliance?
The zstd codec gives compression comparable to best_compression with reasonable CPU use and supports levels 1 to 6, but it cannot be used for k-NN or Security Analytics indexes. Searchable snapshot indexes are read-only and run on nodes with the warm role, so queries against them are slower and any write or update workflow must change. Segment replication suits log clusters with low replica counts and high write loads. Before changing any of these, confirm which indices feed Security Analytics, which need vector search, and which queries depend on writes.
How DeployOpen works on this
DeployOpen plans and delivers storage cost reduction for your OpenSearch logging cluster inside infrastructure you control. The work starts with a written scope covering your current data, retention targets and access rules, then moves through a tested build and a documented handover.
How we scope
- Inventory current indices, data streams, retention periods and the storage each tier consumes today
- Agree in writing which codec, rollup, ISM and snapshot changes are in scope and which are excluded
- Confirm the object storage, snapshot repository and warm node capacity you already operate or plan to run
- Record which log sources, teams and compliance retention rules must keep working during the change
How we build
- Test the zstd codec and compression levels 1 to 6 on copies of representative indices before any production change
- Write ISM policies that move, roll up or delete data on the schedule you approved, and test each transition
- Configure searchable snapshot indexes on the warm role and measure query behavior against your retention needs
- Evaluate segment replication for low-replica logging indices, with rollback steps prepared before cutover
How we hand over
- Deliver the ISM policies, index templates, snapshot settings and codec configuration as version-controlled files
- Document each retention rule, its owner and the query impact your analysts should expect from older data
- Run a handover session with your platform and security teams covering monitoring, restore tests and change control
- Provide a written record of tests run, results observed and open items that remain with your team
How we support
- Engagements are fixed-scope, with deliverables and timelines agreed in writing before work starts
- Ongoing support, OpenSearch upgrades and continuous testing are available as retainers
- Plan follow-up reviews when your log volumes grow or a new OpenSearch minor version changes codec or snapshot behavior
- Ask for the written scope and quote to list every component, environment and test included before you commit

