Skip to content

Performance

The performance of a deployment depends on your data, your configuration and your queries. This page tells you what each cost depends on, which configuration keys change it, and how to measure it on your own data. It does not give benchmark results to compare with other systems.

TraceLake has two published targets for time. A new event becomes visible to queries in 7 minutes or less for 95 % of events, with the default configuration. A dataset with a TAIL hot source makes its newest events visible in 30 seconds or less for 95 % of them (below). All other numbers on this page are examples from specific measurements. They show the size and the direction of an effect. Do not use them as the numbers of your deployment.

Freshness

Freshness is the time from the arrival of an event at Kafka to the moment a query can return it. It is the sum of four stages:

Stage Configuration key Default
The WAL file rotates ingestion.wal.maxFileAgeMinutes 5 minutes
The file is uploaded 15 seconds allowed; the uploader looks for files every 5 seconds
The file is committed to the table ingestion.commitIntervalSeconds 20 seconds
The gateway sees the new snapshot queryGateway.snapshotPollIntervalSeconds 8 seconds

With the defaults, the time budgets of the four stages add up to 343 seconds (300 + 15 for the upload + 20 + 8). This is not an upper limit. Each pod changes the commit and poll intervals by a small amount, and the upload and the commit take time. In a recent measurement, the 95th percentile at the defaults was 331 seconds. A WAL file also rotates when it reaches ingestion.wal.maxFileSizeBytes, so a dataset with a high volume is fresher than a dataset with a low volume.

The lever is maxFileAgeMinutes, and it costs files. Examples from two measurements with an earlier ingestor. That ingestor examined the age of an idle file only every 30 seconds, so an idle file could rotate up to 30 seconds late. Compare the rows with each other, not with the 331 seconds above:

maxFileAgeMinutes Freshness, 95th percentile Files written in 3 hours by a low-volume dataset
5 382 s 37
2 173 s 89
1 102 s 175

Under continuous high load the key has almost no effect on the number of files, because each file reaches its maximum size before it reaches its maximum age.

More small files mean more work for the compactor and slower queries until the compactor has merged them. The compactor merges a partition on a backlog tick only when it has more small files than compaction.backlogFileThreshold. Below that number the files stay until the scheduled pass, and the scheduled pass does not merge them if their total size is below compaction.minFileSizeMb (the compactor page gives the full rule).

Measure it with tracelake_freshness_seconds. To find the slow stage, look at tracelake_ingestor_upload_latency_seconds, tracelake_catalog_commit_latency_seconds and tracelake_catalog_snapshot_age_seconds.

Azure account types. On Azure, an account with the hierarchical namespace writes more slowly than an account with a flat namespace. In one measurement, a commit took approximately 100 ms more. An upload took approximately the same time, because the network bandwidth limited it. At 25 MB/s, the ingest throughput was the same on the two account types. Freshness, measured on a dataset with a low volume, was 328 seconds (95th percentile) with the hierarchical namespace and 325 seconds without it. Use the same configuration for the two account types.

Freshness of the tail

A dataset with hotSource.type: TAIL gets its newest events from the tail service, which reads them from Kafka into memory. For these events the target is 30 seconds or less for 95 % of events, from the arrival at Kafka to a query that returns them. In one measurement, with two datasets at 3 000 and 6 000 events per second and a 15-minute window, 1000 events queried through the PostgreSQL wire were visible after 3 seconds or less, and no answer was degraded.

In the same measurement, each tail replica used:

While it runs While it reads Kafka at start
Time 34 seconds until ready
CPU 0.08 cores about 0.7 cores
Window (tracelake_tail_bytes) 0.65 GiB
Memory of the process 0.83 GiB at 16 minutes, and 1.03–1.42 GiB after one hour and about 1000 queries 1.27 GiB

After one hour, a replica uses about as much memory as while it reads Kafka at start. The queries do not cause this: a replica that answered no query used the same memory. The extra is freed memory that the allocator keeps. It increases in small steps, also when the window becomes smaller. In one run of 3.4 hours it did not increase after about 80 minutes (1.27 GiB at most), and then decreased to 1.13 GiB. In a run of 2 hours it still increased after 113 minutes. 1.42 GiB is the most that we measured. Watch the memory of the pod against its limit. Set tail.resources.limits.memory from the largest number. Measure on your data with tracelake_tail_bytes, tracelake_tail_replay_seconds and the memory of the pod.

Ingest

What it depends on

  • The size of the records and the number of columns. The ingestor decodes each record and maps it to columns.
  • The number of open WAL files. There is one open file for each combination of a Kafka partition and a value of the partition columns. A partition column with many values that occur at the same time multiplies the open files, up to ingestion.wal.maxOpenSegmentsPerPartition for each Kafka partition.
  • The WAL volume. The ingestor syncs each file to disk when it rotates, and deletes it after the commit. A slow volume slows both.
  • Your storage and your catalog. If uploads or commits are slow, files collect on the WAL volume, and at ingestion.wal.diskHighWatermarkPct the ingestor pauses its Kafka consumers.

How it scales

One dataset on one pod is one pipeline: one consumer, one decode thread, one WAL. Most of its work is serial, so more CPU cores do not make it much faster. To ingest more, add ingestor pods. Kafka gives each pod a share of the partitions, so the number of partitions of the topic is the limit.

Memory

Two things use memory for each open WAL file: the decoded records that wait for the next write (tracelake_ingestor_wal_buffered_bytes, limited by ingestion.wal.maxBufferedBytes) and the Parquet row group that is being written (tracelake_ingestor_wal_rowgroup_bytes, not limited).

The first gauge counts less than the real memory. In one measurement it showed 79 % to 92 % of the memory that the process used for that buffer, when columns read the fields. Thus a limit of 256 MiB is approximately 0.3 GiB of real memory. For a dataset without a schema, where all fields go to _unmapped, the gauge showed 37 % to 45 %, and the same limit is up to 0.7 GiB.

When the buffer is at its limit, the ingestor writes smaller batches, and each record costs more CPU. Example: 1.4 to 1.7 microseconds to bind each record in a batch of 1000 rows, and 4.1 to 4.3 microseconds in a batch of one row. The usual cause is a partition column with too many values.

The cost of a smaller maximum file size. Example from one measurement, with ingestion.wal.maxFileSizeBytes decreased from 64 MiB to 16 MiB:

  • approximately 3.4 times the number of data files;
  • approximately 2.4 times the number of storage writes for each MiB;
  • ingest of 40.7 to 46.8 MB/s from an offered 50 MB/s in that test setup, where the default gave 49.5 MB/s.

Two runs that should have given the same result were 15 % different, so do not read these numbers as exact.

Measure ingest with tracelake_ingestor_fetched_bytes_total, tracelake_ingestor_bytes_total, tracelake_ingestor_consumer_lag and tracelake_ingestor_wal_active_files.

Queries

The time of a query is mostly the time to read data files from your storage. Thus the important question is how many files, and how many row groups in them, the gateway must read.

What removes files before the scan

A filter on Is answered by Notes
A partition column, or a column with a narrow range of values in each file The column statistics in the table metadata No read of a data file or a sidecar. A time range on a date partition is the best case.
An identifier, with an equality or a list of values The bloom filter, if the column is in bloomFilterColumns The file must have a bloom-filter sidecar.
Text, with an equality or LIKE The full-text index, if the column is in tantivy.indexingColumns Only files that the compactor has merged have this index. An OR of these filters also uses the index, if each side is on a column in tantivy.indexingColumns.
Text, with a regular expression (PostgreSQL only: ~, ~*, regexp_like, regexp_match(…) IS NOT NULL) The full-text index, the same as LIKE The index uses the literal text that each match must contain. For example, ERR-[0-9]{4} uses ERR-.

What the gateway cannot prune

  • A range, a LIKE, a negation or a function on a bloom column. A bloom filter answers only "can this value be here".
  • A LIKE pattern with no literal part as long as ingestion.tantivy.ngramSize. The gateway then scans the file. The same applies to a regular expression. In a regular expression, a part that can repeat zero times, a character class, . and a letter under case-insensitive matching ((?i), ~*) are not literal text. ~* with only literal text becomes ILIKE, which the gateway does not prune.
  • A negated regular expression (!~, !~*, NOT regexp_like), the same as NOT LIKE.
  • A value longer than ingestion.tantivy.maxIndexedValueBytes in the column. The gateway scans the file for a filter on that column. A tantivy.substringOnlyColumns column is indexed whole, so this does not apply to it.
  • An OR in which one side cannot be answered by the same method as the other sides. A side that is an AND counts as answered if one of its parts can be answered. An OR that expands to more than 64 combinations is not pruned; the other filters of the query still prune.
  • A file with no sidecar. The gateway scans it. The result is correct, but the query is slower.

Configuration that changes query cost

Key Effect
partitionMapping Decides which files a time range or a partition filter can remove. This is the largest effect. A change later applies to new data only and cannot be undone; see the runbook.
sortColumns The compactor sorts each merged file by these columns. An equality lookup on a sorted column then reads a small part of the file.
compaction.rowGroupSize The gateway prunes by row group. Smaller row groups prune more precisely and make the file metadata larger.
compaction.targetSizeMb Larger files mean fewer files to open for a scan, and more temporary disk and memory in the compactor.
queryGateway.maxWorkerThreads The number of threads that all queries share (two pools of this size when heavyQueryBytes is set). With the default targetPartitions, more threads also split each heavy query into more parts, and point lookups became slower: see Point lookups beside heavy queries.
queryGateway.targetPartitions The number of parallel parts of one query (default: maxWorkerThreads). More parts help a scan of many files, and make short queries wait longer while it runs. Measure it with your queries.
queryGateway.heavyQueryBytes Queries that read at least this many bytes after pruning run on a second, lower-priority pool, so short queries do not wait behind them. See Point lookups beside heavy queries.
queryGateway.indexCache.maxBytes A sidecar or a data-file footer that is not in the cache is read from storage for each query. A footer grows with the number of columns and row groups; on our test table it was approximately 28 KB. A file that a query narrows to rows through its full-text index also keeps its page index here, approximately 1.4 MB per file on our test table. With bloom-filter sidecars of approximately 3 MB per file, set it to approximately 4.5 MB for each file that your queries read. Results stay correct below that, and queries cost more. In an example with 114 files at 64 MiB, a substring search received 12–16 % more bytes and sent 13–17 % more requests to storage, and an equality lookup that shared the cache received 360 MB instead of 9 MB. To see this, use tracelake_gateway_index_cache_footer_loads_total and the sidecar hit ratio.
queryGateway.manifestCache.maxBytes Table metadata that is not in the cache is read from storage for each query.
queryGateway.topkDynamicFilter For ORDER BY ... LIMIT, skips files, row groups and rows that cannot be in the result. On by default. Set it to false to measure its effect, or to turn it off if you suspect it. Not measured on a dataset with a hotSource.

ORDER BY a column LIMIT N. When the gateway has N candidate rows, it uses the worst of them as a threshold and skips the data that cannot be better. If the column is the dataset's timeColumn or one of its sortColumns, and is an integer, date, timestamp, boolean, decimal or floating-point column, the gateway uses the range of values in each file to skip whole files. For a floating-point column it uses only the files that record that they hold no NaN. TraceLake's own files record the count, and JSON payloads hold no NaN. It reads the files in the order of the smallest value in each file: the largest first for DESC, and the smallest first for ASC. For other columns, it skips row groups and rows, but it opens every file that the filter keeps.

A NaN sorts above all other floating-point values (below them if its sign bit is set), and files do not include NaN in their value ranges. The gateway gives the same rows that a full scan gives, for a filter such as v > 5 and for ORDER BY ... LIMIT. A file that holds a NaN in a floating-point column that the query reads, or that does not record its count of NaN, changes how the query prunes:

  • The gateway does not skip that file by the ranges of that column.
  • The gateway skips no row groups and no pages by value ranges in that query, for any column. This also applies to a filter on the time column, and to the pages of a sortColumns column.

TraceLake's own files record a count of zero, because a JSON payload cannot hold a NaN. Thus only files that other engines write can cause this. In one measurement over 175 million rows, a filter on a floating-point range took approximately 0.15 seconds in place of 0.05 seconds when the gateway did not skip row groups.

The gateway skips the most files when the ranges of the files do not overlap. Compaction gives this result for the first column of sortColumns, among the files of one merge. If the dataset is partitioned by timeColumn, files in different partitions also have ranges of timeColumn that do not overlap. The ranges use table metadata memory (queryGateway.manifestCache.maxBytes). A query that reads the column and has no filter holds approximately twice as much metadata for each file.

Example from one measurement over 339 million compacted rows in 106 files, on one laptop with local object storage. The query was a LIKE filter with ORDER BY event_start_time DESC LIMIT 500.

  • Matches in every hour. With the gateway's caches warm, the query took 3.7 seconds, against 29 to 30 seconds with topkDynamicFilter: false, and single runs varied from 3.2 to 4.5 seconds. The scan opened 13 of 121 file ranges.
  • Matches only in the oldest day. The scan must read most of the table in any case, so the setting can help little. After later changes to the gateway, on the same rows, with warm caches, the query took 7.6 seconds, against 9.2 seconds with topkDynamicFilter: false. The queries alternated between the two settings, which ran on two gateways at the same time.

When the gateway's caches were empty, the median query took 115 to 151 seconds. The gateway first read the full-text index of each of the 106 files, 65 GB in total, and most of those indexes could not answer the filter (idx_declines_total{reason="capped"}). That time counts against queryGateway.queryTimeoutSeconds. At the default of 30 seconds, these queries failed: 504 on HTTP, 57014 on PostgreSQL. Those indexes cut long values in tantivy.substringOnlyColumns columns. An index that holds such a column whole can answer the filter.

The gateway no longer reads each index in full. It reads the small parts of an index one time (about 4 % of it in this measurement; about 1.5 % since the compactor writes each index as one segment), and for each query only the lists of entries for the query's terms, which it then keeps on disk. On the same 106 files, with indexes that answer the filter and 64 rows in each index entry, input LIKE '%CONFLICT%' took 5.0 to 6.5 seconds with empty caches and 2.9 to 3.1 seconds warm. A search for a 20-character value that only 3 rows hold took 2.7 to 3.3 seconds and 0.16 seconds, over two to four runs each. Before, the same queries took 13.8 / 4.4 seconds and 9.8 / 1.1 seconds, because the gateway first read 9.9 GB of index. With empty caches, a query now reads about 0.5 GB of index. With 20 ms of added delay on each request to storage, as on a cloud store, the 3-row search took 3.8 to 4.1 seconds with empty caches and 0.4 to 0.9 seconds warm, against 11.8 and 1.2 seconds before. All of this is on one laptop.

A substring filter costs what the index cannot rule out, not what it returns. The substring index finds groups of 64 rows that could hold the string, and the gateway then reads and checks every row of those groups. It matches the string's pieces of ingestion.tantivy.ngramSize characters (3 by default), in the case the filter gives. On the same rows, all warm:

  • input LIKE '%ROAMING%' matched 70,019 rows. The gateway read 4.7 million rows, and the query took 2.7 seconds.
  • input LIKE '%accountholders%' matched 17,776 rows. The gateway read 1.2 million rows, and the query took 0.6 seconds.
  • input LIKE '%CONFLICT%' matched 128,932 rows. The gateway read 2.0 million rows, and the query took 0.6 seconds.

Case matters in the index. An earlier index that ignored case read 48 million rows for ROAMING (13 seconds) and 7.9 million for accountholders (5.5 seconds). The index that keeps case is 15 % larger. The time follows the part of the column that the query must decompress, so a common string costs more than its row count suggests. The gateway fetches only the pages that hold those groups: accountholders received 0.72 GB, less than a tenth of the column. A common string gains less, because the store's requests merge pages that are near each other: ROAMING received 9.1 GB, but it decompresses only the pages it selected. Added storage delay of 20 ms a request added 0.4 to 2.4 seconds to these times.

The ingestor and the compactor close a data page at 4,096 rows, or at the first write of about 1,000 rows that reaches 256 KiB, so 256 KiB is not a hard limit: the 500-byte values of input make pages of 1,024 rows. A smaller page costs less to decompress for one row, and it compresses less well. Compared with parquet's default of 1 MiB, on these rows, ROAMING took 2.7 seconds against 4.6 seconds, the data files took 7.5 % more storage, the page index grew from 1.2 MB to 1.4 MB for each file, and a scan with no full-text index took approximately 4.5 % longer.

The page layout is the same for every dataset, and there is no setting for it. We also measured it on EDR records and on VoLTE CDRs. On EDR rows only the 4,096-row limit closes a page. On VoLTE rows the 256 KiB limit cuts two columns of approximately 140 bytes, and 1 MiB made no difference. Pages of 8,192 rows made an indexed substring search that matches many rows and a sorted top-20 query 5 to 7 % faster and the page index 37 to 47 % smaller. But a selective substring search took 60 % longer, and a substring search on a file with no full-text index took 11 % longer. Point lookups did not change. Each workload runs both kinds of query, so a different layout for each dataset does not help.

New data is slower to query than old data. Files that the ingestor wrote and the compactor has not merged yet are smaller, are not sorted, and have no full-text index. A query on the last few minutes reads more files for the same number of rows.

Response compression costs CPU on the gateway. We measured four clients that each read 10,000-row pages of about 7.9 MB of JSON. Compared with an uncompressed response, the gateway used 10 % more CPU for each response with zstd (14.8 times smaller), 12 % more with gzip (6.6 times smaller) and 18 % more with br (10.6 times smaller). Throughput was 6 to 10 % lower, and the first rows arrived within approximately 10 ms of an uncompressed response. The gateway uses the fastest level of each method. On a slow network, the smaller body can make the response complete sooner.

Point lookups beside heavy queries

All queries on a gateway pod share its worker threads. A heavy query, for example an aggregation over the whole table, splits into targetPartitions parts, and each part keeps a thread busy. A few heavy queries can keep every thread busy, and a short query then waits for a free thread.

Example, measured on 2026-11-02 on our test table (339 million rows, 114 files, a 20-thread host, 16 threads), with 4 point lookups at a time while 4 aggregations ran:

Setting Point lookup P95 One aggregation alone (median) 4 aggregations at a time (median)
Default (targetPartitions = 16) 400 to 420 ms 1.35 s 4.1 s
targetPartitions: 8 280 to 310 ms 1.95 s 4.1 s
targetPartitions: 4 198 to 203 ms 2.9 s 5.4 s

Alone, the point lookup took approximately 60 ms (P95). More threads with the default targetPartitions made it worse, because each heavy query also split into more parts: with maxWorkerThreads: 32, 720 to 840 ms. Point lookups sent to a second gateway process on the same host, with its own threads, took 150 ms, and the aggregations took 6 to 12 % longer (P95, compared across separate runs).

If your dashboards run heavy queries beside interactive lookups, set queryGateway.heavyQueryBytes. A query that reads at least that many bytes after pruning then runs on a second pool of threads at a lower priority. When no short query runs, a heavy query still uses every core. When short queries run, they get the CPU first. Every interface (HTTP, MCP and PostgreSQL) uses it. Measured on 2026-11-03 on the same table and load, with heavyQueryBytes: 1073741824 (1 GiB):

Setting Point lookup P95 One aggregation alone (median) 4 aggregations at a time (median, P95)
Not set 393 to 419 ms 1.34 s 4.15 s, 4.4 s
heavyQueryBytes: 1073741824 135 to 143 ms 1.05 s 3.97 s, 5.1 s

The point lookups estimated approximately 64 to 256 MB and the aggregations approximately 15 GB, so the value had a margin of at least 4 times on both sides. The slowest aggregations took longer (P95 +13 to 16 %), because the point lookups ran 2.8 times faster and the host was full. To choose a value, read tracelake_gateway_query_class_bytes (see Metrics). targetPartitions is the other option: it also helps, but each heavy query is slower.

Measure queries with these metrics:

  • tracelake_gateway_query_duration_seconds: the total time.
  • tracelake_gateway_manifest_files_scanned and tracelake_gateway_files_scanned: the number of files after the first pruning pass, and the number that the scan opens. If the two numbers are almost equal, the sidecars do not help the query.
  • tracelake_gateway_prune_candidates_in_total and _out_total: what each pass keeps.
  • tracelake_gateway_sidecar_miss_total, tracelake_gateway_idx_declines_total and tracelake_gateway_bloom_unserved_total: why a pass could not prune.
  • tracelake_gateway_datafile_bytes_total: the bytes read from storage.

Gateway memory

What Limit Notes
The query engine queryGateway.memoryLimit No limit if you do not set it. On the HTTP interface the limit applies to each query, so the largest use is memoryLimit × maxInFlightHttpQueries. On the PostgreSQL interface all connections share one limit.
Scan memory queryGateway.targetPartitions (default maxWorkerThreads) × approximately 100 MiB, for each query This memory is not in memoryLimit. It holds the data that a scan reads and decodes. We measured approximately 80 MiB for each part of a scan, on rows of up to 17 MB. Larger rows use more. To use less memory, set fewer parts.
Table metadata queryGateway.manifestCache.maxBytes × (1 + maxInFlightHttpQueries + postgres.maxConnections) The cache, plus what each query in progress can hold. 8.5 GiB with the defaults and no PostgreSQL interface.
Sidecars and data-file footers queryGateway.indexCache.maxBytes
Response compression One encoder for each compressed query response: approximately 8.1 MiB for br, 1.3 MiB for zstd, 0.3 MiB for gzip This memory is not in memoryLimit. It does not grow with the size of the result. With maxInFlightHttpQueries 16, br responses use up to approximately 130 MiB. An error response, also a refused one (503), is compressed too, with approximately 8 KiB (br), 29 KiB (zstd) or 0.3 MiB (gzip) while it is sent.
Freed memory that the allocator keeps MALLOC_ARENA_MAX, which the chart sets to 16 on the gateway The system allocator (glibc) keeps freed memory in its arenas to use again. Its default is 8 arenas for each CPU of the node, not for the CPU limit of the pod. With 16 arenas we measured 0.35 to 0.55 GiB more heap than with 2 arenas at 4 concurrent queries on our test table: 2.1 to 2.4 GiB at the highest, against 1.6 to 1.8 GiB. With 2 arenas the threads of a query wait for the allocator: a point lookup used twice the CPU and took 54 ms instead of 35 ms (median). If you do not deploy with the chart, set this variable on the gateway.

The list of the manifests of a table always stays in memory. Example: approximately 250 bytes for each data file, which is approximately 300 MiB for a table of 1.2 million files. The number of files is thus a cost for the gateway, and compaction decreases it.

Compaction

Memory. The compactor keeps one input file, one merged file and that file's sidecars in memory at a time. It uploads each merged file when the file is full, so the memory does not grow with the size of the partition. If the dataset has sortColumns, add the sort buffer (384 MB of rows, up to about three times that while it sorts). The sorted runs that it then reads back together share the same 384 MB: the compactor reads back fewer runs at a time on a wide dataset (about 7 at 103 columns, 69 at 11). The 384 MB is for the runs only; the merged file being written and its sidecars come in addition. The full-text index of a merged file is in memory until its upload, and on a column with long text it can be much larger than the file (see below).

Orphan cleanup. Orphan cleanup keeps in memory the keys of all the files that the retained snapshots of a dataset refer to: approximately 125 bytes for each file, or 125 MB for one million files. It does not keep the list of the objects in storage. It examines each object when the list gets to it, and deletes an orphan and its sidecars before it examines the next object.

Temporary disk. Two things use the temporary volume of the pod during a merge:

Use Depends on Example from one measurement
Sorted runs, if the dataset has sortColumns The size of the partition after it is written again 362 MiB for a partition of 3.69 GB in 229 files
The full-text index that is being built One output file and the quantity of text in it 1.34 GiB for one output file of 128 MB

The full-text index of a column with long text can be much larger than the data. In one measurement it was 11 times the size. Put only columns that queries filter on in tantivy.indexingColumns. If a partition has more sorted runs than fit in memory at once, the compactor first merges them in groups, and while it does, the disk holds one group more. tracelake_compactor_ephemeral_peak_bytes shows the largest use of the most recent pass.

One compactor. The compactor runs as one pod. A second pod merges the same partitions again. To merge more at the same time, use manual runs on different datasets, date ranges or partition values.

Measure compaction with tracelake_compactor_duration_seconds, tracelake_compactor_partition_files_total and tracelake_compactor_sidecar_bytes.

Storage

  • Compression. compaction.compression and compaction.compressionLevel apply to all data files. A higher zstd level makes the files smaller and uses more CPU in the ingestor and the compactor.
  • The _unmapped column. A top-level field of the payload that a mapping reads only a part of (for example resource in resource.attributes."service.name"), or reads with a conversion (normalize), is stored complete in _unmapped, in addition to the column made from it. If most of your columns come from parts of a few large objects, you store those objects two times. If you do not need the fields that are not in a column, set unmappedColumn: false. Then the dataset has no _unmapped column (see Schema).
  • Sidecars. The ratio of the full-text index to the data is rate(tracelake_compactor_sidecar_bytes_sum{kind="idx"}) / rate(tracelake_compactor_sidecar_bytes_sum{kind="data"}).
  • Old files. A file that a merge replaced stays in your storage until snapshot expiry and orphan cleanup remove it. That is compaction.snapshotRetentionHours after the merge, plus the intervals of the two maintenance loops. For that period the merged data is stored two times.

Before you go to production

  1. Send a copy of your real traffic to a test deployment for a minimum of one day, so that the scheduled compaction pass runs at least one time.
  2. Look at the number of open WAL files and at the number of files in each partition. If either is high, change partitionMapping now. A change later applies to new data only.
  3. Run your real queries, on data of the last minutes and on data that is some days old. Look at the number of files that each query opens.
  4. Look at the memory of the ingestor, the gateway and the compactor at their highest, and at the temporary disk of the compactor. Set the limits of the pods from those numbers.
  5. Set the retention of the Kafka topic to the longest outage of your storage or your catalog that you want to survive without data loss.