From 52k to 112k log lines/s: 3 settings and logsdb_columnar in Elasticsearch
Measured on VictoriaMetrics’s own harness, three settings and logsdb_columnar cut Elasticsearch's disk use 70% and CPU per line by more than half, closing most of the ingest gap to VictoriaLogs.
Check out the different ways to ingest data into Elasticsearch and dive into practical examples to try something new.
Elasticsearch is packed with new features to help you build the best search solutions for your use case. Start a free cloud trial or try Elastic on your local machine now.
We reran VictoriaMetrics’s benchmark of six logging systems, changing one thing at a time, and closed most of the gap it found for Elasticsearch. Three configuration changes took Elasticsearch from 52k to 67k lines/s and from 263 to 146 MiB per million lines. Batch indexing and a new columnar index mode, logsdb_columnar, took it further, to 112k lines/s and 80 MiB, with CPU at 40k lines/s, down from 4.8 to 1.8 cores.
As engineers, we want to know two things when we see a benchmark result like VictoriaMetrics’s for Elasticsearch. Why is the gap there? And are we missing something fundamental that we should be fixing? That’s what we work through in this blog post, on the harness and hardware described in VictoriaMetrics’s post.
Here, we mostly cover ingest and storage, along with CPU. Queries are the side where the original post already shows Elasticsearch ahead (0.10s against 6.5s for a common word), and we’re not redoing its query test. Near the end, we add a quick look at queries and at memory.
logsdb_columnar is a preview feature in both Elastic Self-Managed (since 9.5) and in Elastic Cloud Serverless (Serverless). Batch indexing is the default indexing path in that mode. It’s part of work that we’ve written about before: LogsDB performance and storage improvements in 8.19 and 9.1, how columnar storage works, and what it means for index design.
The performance work behind these numbers is already done. It’s live in Serverless today and is planned for a self-managed release. Serverless doesn’t let us pick the hardware, so we built a self-managed snapshot to measure it on hardware directly comparable to VictoriaMetrics’s benchmark.
The chart below previews where this ends up: three panels (ingest ceiling, disk, CPU), one bar per step on the ladder (which we walk through next), with the range across identical instances. Higher is better for ingest; lower is better for disk and CPU. CPU is shown at 40k lines/s, the same basis used throughout the rest of this post. The dashed line in each panel marks VictoriaLogs’s published number for that metric.
Figure 1: Ladder results from the published configuration to the columnar build.
How we ran it
The VictoriaMetrics harness is open source, which is what made this possible. One writer sends the same seeded stream of structured logs (each log line is one JSON document of about 930 bytes, with 30–40 fields) to every system at once, starting at 10k lines/s and going up by 10k every 10 minutes. A system’s ceiling is the best 10-minute average that it actually stored.
We kept the VictoriaMetrics setup: Elasticsearch 9.5.5 on Elastic Cloud on Kubernetes (ECK), one single-node instance per n2d-standard-8 (8 vCPUs, 32 GB, 500 GiB disk), LogsDB, and everything else at defaults. All numbers in this post are from self-managed nodes, including the columnar rung’s self-managed 9.7.0-SNAPSHOT build (commit a0c0b5a0). As in the original, every instance runs on its own node and is fed the same stream at the same time, and we ramped to 150k lines/s. Our VictoriaLogs and published-configuration Elasticsearch results land close to VictoriaMetrics’s own (122k lines/s and 1.52 cores for VictoriaLogs, against its published 120k and 1.6), which gives us confidence in the setup. When the ramp finished, we let disks settle before reading disk sizes, following the harness’s own advice, and we never flushed or force-merged.
Identical instances aren’t perfectly identical. At saturation, their ceilings differ by up to about 15%. We didn’t isolate the cause, and this is a shared cloud, so we treat it as ordinary variance. Our numbers are means over the identical instances we ran, with the range shown in the charts, and we only treat a difference as real when the ranges don’t overlap. We ran the benchmark four times, each on its own cluster, and combined the results for instances with identical configurations. The charts show how many instances went into each result.
Figure 2: Ramp curves and spread across identical instances.
The five configurations form a ladder, and every rung changes exactly one thing from the rung before it:
Step | What we changed |
|---|---|
Published | Nothing (9.5.5, Basic license, default pipeline) |
+ pipeline off |
|
+ license | A trial license (for synthetic source) |
+ 30 s refresh |
|
Columnar | The same, on a self-managed 9.7.0-SNAPSHOT build with batch indexing and |
The first rung matters for credibility; our published-configuration instances average 52k lines/s (49k–54k) and 263 MiB per million lines, against 48k and 266 in the original. So the ladder starts from the published setup.
Out of the box, Elasticsearch gives you the published numbers. Of the three changes below, two are index settings and one is a license. We’re also tracking a change so a no-op pipeline costs nothing to run (issue #166835).
Step 1: The pipeline this dataset doesn’t need
The built-in logs template runs a default ingest pipeline, logs@default-pipeline, on every document. All it does for this dataset is fill in @timestamp if it’s missing, and the harness always sends one. So it changes nothing. To confirm, we took a raw document from an instance with the pipeline off and ran it through the pipeline’s simulate endpoint:
POST _ingest/pipeline/logs@default-pipeline/_simulate
{
"docs": [
{ "_source": { "@timestamp": "2026-11-04T10:00:00Z", "...": "33 more fields" } }
]
}We get the same 34 fields back, with nothing added or changed.
The logs@default-pipeline isn’t free, though. Every document still gets parsed into a map and serialized again around the pipeline, which costs about 17–22 core-microseconds per document at 20k–40k lines/s, from the CPU difference between the six published instances and the six with the pipeline off. Turning it off with index.default_pipeline: _none skips that whole step.
Figure 3: Ceiling and CPU with the default pipeline off.
With the pipeline off, the ceiling goes from 52k to 59k lines/s (+13%), and CPU drops from 6.6 to 5.3 cores, measured at 50k lines/s here, the most that the published configuration can sustain. (The rest of the post uses 40k lines/s, the original benchmark’s basis.) Settled disk also shifts slightly (down to 252 MiB per million lines), ordinary cross-instance variance. After the run, ingest.total was zero on every pipeline-off instance we checked. That holds for this dataset, where every line carries a timestamp. If you rely on the pipeline to fill in a missing one, keep it.
Step 2: Synthetic source cuts log storage by 42%
The published configuration runs with Elasticsearch’s Basic license. Synthetic source, which reconstructs _source from doc values instead of storing it, requires an Enterprise subscription. (We used a trial, which includes Enterprise features.) Without it, Elasticsearch stores every document’s full source next to the indexed fields.
Figure 4: Left: Settled disk per million lines at each step. Right: Where the bytes go, from _disk_usage, for the same instances; the total above each stack is the settled store size.
Of the three configuration changes, the license has by far the biggest effect on disk. In _disk_usage, stored fields drop from 125 to 4 MiB per million lines and doc values grow by about 15 MiB (that’s where the source now comes from). The inverted index doesn’t change. Total: 252 down to 146 MiB per million lines, 42% less. The ceiling goes up a bit too (59k to 66k lines/s), which is what you’d expect from writing less.
Step 3: How refresh_interval interacts with the benchmark harness polling
The harness counts stored lines by polling GET _count every 15 seconds, for the whole ingest. That’s a search, and Elasticsearch shards that receive no search for 30 seconds stop refreshing on a schedule. With the poll running, they never go idle, so every shard refreshes every second for the entire run.
The constant refreshing is a side effect of counting lines by polling. It’s worth knowing about, because an explicit index.refresh_interval: 30s makes shards refresh every 30 seconds, regardless of whether anything is searching them. The price is that new logs take up to 30 seconds to become searchable.
Figure 5: Refresh and merge counters with and without the 30-second setting.
Over the whole run, an instance went from about 6,300 refreshes to 480, and from about 1,350 merges to 140. Merged volume dropped from about 181 to 147 GiB, but the merges that remain are larger.
What this step doesn’t do is raise the ceiling or shrink the data. The ceiling is 66k lines/s before and 67k after, inside the spread, and settled disk is 146 against 146 MiB per million lines. So we don’t count it as a speedup. Fewer refreshes and merges should still mean less CPU spent on housekeeping and less data movement.
So, after all three, the released build lands at about 67k lines/s, 146 MiB per million lines, and 3.0 cores at 40k lines/s. That’s a real improvement, but it’s still about 1.8x behind VictoriaLogs on ingest rate, as well as 2.6x on disk and 1.9x on CPU. If those three settings were the whole story, we’d be done. They aren’t.
Step 4: Batch indexing and the logsdb_columnar index mode
Batch indexing changes the path that a log line takes through Elasticsearch. Instead of processing each document on its own, it parses a whole bulk request once (with simdjson, tracking issue) and lays it out in column format for the columnar index mode. It’s tracked more broadly in the columnar adoption issue.
The new columnar index mode, logsdb_columnar, keeps doc values and drops most of the inverted index. Text fields still get one for full-text search, but keyword and numeric fields fall back to doc-value scans. That’s the tradeoff you’d expect when optimizing for logging and analytics instead of general-purpose search. (See the columnar docs and the index mode reference.)
Here’s the setting that turns it on:
PUT /columnar-logs-example
{
"settings": {
"mode": "logsdb_columnar"
}
}Figure 6: CPU cost per stored line, across the ladder.
On the same hardware, the columnar build averages 112k lines/s (104k–121k across 10 instances), 80 MiB per million lines, and 1.8 cores at 40k lines/s. In _disk_usage, the inverted index drops from 62 to 13.5 MiB per million lines and the points vanish; doc values (66 MiB) are now most of what’s left. Against the released build with all three changes, that’s about 1.7x the ingest rate and 45% less disk. Against the published configuration, it’s 2.2x the ingest rate and 70% less disk.
Here’s how that compares with the other systems in the original post. Elasticsearch figures are our means over all the identical instances that we ran; the others are VictoriaMetrics’s published numbers (medians of three runs):
| Published config (our rerun) | Released, all three changes | Columnar (snapshot build) | VictoriaLogs | Loki | Columnar behind VictoriaLogs by |
|---|---|---|---|---|---|---|
Ingest ceiling (k lines/s) | 52 | 67 | 112 | 120 | 139 | 1.1x |
Disk (MiB per million lines) | 263 | 146 | 80 | 56 | 101 | 1.4x |
CPU cores at 40k lines/s | 4.8 | 3.0 | 1.8 | 1.6 | 1.6 | 1.1x |
Put in terms of the six systems: using VictoriaMetrics's published figures for the other systems (which we didn’t rerun), the columnar build is ahead of ClickStack and OpenSearch on ingest rate, is level with ClickStack on disk, uses less than half its CPU, and is smaller than Loki’s published disk figure (80 against 101). It’s still behind Loki on ceiling, and it’s slightly behind VictoriaLogs. At 80k lines/s, a rate both sustain, the columnar build uses 4.6 cores against 4.2 published for VictoriaLogs.
Where the remaining 80 MiB per million log lines goes
The inverted index is the interesting part. Of the 66 MiB per million lines that we save going from the +license step (146, the closest step with a full field-level breakdown) to the columnar build (80), 49 MiB (74%) is the inverted index. Points are another 7, doc values are 7, and stored fields are 4:
Figure 7: Where the saving comes from, from the +license step to the columnar build.
The inverted index is what lets Elasticsearch find a word or a value without scanning, which is why it answers the original post’s “common word” query in 0.10 seconds. Most of the saving comes from dropping it. In the columnar index mode, keyword and numeric fields keep only their doc values, so a filter on one reads the column instead of looking the value up. (We look at queries later in this post.)
If the inverted index is most of the saving, what's the remainder? We took the _disk_usage breakdown of the columnar build and added up inverted index and doc values per field:
Figure 8: The columnar build’s 80 MiB per million lines, by field.
One thing stands out, with message and _id making up 42% of it. message is 22.9 MiB: 14.8 of doc values (the original text, which synthetic source needs to give you the line back) and 8.1 of terms. It’s the only full-text field in the dataset, and with _id, it’s the only field that still has an inverted index. _id is 10.4 MiB: 5.0 of doc values and 5.4 of terms. Together, they account for nearly all of the 13.5 MiB of inverted index that’s left.
Put together, the 80 MiB splits three ways:
MiB per million lines | Share | |
|---|---|---|
Values of the fields that the harness generates (doc values) | 58.3 | 73% |
Terms for | 8.1 | 10% |
Elasticsearch’s own per-document fields ( | 13.4 | 17% |
The first row is roughly what a column store needs. (A rough DEFLATE comparison on the same columns, computed with cmd/fieldstats in our fork, lands around 52 MiB; DEFLATE is a reference, not a floor.) So most of the difference from VictoriaLogs’s 56 comes from the bookkeeping around the data. Take away the message terms and the per-document fields, and you’d be at about 58.
You can’t simply delete those fields, though. A real index would still need some way to find a document by _id and to keep replicas in step, so 58 MiB isn’t reachable that way. And the benchmark’s logs are generated; their text fields come from word lists, and real log messages carry more information. But it tells us where to look.
That left a question we could test, so we ran a second round.
Does the inverted index explain the disk gap? A second round of runs
These runs use the same harness, stream, and hardware as the ladder, with the same ramp to 150k lines/s. Every instance has the trial license and the pipeline off, along with a 30 s refresh, so the only differences are the ones in the table:
Arm | What it is |
|---|---|
Released, all indexed | 9.5.5, the control (the same configuration as the last rung of the ladder) |
Released, fields not indexed | 9.5.5, every field the harness generates mapped |
Figure 9: Disk, ingest ceiling, and CPU for the released build with all generated fields not indexed, next to the released control and the columnar build.
Most of the saving is the inverted index, going by the “released, fields not indexed” arm. Not indexing all the generated fields takes the released build from 146 to 91.5 MiB per million lines, from 67k to 81k lines/s (+21%), and from 3.0 to 2.2 cores at 40k lines/s. That’s 54 of the 66 MiB between the released build and columnar (83%), 14k of the 45k lines/s ingest gap (31%), and about two-thirds of the CPU gap (0.8 of 1.2 cores). So the main reason the columnar mode is smaller is that it doesn’t build a term index for every field.
The index isn’t the whole story, though, especially for ingest rate. Columnar is still about 13% smaller than the released build with the same fields unindexed (80 against 91.5) and about 38% faster on ingest (112k against 81k), so the batch indexing path and the columnar doc-value layout also contribute. We built that “not indexed” arm to isolate the effect. Which fields you index in practice depends on what you search on.
A quick look at query performance in logsdb_columnar
Columnar’s disk and ingest gains come largely from dropping most of the inverted index, so it’s worth checking the cost on queries. We ran a small check on 60 million documents per node (the first 40 minutes of the ramp, which every instance sustained without dropping lines): caches cleared between runs, page cache left warm, and median of five repeats on two released and two columnar instances. It’s smaller than the original post’s test, which already showed Elasticsearch well ahead on common-word search.
Six of the queries are VictoriaMetrics’s own, copied unchanged from their harness:
Query | Released (secs) | Columnar (secs) |
|---|---|---|
100 most recent errors | 0.10 | 0.16 |
Errors per app | 0.12 | 0.25 |
Count of one app’s errors | 0.04 | 0.27 |
Count of a rare token | 0.004 | 0.005 |
Count of a common word | 0.14 | 0.16 |
Errors in one-minute buckets | 0.76 | 0.49 |
All six queries finish in a fraction of a second, either way. Three (the recent-errors lookup, the per-app aggregation, and the single app’s error count) get slower on columnar, each by less than a quarter of a second; the time-bucket aggregation gets faster, and the two full-text counts barely move. The percentages look big in a couple of cases, but the absolute times stay small; even the worst of the six adds about 230 ms, not something that a person or an automated client would notice. Dropping the inverted index on keyword fields, like app and level, is what saves the disk earlier in this post. It’s also what moves these numbers: a filter or lookup on one of those fields scans the column instead of reading an inverted index.
We also ran one query of our own, not from VictoriaMetrics. It’s an exact lookup of a single request_id. There’s nothing to scan but the field itself, so it pays the full price of not having an inverted index. It takes about 6.5 ms on the released build and about 1.7 seconds on columnar.
The index mapping parameter defaults to false in columnar mode but is still settable per field, so we tried it with just request_id mapped index: true, everything else unchanged. The lookup drops to a mean of about 9 ms. It costs 91 MiB per million lines against columnar’s 80, a 14% increase, and is still well under the released build’s 146. So if exact lookups like this matter for your workload, mapping just that one field is a reasonable tradeoff.
How much JVM heap Elasticsearch needs for log ingestion
The original post reports about 17 GiB of memory for Elasticsearch at 40k lines/s, and our instances sit at 17 GiB, too. Most of that is the heap that the node reserves by default (50% of RAM, 15.7 GiB here), which is sized for much more than ingest. To see what ingest alone needs, we ran columnar and released instances with a 4 GiB and a 2 GiB heap and sampled the JVM every 15 seconds:
Figure 10: Ingest ceiling and pod memory at 40k lines/s with the default, 4 GiB, and 2 GiB heaps.
Ingest rate was unchanged within the spread between instances, and pod memory (RSS) dropped from about 17 GiB to about 5 GiB with a 4 GiB heap and to about 3 GiB with a 2 GiB heap. The JVM samples show a small working set, no circuit-breaker trips, and no rejected writes, so a 2 GiB heap was enough for this workload.
We measured ingest only, so size the heap for your own mix of searches, aggregations, and shards. The JVM samples come from a single instance per arm.
What to change in your Elasticsearch logging configuration, and what's left
We wanted to know what was behind the ingest and storage gap that VictoriaMetrics reported and whether it could be closed. We found that it could, mostly. A chunk of it was configuration, and that chunk is worth knowing on its own: the license and the pipeline, along with how refresh interacts with a polling harness. The rest comes from how documents are indexed and laid out. The columnar build changes both. It roughly matches VictoriaLogs on ingest rate, within noise, but uses about 12% more CPU and about 1.4x the disk.
What’s left to close is mostly disk. Memory is primarily the heap reserved by default. On queries, the picture depends on how you search: counts and aggregations hold up or get faster, and exact lookups of a single value are where an index helps most.
The index mode is set per index, not for the whole cluster. Logs can go into logsdb_columnar for smaller storage and faster ingest. Data that you search by full text, exact value, or vector stays fully indexed, in the same cluster and behind the same APIs. That’s the point of the columnar work. One system stores each kind of data the way that suits it, instead of running a separate logging system beside your search engine.
If you’d like to reproduce any of this, the harness changes (new probe and mapping options, the heap setting, an example run config, and a script that records each instance’s settings and sizes after a run) are in our fork.
Thanks to the VictoriaMetrics team for publishing the harness and the results. It’s rare to be able to rerun someone else’s benchmark and get their numbers back, and it made this whole exercise possible.
The release and timing of any features or functionality described in this post remain at Elastic's sole discretion. Any features or functionality not currently available may not be delivered on time or at all.
How helpful was this content?




