Francisco Silva
06/23/2026, 1:48 PMRocky
06/23/2026, 1:48 PMmeta folder (located within the BE storage root, e.g., storage/meta) contains a RocksDB instance that stores tablet and rowset metadata. While there isn't a single universal formula (like a fixed percentage of data size), you can determine its footprint by looking at the specific metadata objects it tracks.
What is inside the BE meta folder?
The size of this folder is primarily driven by the number of objects, not the raw volume of data:
1. TabletMeta: Configuration for every tablet replica on that BE (tablet ID, schema version, state, etc.).
2. RowsetMeta: Metadata for every data version (rowset) currently active or pending deletion. This includes the file list, row counts, and segment checksums for each version.
Factors that influence the size
* Tablet Count: The most significant factor. If you have millions of tablets (due to over-partitioning or high bucket counts), the RocksDB overhead grows linearly.
* Ingestion Frequency: Each load creates a new RowsetMeta. If you perform small, frequent loads (e.g., every few seconds), the number of rowsets increases until compaction merges them.
* Compaction Delay: If compaction is lagging, the BE retains more "stale" Rowset versions in the meta-store, increasing the folder size.
* Primary Key Indexes: For Primary Key tables, some index metadata is managed here, though the heavy persistent index files are usually stored separately in the data directory.
How to estimate or inspect it
* No Concrete Formula: Because it's "per-object" rather than "per-byte," 100GB of data spread across 1,000 tablets will have a much smaller meta folder than 100GB spread across 100,000 tablets.
* Rule of Thumb: In a healthy cluster with "best practice" tablet sizes (1GB–10GB per tablet), the meta folder typically occupies a few hundred MBs to a few GBs. It rarely exceeds 10–20GB unless there is a "metadata explosion" (e.g., >500,000 tablets per BE).
* Inspection Tool: You can use the meta_tool utility provided in the BE bin directory to inspect the contents of the metadata store:
bash
./bin/meta_tool --operation=get_meta --root_path=/path/to/storage --tablet_id=<id>
* Monitoring: Track the tablet_metadata_mem_bytes metric to see the memory footprint of this metadata, which is usually proportional to the disk size of the meta folder.
If your meta folder is unexpectedly large, it is almost always a sign of over-bucketing (too many small tablets) or compaction issues (too many rowsets).
References
• administration/management/BE_configuration.md
• sql-reference/information_schema/be_tablets.md
• administration/management/monitoring/metrics.mdFrancisco Silva
06/23/2026, 1:52 PMRocky
06/23/2026, 1:52 PMinformation_schema (Easiest)
You can query the be_tablets table in the information_schema database. This table contains a NUM_ROWSET column for every tablet replica on every BE.
* Total rowsets across the whole cluster:
sql
SELECT SUM(NUM_ROWSET) FROM information_schema.be_tablets;
* Total rowsets per BE node:
sql
SELECT BE_ID, SUM(NUM_ROWSET)
FROM information_schema.be_tablets
GROUP BY BE_ID;
* Top tables with the most rowsets:
sql
SELECT TABLE_ID, SUM(NUM_ROWSET) as rowset_count
FROM information_schema.be_tablets
GROUP BY TABLE_ID
ORDER BY rowset_count DESC
LIMIT 10;
2. Using SHOW TABLET
If you want to see the rowset count for a specific table, you can use the SHOW TABLET command. In the output, the VersionCount column indicates the number of rowsets (versions) currently held by that tablet.
sql
SHOW TABLET FROM your_table_name;
3. Monitoring Metrics (Real-time)
Each BE exports metrics that you can view via Prometheus or by visiting the BE's web port (default 8040) at /metrics. Look for:
* starrocks_be_rowset_count_generated_and_in_use: The number of rowsets currently active.
* starrocks_be_unused_rowsets_count: Rowsets that have been marked for deletion but are not yet reclaimed by the system (waiting for the unused_rowset_monitor_interval).
Why this matters for your meta folder:
As mentioned previously, the meta folder size is heavily influenced by these rowsets. If SUM(NUM_ROWSET) is very high (e.g., hundreds of thousands or millions per BE), it indicates that either:
1. Compaction is lagging: The system isn't merging small rowsets into larger ones fast enough.
2. High-frequency ingestion: You are performing many small loads, creating a high volume of metadata objects.
References
• sql-reference/information_schema/be_tablets.md
• administration/management/monitoring/metrics.md
• sql-reference/sql-statements/table_bucket_part_index/SHOW_TABLET.md
References
• administration/management/monitoring/metrics.md
• administration/management/BE_configuration.mdFrancisco Silva
06/23/2026, 2:04 PMRocky
06/23/2026, 2:06 PMbufferflush.maxbytes: Increase this (default is 90MB) to create larger batches. Larger batches (e.g., 200MB–500MB) are more efficient for StarRocks.
* bufferflush.intervalms: Increase this (default is 300,000ms / 5 mins) if your data volume is low but you still want to ensure data is merged into fewer, larger transactions.
* <http://offset.flush.interval.ms|offset.flush.interval.ms>: (Kafka Connect setting) The connector triggers a flush when Kafka Connect commits offsets. If this is set too low (e.g., 10 seconds), it will override your bufferflush settings and force frequent small loads.
2. Enable Merge Commit (StarRocks 3.2+)
If you have many Kafka tasks or multiple connectors writing to the same table, enable Merge Commit. This allows the StarRocks BE to merge multiple small Stream Load requests into a single transaction.
* Set sink.properties.enable_merge_commit = true.
* Set sink.properties.merge_commit_interval_ms = 5000 (5 seconds).
_ _Note: This effectively reduces the number of rowsets/versions created, which directly helps keep the meta folder size down.*
3. Parallelism vs. Partitions
* tasks.max: This should generally be less than or equal to the number of partitions in your Kafka topic.
* Rule of Thumb: For high throughput, aim for 1 task per 1–2 StarRocks BE nodes, provided you have enough Kafka partitions. Over-parallelizing with too many tasks can lead to transaction conflicts and small files.
4. Data Format and Efficiency
* sink.properties.strip_outer_array: If your Kafka messages are JSON arrays, set this to true so StarRocks can parse the array into multiple rows in a single request.
* sink.properties.format: Use json (default) for flexibility, but if your data is very high volume and already delimited, csv is faster to parse.
* Compression: Set sink.properties.compression = gzip (or lz4) to reduce network bandwidth, though this increases CPU usage on the Kafka Connect worker.
5. Primary Key Table Optimizations
If loading into a Primary Key table:
* sink.properties.partial_update: Set to true if you only want to update specific columns.
* sink.properties.partial_update_mode:
* Use row (default) for small frequent updates.
* Use column if you are updating a small number of columns across a very large number of rows (significantly faster for wide tables).
6. BE-Side Optimizations
If you are pushing very large batches, you may need to adjust BE configurations (in be.conf):
* streaming_load_max_batch_size_mb: Increase this if you plan to send batches larger than 100MB.
* flush_thread_num_per_store: Increase this if the BE is struggling to write the incoming data to disk fast enough.
Example Optimization Config
json
{
"name": "sr-sink-connector",
"config": {
"connector.class": "com.starrocks.connector.kafka.StarRocksSinkConnector",
"tasks.max": "3",
"bufferflush.maxbytes": "209715200",
"bufferflush.intervalms": "60000",
"sink.properties.enable_merge_commit": "true",
"sink.properties.merge_commit_interval_ms": "5000",
"sink.properties.strip_outer_array": "true",
"sink.properties.compression": "gzip"
}
}
References
• loading/Kafka-connector-starrocks.md
• loading/Flink-connector-starrocks.md (for Merge Commit details)Rocky
06/23/2026, 2:06 PMFrancisco Silva
06/23/2026, 2:17 PMRocky
06/23/2026, 2:17 PMmeta folder is very small, typically between 100 MB and 300 MB.
In StarRocks, the meta folder contains a RocksDB instance that stores serialized metadata. Here is the breakdown of why the size is usually minimal for this volume:
1. Typical Metadata Footprint
* TabletMeta: Each tablet's metadata (schema, state, version history) usually takes 2 KB to 5 KB.
_ _1,000 tablets × 5 KB ≈ 5 MB.*
* RowsetMeta: Each rowset's metadata (segment file list, row counts, checksums) usually takes 1 KB to 2 KB.
_ _4,000 rowsets × 2 KB ≈ 8 MB.*
* RocksDB Overhead: RocksDB itself maintains Write-Ahead Logs (WAL), manifests, and internal indexes/filter blocks. Even for a tiny dataset, this overhead usually starts around 50 MB to 100 MB.
2. When would it be larger?
If your meta folder is significantly larger than ~300 MB for this count, check the following:
* Schema Complexity: If your tables have hundreds or thousands of columns, the TabletMeta size per tablet increases.
* Primary Key Tables: While the actual "Persistent Index" files (the heavy part) are stored in the data directory, some index-related metadata remains in the meta store.
* Stale Metadata: If there are many "unused" rowsets not yet cleaned up by the background garbage collection, they still occupy space in the meta store.
3. How to verify your specific usage
You can check the actual memory usage of this metadata (which correlates closely to disk size) using these metrics on the BE node (http://<be_ip>:8040/metrics):
* starrocks_be_tablet_metadata_mem_bytes
* starrocks_be_rowset_metadata_mem_bytes
Summary: For 1,000 tablets and 4,000 rowsets, the folder is essentially "empty" from a storage perspective. It only becomes a concern when you reach hundreds of thousands of tablets or rowsets, where the metadata can grow into the tens of gigabytes.
References
• administration/management/monitoring/metrics.md
• sql-reference/information_schema/be_tablets.md
• administration/management/BE_configuration.md
References
• deployment/plan_cluster.md
• administration/management/monitoring/metrics.md
• administration/management/BE_configuration.md
• faq/Others.md
• faq/Deploy_faq.md
• administration/management/FE_configuration.mdRocky
06/23/2026, 2:17 PMmeta folder is typically between 100 MB and 500 MB.
This is considered a very "light" metadata load for a StarRocks BE. In most production environments, the meta folder only starts to become a concern (exceeding 10 GB+) when the tablet count exceeds 100,000 or the rowset count per tablet is consistently high.
Estimated Breakdown
The size is determined by the RocksDB instance stored in that folder, which tracks two primary types of objects:
1. TabletMeta (~2 KB – 5 KB per tablet):
* Contains the schema, partition ID, tablet ID, and current state.
* Calculation: 1,000 tablets × 3 KB ≈ 3 MB.
2. RowsetMeta (~2 KB – 10 KB per rowset):
* Contains the list of segment files, row counts per segment, checksums, and zone map statistics. The size per rowset increases if a single rowset contains many small segment files.
* Calculation: 4,000 rowsets × 5 KB ≈ 20 MB.
3. RocksDB Overhead (The largest portion for small counts):
* RocksDB maintains Write-Ahead Logs (WAL), Manifest files, and SST (Static Sorted Table) files.
* Even with only 25 MB of raw metadata, RocksDB's internal structures, block caches, and "stale" versions of metadata (before compaction) usually result in a folder size of 100 MB to 300 MB.
Why your folder might be larger than this:
If you see a size significantly larger than 500 MB for this specific count, check the following:
* Compaction Lag: If rowsets are being created and deleted rapidly (high-frequency streaming), RocksDB might have a large volume of "stale" metadata that hasn't been merged or reclaimed by RocksDB's internal compaction.
* Primary Key Indexes: For Primary Key tables, while the persistent indexes are in the data folder, some auxiliary index metadata is managed via the BE's metadata service.
* Segment Count: If your 4,000 rowsets actually contain hundreds of thousands of segments (e.g., due to very small max_segment_size settings), the RowsetMeta for those rowsets will be much larger because it must store a path and checksum for every individual segment file.
How to verify the actual metadata size:
You can check the memory footprint of this metadata (which is usually a good proxy for the uncompressed disk size) via the BE metrics:
bash
curl http://<be_ip>:8040/metrics | grep rowset_metadata_mem_bytes
This metric shows the total bytes currently loaded into memory for rowset metadata.Francisco Silva
06/23/2026, 2:18 PMFrancisco Silva
06/23/2026, 2:18 PMRocky
06/23/2026, 2:18 PMtrash folder or is trapped in RocksDB's internal fragmentation. Even after a "full compaction" of your data, StarRocks does not immediately delete the old files from the disk for safety and recovery reasons.
Here is what is likely happening:
1. The trash Folder (Most Likely)
When StarRocks performs compaction, it creates new, merged rowsets and marks the old ones as "stale." These stale files are not deleted immediately; they are moved to a trash directory within your storage root.
* Default Retention: Files stay in the trash folder for 24 hours (controlled by trash_file_expire_time_sec in be.conf).
* Why: This allows the system to recover data if a compaction or a "drop" was accidental.
* Check: Look at ${storage_root_path}/trash. If it is large, you can either wait 24 hours or manually clear it if you are certain you don't need the old versions.
2. Persistent Index (Primary Key Tables)
If you are using the Primary Key model with enable_persistent_index = true, the index itself takes up disk space.
* Location: This is stored in a directory named persistent under your storage root, not inside the meta folder.
* Compaction behavior: Compacting data rowsets does not reduce the size of the Persistent Index. The index size is tied to the number of unique primary keys in your table, not the number of rowsets. If you have 20GB of data, a 5–10GB index is not unusual.
3. RocksDB Stale Metadata
The meta folder is a RocksDB instance. When you compact a table, the data files are merged, but the metadata (RowsetMeta) in the meta folder is only marked for deletion.
* unused_rowsets_count: Check this metric via the BE 8040/metrics port. If it is high, it means StarRocks is still holding onto the metadata for those old rowsets.
* Cleanup Interval: The background thread that cleans up this metadata runs every 30 seconds (unused_rowset_monitor_interval), but RocksDB itself might not reclaim the physical disk space until it performs its own internal compaction.
4. Segment Count & Zone Maps
If your 4,000 rowsets were created by many tiny loads, they might contain a massive number of Segments.
* Each segment's metadata (including Zone Maps for every column) is stored in the meta folder.
* If you have a wide table (many columns), the Zone Map metadata for 4,000 rowsets × 1,000 tablets can grow surprisingly large. However, 20GB still points more toward the trash folder or persistent index than raw metadata.
How to diagnose exactly where the space is:
Run du on your storage directory to see exactly which subfolder is consuming the 20GB:
bash
du -sh /path/to/starrocks/be/storage/*
* If data/ is large: Compaction is still running or hasn't triggered.
* If trash/ is large: This is normal; wait 24 hours for the expiration.
* If persistent/ is large: Your Primary Key index is the cause.
* If meta/ is actually 20GB: This indicates a massive buildup of stale RocksDB SST files or an extreme number of segments.
References
• administration/management/BE_configuration.md (See trash_file_expire_time_sec)
• administration/management/monitoring/metrics.md
• table_design/table_types/primary_key_table.md
References
• administration/management/monitoring/metrics.md
• administration/management/BE_configuration.md
• faq/Others.mdRocky
06/23/2026, 2:18 PMmeta folder (specifically inside the BE's local RocksDB instance), and they do impact the size estimation.
In a Primary Key table, every "write" (whether an UPDATE or a DELETE) generates a new DeleteVector to mark old rows as invalid. Here is how they contribute to the meta folder size:
1. Storage Location
Unlike the Persistent Index (which is stored in a separate persist/ directory), the DelVectors are serialized and stored directly in the BE's metadata RocksDB. This means your meta folder tracks not just the rowset versions, but also the bitmaps that tell StarRocks which rows in those rowsets are now "dead."
2. Size Impact (RoaringBitmaps)
StarRocks uses RoaringBitmaps for DelVectors. These are extremely space-efficient:
* Sparse deletions: If you only delete a few rows, the DelVector adds only a few bytes to the metadata.
* Dense deletions: If you delete millions of rows, the size grows but remains compressed.
* Version History: Because StarRocks is multi-versioned, the meta folder may temporarily store multiple versions of DelVectors for the same tablet until compaction merges them and the "GC" (Garbage Collection) process removes the old metadata.
3. Updated Estimation for Primary Key Tables
If your 4,000 rowsets belong to a Primary Key table with heavy updates/deletes:
* Standard Metadata (Rowsets/Tablets): ~50–100 MB.
* DeleteVectors: Adding ~50–200 MB (depending on how many rows are marked deleted across those 4,000 rowsets).
* Total Expected: Still likely within the 200 MB – 600 MB range for that specific count (1,000 tablets / 4,000 rowsets).
How to check specifically for DelVectors:
If you suspect DelVectors are causing the meta folder to bloat, check these BE metrics:
* update_del_vector_num: Total number of DelVectors currently being tracked.
* update_del_vector_bytes_total: The amount of memory these DelVectors are consuming (this is a very good indicator of their on-disk footprint).
Summary of Folder Locations:
* meta/: Rowset metadata, Tablet metadata, and DeleteVectors.
* persist/: The Primary Key Persistent Index (if enabled). This folder can be much larger than meta/ because it stores the mapping of every single key to its location.
* data/: The actual columnar data files (.bin or .v2 segments).
References
• table_design/table_types/primary_key_table.md
• administration/management/monitoring/metrics.md
• administration/management/BE_configuration.md
• faq/shared_data_faq.md
References
• table_design/table_types/primary_key_table.mdFrancisco Silva
06/23/2026, 2:21 PMRocky
06/23/2026, 2:22 PMstarrocks_be_update_del_vector_num on your monitoring page or when scraping the BE metrics endpoint, it is usually due to one of the following reasons:
1. The Metric Name varies by Source
The metric names are slightly different depending on whether you are looking at the raw BE endpoint or a Prometheus-prefixed system:
* Raw BE Endpoint (http://<be_ip>:8040/metrics): The metric is likely named update_del_vector_num (without the starrocks_be_ prefix).
* Prometheus/Grafana: If you are using the official StarRocks Grafana dashboard or a Prometheus exporter, it will typically be prefixed as starrocks_be_update_del_vector_num.
2. Primary Key Tables Only
DeleteVector metrics are only generated for Primary Key tables. If your cluster is only using Duplicate Key, Aggregate, or Unique Key tables, the DeleteVector cache is never used, and the BE may not export this metric at all until a Primary Key table is created and written to.
3. Metric Deprecation and Renaming
Depending on your StarRocks version, some older metric names have been deprecated or replaced. Check for these alternatives in your /metrics output:
* update_del_vector_num: (Current) Number of items in the DeleteVector cache.
* update_del_vector_bytes_total: (Current) Memory size of the DeleteVector cache.
* update_del_vector_deletes_new: (Current) Total count of new DeleteVectors generated.
* update_del_vector_dels_num: (Deprecated in newer versions).
* update_del_vector_deletes_total: (Deprecated in newer versions).
4. How to Verify Manually
The most reliable way to check if the metric exists on your specific version is to query the BE directly via `curl`:
bash
curl -s http://<be_ip>:8040/metrics | grep del_vector
If this returns nothing, it means no Primary Key operations have occurred since the BE started, or your version uses a different naming convention.
Why this matters for the meta folder:
If you are seeing a large meta folder but update_del_vector_num is low or zero, the bloat is likely coming from RowsetMeta (too many small versions/files) rather than DeleteVectors. In that case, you should focus on the Batching and Merge Commit optimizations mentioned earlier to reduce the number of rowset versions created.
References
• administration/management/monitoring/metrics.md
• table_design/table_types/primary_key_table.md
References
• administration/management/monitoring/metrics.mdFrancisco Silva
06/23/2026, 2:24 PMRocky
06/23/2026, 2:25 PMmeta folder will be higher than the "light" baseline, likely in the range of 400 MB to 1.2 GB.
While 40,000 sounds like a large number, StarRocks' use of RoaringBitmaps makes these vectors very compact on disk. However, because they are stored in RocksDB, they do increase the size of the metadata SST files and the Write-Ahead Log (WAL).
Why the size increases with 40k DelVectors:
1. Storage per Vector: Each DeleteVector (DelVector) is a compressed bitmap. For sparse deletes (common in Primary Key updates), a DelVector might only occupy a few hundred bytes to a few kilobytes.
_ _Rough Estimate*: 40,000 vectors × 5 KB (average compressed size + RocksDB key overhead) ≈ 200 MB of raw data.
2. RocksDB Write Amplification: RocksDB doesn't just store the "current" 200 MB. It keeps multiple levels of SST files and a WAL. In a high-write environment (which 40k DelVectors suggest), the meta folder often holds "stale" versions of these vectors until RocksDB's internal compaction merges them. This can easily double or triple the physical disk footprint compared to the raw data size.
3. Relationship to Rowsets: 40,000 DelVectors for 4,000 rowsets means you have roughly 10 DelVectors per rowset. This is typical for Primary Key tables where rowsets have multiple segments or where frequent small updates create many versioned bitmaps.
Is this size "Normal"?
Yes. A meta folder around 1 GB for this specific count is considered healthy and well within the performance limits of the BE. You only need to investigate if:
* The folder grows toward 10 GB+ (indicating a massive "metadata explosion" or failed compactions).
* The update_del_vector_num continues to climb indefinitely without stabilizing, which might suggest that old versions aren't being cleaned up by the Garbage Collection (GC) process.
How to get the exact size footprint:
To see exactly how much space those 40,000 vectors are taking in memory (which is usually a 1:1 or 2:1 proxy for their uncompressed disk size), check this metric on your BE:
bash
curl -s http://<be_ip>:8040/metrics | grep update_del_vector_bytes_total
* If the value is ~200MB: Your meta folder should be ~500MB-800MB.
* If the value is ~1GB: Your meta folder will likely be ~2GB-3GB.
Note: If you find the meta folder is unexpectedly large, check if you have a persist/ folder in the same storage root. In Primary Key tables, the Persistent Index (if enabled) lives in persist/ and is often significantly larger than the meta/ folder because it stores the mapping for every individual primary keys.
References
• table_design/table_types/primary_key_table.md
• administration/management/monitoring/metrics.md
References
• administration/management/monitoring/metrics.md
• administration/management/FE_configuration.md
• administration/management/BE_configuration.md
• release_notes/release-4.0.md
• faq/Others.md
• administration/management/resource_management/Memory_management.mdFrancisco Silva
06/23/2026, 2:26 PMRocky
06/23/2026, 2:26 PM226,311,496 bytes is approximately 215.8 MB.
This metric confirms that your DeleteVectors are taking up ~216 MB in the BE's memory cache. This is a very helpful data point for your meta folder size estimation. Here is what this tells us:
1. Memory vs. Disk (the meta folder)
The update_del_vector_bytes_total metric tracks the memory consumed by these bitmaps while they are active in the BE's cache.
* In Memory: These are RoaringBitmaps, which are already highly compressed.
* In the meta Folder: When these are flushed to the metadata RocksDB, they are serialized. Because RocksDB also applies its own block compression (like LZ4 or ZSTD) and has internal overhead (WAL logs, SST metadata), the physical size on disk in your meta folder will likely be close to or slightly higher than this 216 MB (often 1x to 1.5x).
2. Efficiency Check
With 40,000 DeleteVectors totaling 216 MB, your average DeleteVector size is about 5.4 KB.
* This is very lean. It indicates that your updates/deletes are likely well-distributed or that your rowsets aren't excessively fragmented.
* If this number were in the gigabytes, it would be a sign that you have too many "dead" rows being tracked, and you would need to trigger more aggressive Base Compaction to merge rowsets and "bake" those deletes into the data files, which would then remove the need for those specific DeleteVectors.
3. Final Footprint Prediction
Given your metrics:
* Rowset Metadata: ~50–100 MB (estimated for 4,000 rowsets).
* DeleteVectors: ~216 MB (actual memory usage).
* RocksDB Overhead: (WAL, Manifest, SST index blocks) ~50–100 MB.
* Total meta folder size: You should see roughly 350 MB – 500 MB on disk for this folder.
What to watch for:
If you see the update_del_vector_bytes_total climbing rapidly while your data volume stays the same, it means your compaction is falling behind. StarRocks only removes a DeleteVector once the rowset it refers to is fully merged into a new "Base" version.
To help the BE clean these up, you can ensure your be.conf allows for healthy compaction:
* `max_cumulative_compaction_num_singleton_deltas`: Increasing this can help merge rowsets faster.
* `tablet_max_versions`: Default is 1000; if a tablet hits this, it will stop accepting writes to force compaction.
References
• administration/management/monitoring/metrics.md
• table_design/table_types/primary_key_table.md
• administration/management/BE_configuration.md
References
• administration/management/monitoring/metrics.md
• table_design/table_types/primary_key_table.md
• administration/management/BE_configuration.md
• administration/management/FE_configuration.md
• release_notes/release-4.0.md
• faq/Others.md
• administration/management/resource_management/Memory_management.md
• faq/shared_data_faq.md
-faq)
-deprecated)
• using_starrocks/StarRocks_vector_search.md
• administration/management/resource_management/Resource_group.mdRocky
06/23/2026, 2:26 PMRocky
06/23/2026, 2:26 PMFrancisco Silva
06/23/2026, 2:28 PMRocky
06/23/2026, 2:28 PMmeta folder is currently around 25 GB to 30 GB. This is significantly larger than a standard deployment of 1,000 tablets and confirms that your Primary Key update workload is generating a massive amount of metadata churn.
Here is the breakdown of why your folder looks like this and what the specific files represent:
1. The 1.2 GB Write-Ahead Log (2851013.log)
The file 1.2G 2851013.log is the RocksDB WAL.
* Why it's huge: Every time you perform an update or delete on a Primary Key table, a new "DeleteVector" is written here before being flushed to an SST file.
* The Risk: If this file is consistently over 1GB, it suggests the BE is struggling to flush metadata to disk fast enough, or you have very large individual "transaction" batches.
2. Hundreds of 65 MB SST Files
You have approximately 350–400 files named *.sst at ~65MB each.
* What they are: These are the permanent storage files for your Rowset metadata and DeleteVectors.
* The Problem: 400 files × 65 MB = ~26 GB.
* Diagnosis: For only 4,000 rowsets, 26 GB of metadata is extremely high. This means each of your rowsets/tablets has a very long history of DeleteVectors being stored in RocksDB. Even if you only "track" 40k active vectors, the "stale" versions of those vectors are likely still sitting in these SST files waiting for RocksDB to perform a Compaction.
*3. The 2.5 GB of Operational Logs (LOG.old.*)*
You have several LOG.old files at ~257 MB each.
* These are just text files containing the internal status of the RocksDB engine.
* They don't affect performance, but they are taking up ~2.5 GB of space. You can safely delete the .old files if you need immediate disk space, or reduce rocksdb_max_log_file_size in be.conf.
4. The 724 MB "Mega" SST (2851014.sst)
This file is an outlier. RocksDB usually targets 64MB for StarRocks metadata. A 724MB SST usually indicates that a large amount of data was moved into a deeper Level of RocksDB during a compaction, or that you have a single tablet/rowset with a massive amount of associated metadata.
──────────
Recommended Actions
If this disk usage is a problem for you, you can tune how aggressively StarRocks cleans up this metadata:
1. Trigger Internal RocksDB Compaction:
The best way to shrink this folder is to let RocksDB merge these SST files. You can try to force this by restarting the BE, which triggers a flush and often a compaction cycle.
2. Reduce Metadata Log Retention:
In your be.conf, check if you can lower these (or add them if missing):
* rocksdb_max_log_file_size = 10485760 (10MB instead of 250MB)
* rocksdb_keep_log_file_num = 3 (Keep fewer old logs)
3. Check Update Frequency:
Are you doing many small "upserts" (e.g., 1 row at a time via Flink or Stream Load)?
* The Fix: Increase your batch size. 40,000 DeleteVectors is manageable, but if you are creating them every few seconds, the meta folder will never have time to shrink.
4. Persistent Index:
Verify if you are using the Persistent Index for your Primary Key tables. If the persist/ folder (next to meta/) is also huge, you should consider moving the index to a separate SSD or increasing the index_cache_size.
Summary: Your meta folder is bloated because of a high volume of metadata writes. While it isn't "broken," it indicates that your Primary Key tables are undergoing very frequent updates, leaving a large trail of versioned DeleteVectors in the RocksDB storage.
References
• administration/management/BE_configuration.md
• table_design/table_types/primary_key_table.md
• administration/management/monitoring/metrics.mdFrancisco Silva
06/23/2026, 2:29 PMRocky
06/23/2026, 2:30 PMmeta folder size (~25 GB) is extremely high for 1,000 tablets and 4,000 rowsets. In a typical StarRocks deployment, that metadata should be under 1 GB.
The reason your "manual compaction" didn't help is that you likely ran Tablet Compaction (merging data files), which actually adds more metadata entries to the meta folder. To shrink the meta folder itself, you need RocksDB Metadata GC and RocksDB Internal Compaction.
Here is why your folder is 25 GB and how to address it:
1. Understanding the Bloat
The meta folder is a RocksDB database. Every time you update a Primary Key or compact a rowset, StarRocks writes new metadata (Rowset info and DeleteVectors) to this database.
* Active Metadata: Your active DeleteVectors only take 216 MB in memory.
* Stale Metadata: The remaining ~24 GB on disk consists of "stale" metadata—old versions of rowsets and DeleteVectors that have been superseded but haven't been purged from the RocksDB files yet.
2. Why Manual Data Compaction Didn't Help
When you run a manual tablet compaction:
1. StarRocks merges small rowsets into a big one.
2. It creates new metadata for the big rowset.
3. It marks the old rowset metadata as "stale" in RocksDB.
4. Crucially: The space is only reclaimed when RocksDB's internal background threads decide to merge those .sst files and physically drop the deleted keys.
3. How to Force Metadata Cleanup
A. Check if the Garbage Collector (GC) is running
StarRocks has background threads that scan for stale rowsets. Check these parameters in your be.conf (or via http://<be_ip>:8040/configs):
* `unused_rowset_monitor_interval`: (Default 30s) Cleans expired rowsets.
* `tablet_rowset_stale_sweep_time_sec`: (Default 1800s / 30m) How long to keep a rowset after it's been compacted.
* Action: If you have a massive backlog, you can temporarily lower tablet_rowset_stale_sweep_time_sec to 300 (5 minutes) to speed up the marking of stale metadata.
B. The 1.2 GB WAL File (2851013.log)
The presence of a 1.2 GB .log file inside meta/ is a red flag. This is the RocksDB Write-Ahead Log. It means the metadata is being written faster than RocksDB can flush it to SST files.
* Action: Restart the BE. A clean shutdown/restart forces RocksDB to flush the WAL and usually triggers a compaction of the .sst files, which should significantly reduce the folder size.
C. Shrink the RocksDB Operational Logs
You have over 2 GB of LOG.old files. These are just text logs of RocksDB's internal operations.
* Action: You can safely rm LOG.old.* to reclaim a few GBs immediately.
* Action: To prevent this in the future, set rocksdb_max_log_file_size = 10485760 (10MB) and rocksdb_keep_log_file_num = 3 in be.conf.
4. What to Check in the Logs
If a restart doesn't shrink the folder, search your be.log for:
* RocksDB errors.
* `storage_flood_stage`: If your disk is >90% full, StarRocks may stop background cleanup/compaction tasks to prevent a crash.
* `failed to gc tablet`: This indicates the metadata GC is failing for specific tablets.
Summary Recommendation
1. *Delete the LOG.old.* files* in the meta folder.
2. Restart the BE. This is the most effective way to force RocksDB to flush the 1.2GB WAL and reorganize the 350+ SST files.
3. Check for Disk Full: Ensure the disk where /opt/starrocks/data lives has at least 15-20% free space. If it's too full, background cleanup will stall.
References
• administration/management/BE_configuration.md
• table_design/table_types/primary_key_table.md
• administration/management/monitoring/metrics.mdRocky
06/23/2026, 2:30 PMRocky
06/23/2026, 2:30 PMFrancisco Silva
06/23/2026, 2:31 PM.sst files and physically drop the deleted keys. - how can I speed that up since its clearly not working properly?Rocky
06/23/2026, 2:31 PMmeta folder, you need to focus on two different layers: Metadata Expiration (marking keys as deleted) and RocksDB Compaction (physically removing them from disk).
The reason your manual data compaction didn't help is that it only merges data files; it doesn't tell the internal metadata database to drop the "stale" records immediately.
Here are the specific configurations to speed this up:
1. Speed up Metadata Expiration
By default, StarRocks keeps metadata for old rowsets for 30 minutes (1800s) after they are compacted. In a high-update Primary Key environment, this builds up a massive backlog of "stale" entries in RocksDB.
Add/Update these in your be.conf and restart the BE:
properties
# How long to keep stale rowset metadata (Default: 1800)
# Reducing this to 5 minutes (300) or 1 minute (60) forces SR to mark metadata as "deleted" sooner.
tablet_rowset_stale_sweep_time_sec = 60
# How often to check for stale metadata (Default: 30)
unused_rowset_monitor_interval = 10
2. Force RocksDB to Flush and Compact
The 1.2 GB .log file in your meta folder is the RocksDB Write-Ahead Log (WAL). Its size indicates that RocksDB is waiting for a large buffer to fill before it flushes metadata to the .sst files.
To force this process:
1. Restart the BE: This is the most reliable way to force a metadata flush and trigger an initial compaction.
2. Limit WAL size: To prevent the WAL from growing to 1.2 GB again, you can add this to `be.conf`:
properties
# Limit the total size of the metadata WAL (in bytes).
# This example limits it to ~256MB.
rocksdb_max_total_wal_size = 268435456
3. Immediate Disk Cleanup (Safe)
Your du output shows over 2 GB of old operational logs (LOG.old.*). These are strictly for debugging and serve no functional purpose for the database.
* Action: rm /opt/starrocks/data/meta/LOG.old.*
* Prevention: Add these to be.conf to keep them small:
properties
rocksdb_max_log_file_size = 10485760
rocksdb_keep_log_file_num = 3
4. Why "Internal Compaction" might be stalled
If you have already restarted and the folder is still 25 GB, check your <http://be.INFO|be.INFO> log for these keywords:
* "disk capacity limit": If your disk is >90% full, the BE will enter a "flood stage" where it pauses background cleanup to avoid accidental data loss. You must have free space for compaction to work.
* "too many open files": RocksDB needs many file descriptors to merge those 350+ SST files. Ensure your ulimit -n is at least 65535 (preferably 1024000).
Summary Checklist
1. rm LOG.old.* (Instant ~2GB back).
2. Set tablet_rowset_stale_sweep_time_sec = 60 in be.conf.
3. Restart the BE.
4. Monitor the meta folder; you should see the number of .sst files decrease as RocksDB merges them.
References
• administration/management/BE_configuration.md
• administration/management/resource_management/Memory_management.md
• table_design/table_types/primary_key_table.md
• administration/Monitoring.md
References
• administration/management/monitoring/metrics.md
• administration/management/monitoring/Monitor_and_Alert.mdFrancisco Silva
06/23/2026, 2:38 PMRocky
06/23/2026, 2:38 PMmeta folder. Each Stream Load creates a new rowset; if you load 10 rows every second, you create 86,400 rowsets a day, which overwhelms the metadata storage (RocksDB).
1. Kafka Connector Settings (Batching)
Increase these settings in your Kafka Connector configuration to reduce the number of transactions:
Parameter | Recommended Value | Why?
bufferflush.intervalms | 15000 to 30,000 (15-30s) | Prevents the connector from committing every 1 second. Higher values significantly reduce metadata churn.
bufferflush.maxbytes | 268435456 (256 MB) | Increases the amount of data buffered in memory before a flush. Larger files are much easier for StarRocks to compact.
tasks.max | Number of CPU cores | Don't over-parallelize. Too many tasks writing to the same tablets simultaneously causes version contention.
2. Table Property: Persistent Index
If you are using Primary Key tables, ensure the Persistent Index is enabled. This offloads the primary key index from memory to disk, preventing BE crashes during high-frequency updates.
sql
-- Check if enabled
SHOW CREATE TABLE your_table;
-- If not enabled, you must re-create the table or check if your version supports
-- ALTER TABLE (SR 3.x+ supports persistent_index by default on new PK tables)
PROPERTIES (
"enable_persistent_index" = "true"
);
3. BE Configuration (Compaction & Versions)
If you cannot reduce the write frequency and are getting "too many versions" errors, adjust these in `be.conf`:
* tablet_max_versions = 2000: (Default 1000) Increases the threshold before StarRocks rejects writes due to a backlog of uncompacted rowsets.
* update_compaction_num_threads_per_disk = 2: (Default 1) Increases the speed at which Primary Key updates are compacted.
* update_compaction_per_tablet_min_interval_seconds = 60: (Default 120) Allows the system to compact the same tablet more frequently to keep up with the write stream.
4. Memory Management for PK Tables
Since your metadata folder is already under pressure, you can limit how much memory the index uses to prevent it from competing with the RocksDB flush:
* l0_max_mem_usage = 104857600 (100MB): Limits the memory for Level 0 of the persistent index.
* tablet_rowset_stale_sweep_time_sec = 300: (Set this to 5 minutes as discussed previously) This ensures that once the Kafka Connector flushes data and StarRocks compacts it, the old metadata is deleted from the meta folder quickly.
Summary Strategy: Reduce the frequency of writes by increasing the buffer size/time in the Kafka Connector. This results in fewer, larger SST files in your meta folder and much better system stability.
References
• loading/Kafka-connector-starrocks.md
• best_practices/primarykey_table.md
• table_design/table_types/primary_key_table.md
• loading/Flink-connector-starrocks.md
References
• best_practices/primarykey_table.md
• table_design/table_types/primary_key_table.mdFrancisco Silva
06/23/2026, 4:11 PMdefault_job_flag=true} | query statistic job failed due to too many failed tasks: 1/17, the last failure is java.lang.RuntimeException: execute statistics query failed, sql: SELECT cast(9 as INT), cast(412Rocky
06/23/2026, 4:15 PMSELECT cast(9 as INT)... you see) to calculate data distribution for the Cost-Based Optimizer (CBO).
In your environment:
1. Too many versions: With 4,000 rowsets/versions, the background queries used to collect statistics are likely timing out or hitting the version limit (tablet_max_versions).
2. Metadata Stress: Since your meta folder is 25 GB and RocksDB is struggling to compact, these statistics queries (which require reading metadata) are failing repeatedly.
3. Task Threshold: StarRocks stops trying to collect statistics for a specific table if it fails too many times (the 1/17 in your error) to avoid wasting system resources.
How to diagnose
Run the following command to see the exact reason for the failure:
sql
SHOW ANALYZE JOB;
-- Look at the 'Reason' column for the failed jobs.
Immediate Mitigation
Since your system is currently overwhelmed by metadata, you should temporarily disable automatic statistics collection. This will stop the failing background queries and reduce the load on your FE and BE.
1. Disable automatic collection:
sql
ADMIN SET FRONTEND CONFIG ("enable_statistic_collect" = "false");
2. Stop current/pending analyze tasks:
sql
DROP ALL ANALYZE JOB;
Long-term Solution
Once you have resolved the metadata bloat (by following the steps in the previous messages: restarting BE, adjusting Kafka batching, and lowering tablet_rowset_stale_sweep_time_sec), you can re-enable statistics.
If you want to keep statistics enabled but make them less aggressive for your high-write environment, you can adjust these FE configurations:
* `statistic_collect_interval_sec`: Increase this (e.g., to 3600 for 1 hour) so it checks for updates less frequently.
* `statistic_collect_too_many_version_sleep`: (Default 10 mins) This is how long the collector waits if it detects too many rowsets.
Recommendation: Keep statistics disabled until your meta folder is under 2GB and your rowset count per tablet is back to a healthy level (typically < 50-100).
References
• using_starrocks/Cost_based_optimizer.md
• faq/Sql_faq.md
• administration/management/FE_configuration.md
• using_starrocks/query_feedback.md
References
• using_starrocks/Cost_based_optimizer.md
• faq/Sql_faq.md
• administration/management/monitoring/alert.md
• administration/management/monitoring/Monitor_and_Alert.md
• administration/management/monitoring/metrics.md
• using_starrocks/query_feedback.md
• faq/operation_maintenance_faq.md
• faq/loading/Routine_load_faq.md
• faq/Sql_faq.md
• faq/Sql_faq.md
• using_starrocks/Cost_based_optimizer.md
• administration/management/FE_configuration.mdRocky
06/23/2026, 4:15 PMRocky
06/23/2026, 4:15 PMRocky
06/23/2026, 4:15 PMRocky
06/23/2026, 4:15 PMRocky
06/23/2026, 4:15 PMRocky
06/23/2026, 4:15 PMRocky
06/23/2026, 4:15 PMRocky
06/23/2026, 4:15 PMRocky
06/23/2026, 4:15 PMFrancisco Silva
06/24/2026, 8:42 AMRocky
06/24/2026, 8:46 AMstarrocks_be_disks_data_used_capacity | The actual physical bytes of data stored on each BE disk (includes all replicas).
starrocks_be_disk_used | Total used capacity of the disks (includes logs and other system files).
starrocks_be_disks_total_capacity | The total size of the disks configured for data.
starrocks_be_disks_avail_capacity | Remaining free space on the data disks.
Pro-tip: Monitor starrocks_be_disks_data_used_capacity over time to see your data growth rate. If you see this increasing rapidly while your actual row counts aren't, it indicates a backlog in compaction or high metadata overhead (common in Primary Key tables).
──────────
2. SQL Commands (For Manual Inspection)
If you want to check the size of specific databases or tables within StarRocks, use these commands:
* View size of all tables in the current DB:
sql
SHOW DATA;
This returns TableName, Size (Total of all replicas), and ReplicaCount.
* View size and row count for a specific table:
sql
SHOW DATA FROM database_name.table_name;
This provides a breakdown by index/materialized view, showing the Size and RowCount.
* Check partition-level data size:
sql
SHOW PARTITIONS FROM table_name;
This is useful for identifying which specific time ranges or partitions are consuming the most space.
──────────
3. System Tables (For Custom Queries)
For more advanced analysis (e.g., finding the top 10 largest tables across the whole cluster), you can query the information_schema.
* Query all partitions and their sizes:
sql
SELECT
db_name,
table_name,
partition_name,
data_size,
row_count
FROM information_schema.partitions_meta
ORDER BY data_size DESC;
Important Distinction: Logical vs. Physical Size
* Logical Size: The amount of data unique to your table (what you see in SHOW DATA for a specific index).
* Physical Size: The space actually occupied on disk, which is roughly Logical Size × Replication Num.
* Metadata Size: In Primary Key tables, your meta folder (RocksDB) adds extra overhead. This is tracked by the disk-level metrics (disks_data_used_capacity) but is not included in the Size column of SHOW DATA.
References
• administration/management/monitoring/metrics.md
• sql-reference/sql-statements/Database/SHOW_DATA.md
• faq/Sql_faq.md
• knowledge/admin_and_operation/shared_data_compaction.md
References
• administration/management/monitoring/metrics.md
• sql-reference/sql-statements/Database/SHOW_DATA.md
• faq/Sql_faq.md
• knowledge/admin_and_operation/shared_data_compaction.md
• administration/management/monitoring/Monitor_and_Alert.md
• administration/management/monitoring/metrics.mdRocky
06/24/2026, 8:46 AMRocky
06/24/2026, 8:46 AMRocky
06/24/2026, 8:46 AMRocky
06/24/2026, 8:46 AMRocky
06/24/2026, 8:46 AMRocky
06/24/2026, 8:46 AMRocky
06/24/2026, 8:46 AMRocky
06/24/2026, 8:46 AMRocky
06/24/2026, 8:46 AMFrancisco Silva
06/24/2026, 9:06 AM*** Aborted at 1782239255 (unix time) try "date -d @1782239255" if you are using GNU date ***
PC: @ 0x8d244e7 starrocks::BinaryColumnBase<unsigned int>::append(starrocks::Column const&, unsigned long, unsigned long)
*** SIGSEGV (@0x0) received by PID 7 (TID 0x1543f8738640) LWP(612) from PID 0; stack trace: ***
@ 0x15449e7fdee8 (/usr/lib/x86_64-linux-gnu/libc.so.6+0x99ee7)
@ 0x11fd1428 google::(anonymous namespace)::FailureSignalHandler(int, siginfo_t*, void*)
@ 0x15449e7a6520 (/usr/lib/x86_64-linux-gnu/libc.so.6+0x4251f)
@ 0x8d244e7 starrocks::BinaryColumnBase<unsigned int>::append(starrocks::Column const&, unsigned long, unsigned long)
@ 0x8dc9e95 starrocks::Chunk::append(starrocks::Chunk const&, unsigned long, unsigned long)
@ 0xd8e211f starrocks::ChunkPipelineAccumulator::push(std::shared_ptr<starrocks::Chunk> const&)
@ 0xc7a229f starrocks::pipeline::ChunkAccumulateOperator::push_chunk(starrocks::RuntimeState*, std::shared_ptr<starrocks::Chunk> const&)
@ 0xb077762 starrocks::pipeline::PipelineDriver::process(starrocks::RuntimeState*, int)
@ 0xc30ca0e starrocks::pipeline::GlobalDriverExecutor::_worker_thread()
@ 0xe44d75e starrocks::ThreadPool::dispatch_thread()
@ 0xe444135 starrocks::thread::supervise_thread(void*)
@ 0x15449e7f8ac3 (/usr/lib/x86_64-linux-gnu/libc.so.6+0x94ac2)
@ 0x15449e889a84 clone
[1782239257.441][thread: 23381675312704] je_mallctl execute purge success
[1782239257.441][thread: 23381675312704] je_mallctl execute dontdump success
start time: Wed Jun 24 08:46:07 UTC 2026, server uptime: 08:46:07 up 11 days, 16:58, 0 users, load average: 0.26, 0.07, 0.02
Run with JEMALLOC_CONF: 'percpu_arena:percpu,oversize_threshold:0,muzzy_decay_ms:5000,dirty_decay_ms:5000,metadata_thp:auto,background_thread:true,prof:true,prof_active:false'Rocky
06/24/2026, 9:06 AMSIGSEGV (@0x0) indicates a Null Pointer Dereference. The BE tried to access a memory address that didn't exist (address 0x0).
Looking at the stack trace:
1. starrocks::BinaryColumnBase...::append: This is where the crash occurred. It was trying to append data to a binary column (typically a VARCHAR, STRING, or JSON type).
2. starrocks::ChunkPipelineAccumulator::push: This indicates the error happened within the Pipeline Execution Engine while it was buffering or "accumulating" data chunks.
3. Context: This usually happens during a Query or a Load (like your Kafka Stream Load) when the system is processing string-heavy data.
Why did it happen now?
Given the context of your previous messages (high-frequency writes, $4,000+$ versions, and a $25\text{ GB}$ metadata folder), this crash is likely caused by resource exhaustion or metadata corruption:
1. Memory Fragmentation/Pressure: With thousands of versions and constant writes, the memory allocator (jemalloc, seen in your log) can become heavily fragmented. If an allocation for a large string column fails or returns an invalid pointer under extreme stress, the append function will crash.
2. Version Overload: The ChunkAccumulateOperator is responsible for batching data. If it's trying to process data from a table with a massive number of uncompacted versions, the internal structures can become overwhelmed.
3. Potential Bug: There are known issues in older StarRocks versions related to BinaryColumn appending when handling specific null/empty string patterns.
Recommended Actions
1. Check the StarRocks Version:
Run SELECT current_version();. If you are on an older version (e.g., below 3.1.12 or 3.2.4), this might be a known bug related to string handling that has since been patched.
2. Check <http://be.INFO|be.INFO> logs:
Look at the <http://be.INFO|be.INFO> log file immediately before the timestamp 1782239255. Search for "Memory Limit Exceeded" or "Precondition failed." Often, a crash like this is preceded by a warning that the BE is running dangerously low on memory.
3. Emergency Recovery:
* Restart the BE: It should restart automatically if managed by a process supervisor (like systemd or Kubernetes).
* Throttle Kafka: Immediately reduce the write frequency of your Kafka connector (as discussed: increase bufferflush.intervalms to 30s). The BE is crashing because it cannot handle the current metadata/write load.
* Disable Statistics: Ensure you have run ADMIN SET FRONTEND CONFIG ("enable_statistic_collect" = "false"); to prevent background analytic queries from triggering more crashes while the system is unstable.
4. Increase Memory Reserve:
If your BE has enough physical RAM, consider increasing the mem_limit in be.conf or ensuring that system_mem_limit_threshold is not being hit, which causes aggressive and sometimes unstable memory reclaiming.
Summary: Your BE crashed because it's under extreme stress from the metadata bloat and high-frequency writes you identified earlier. Solving the "too many versions" and "large meta folder" issues is the only way to stop these crashes like we discussed is the only way to stop these crashes like this will stop.
References
• faq/operation_maintenance_faq.md
• administration/management/BE_configuration.md
• faq/Sql_faq.md
• administration/management/monitoring/Monitor_and_Alert.mdFrancisco Silva
06/24/2026, 9:10 AMRocky
06/24/2026, 9:10 AMquery_mem_limit: If a query exceeds its allocated memory (default is often $0$, meaning it uses the BE's soft limit), StarRocks should return a Memory Exceed Limit error to the user.
* Query Queues: If the node is under high CPU or Memory pressure, new queries are queued rather than executed to prevent overload.
* BE mem_limit: When the total BE process hits its limit (default $90\%$ of RAM), it starts aggressively canceling the most memory-intensive queries to save the process.
2. Why your node crashed instead (The SIGSEGV)
The log SIGSEGV (@0x0) means the process tried to access memory address 0, which is always invalid. This is a Null Pointer Dereference.
Looking at your stack trace:
* BinaryColumnBase<unsigned int>::append: This function is responsible for adding string, JSON, or binary data to a column in memory.
* The Cause: This specific crash is usually a bug where the code assumes a data block or a pointer is valid, but under extreme conditions (like your $4,000+$ versions and metadata bloat), an internal state becomes inconsistent or a memory allocation fails silently, leading to the null pointer.
3. Known Issues
This specific stack trace (BinaryColumnBase::append inside ChunkPipelineAccumulator) is associated with several bugs fixed in recent versions:
* Incompatible Schemas: A fix in v3.4.9 addresses a crash in ChunkAccumulator when chunks with incompatible JSON schemas are appended.
* Large String Spilling: Issues where processing very large strings during high memory pressure caused crashes.
* Race Conditions: Under the heavy load you've described (high-frequency Kafka writes), race conditions between background compaction and active queries can sometimes trigger these logic errors.
What to do now
1. Upgrade: If you are on a version older than 3.1.13, 3.2.9, or 3.3.4, this is likely a known bug. Upgrading to the latest maintenance release of your major version is the best fix.
2. Verify Limits: Check your <http://be.INFO|be.INFO> log just before the crash. If you see large memory alloc or Memory Exceed Limit warnings, the system tried to protect itself but hit a "corner case" bug during the cleanup.
3. Address the Root Stress: As discussed previously, the metadata bloat (25GB meta folder) is putting the BE in an "untested" state of extreme stress. Most of these bugs only appear when the system is struggling to manage thousands of rowsets and versions. Reducing your write frequency is the most effective way to stop the crashes immediately.
Rocky's Verdict: You found a bug that was triggered by the extreme stress on your cluster. StarRocks intended to manage the resource usage, but the logic failed due to the specific state of your metadata.
References
• administration/management/resource_management/query_queues.md
• administration/management/BE_configuration.md
• release_notes/release-3.4.md
• faq/Sql_faq.md
References
• release_notes/release-3.4.md
• faq/Sql_faq.md
• release_notes/release-3.0.md
• release_notes/release-4.0.mdFrancisco Silva
06/24/2026, 9:19 AMRocky
06/24/2026, 9:19 AMSIGSEGV (@0x0) in starrocks::BinaryColumnBase<unsigned int>::append during a push to the ChunkPipelineAccumulator is a high-severity bug that was reported in several GitHub issues (e.g., #65073 and #68968) during the rollout of the 4.0 and 4.1-RC branches.
* What triggers it: It is often related to the Pipeline Engine handling complex nested types (like ARRAY, MAP, STRUCT) or specific string-heavy workloads where the internal memory offset (the unsigned int in your log) overflows or hits a null pointer during a data "flush" from the accumulator to the next operator.
* Version Context: 4.0.9 was released in April 2026 (per the system's current 2026 timeline). Since then, several critical patch releases (4.0.10 and 4.0.11) have been issued specifically to address stability regressions in the 4.0 "Global Shuffle" and "Spill-Aware" write paths.
Recommendations
1. Upgrade to 4.0.11+ immediately:
The 4.0.11 patch released in June 2026 contains several "Bugfix" entries for BinaryColumn and NullableColumn crashes. This is the most direct solution for this SIGSEGV.
2. Mitigate via Configuration:
If you cannot upgrade immediately, you can try to bypass the specific code path that is crashing (the pipeline accumulator) by adjusting these settings:
* SET GLOBAL pipeline_max_batch_size = 1024; (Reduce batch sizes to avoid large memory offsets).
* Check if you are using UNNEST or complex JSON functions. In 4.0, these were heavily optimized, but the optimizations had initial stability issues with memory management.
3. Relieve Metadata Stress:
As we discussed regarding your 25 GB meta folder and thousands of versions, your cluster is operating in an "extreme stress" state. Most memory-pointer bugs in StarRocks are triggered when the system is under heavy resource pressure.
* Action: Slow down your Kafka ingestion frequency (e.g., bufferflush.intervalms = 60000). This will reduce the frequency of ChunkPipelineAccumulator::push calls and give the BE more headroom to manage memory without hitting these edge-case bugs.
Summary: This is a confirmed bug in 4.0.9. Upgrade to 4.0.11 to fix the underlying logic error, and throttle your writes to prevent the metadata bloat that is likely triggering the conditions for the crash conditions that is likely that are likely trigger.Francisco Silva
06/24/2026, 9:19 AMRocky
06/24/2026, 9:20 AMBinaryColumnBase::append + SIGSEGV @0x0) are:
* GitHub Issue #56588: This report matches your stack trace perfectly. It describes a SIGSEGV (@0x0) in BinaryColumnBase<unsigned int>::append when the pipeline engine handles certain column merging operations.
* GitHub Issue #68968: A more recent report specifically in the 4.x branches showing a segfault in the same BinaryColumnBase function during high-frequency writes or complex queries.
* GitHub Issue #65073: This issue identifies crashes in the 4.0.x branch when the pipeline engine processes complex types (like nested arrays or JSON) which often rely on BinaryColumnBase.
2. Resolution in Version 4.0.11
The fixes for these pointer-handling errors were rolled into the latest maintenance releases.
* StarRocks 4.0.11 Release Notes:
* This version (released June 2026) enables pipeline_enable_large_column_checker by default. This is a safety mechanism specifically designed to catch the "out of bounds" or "null pointer" scenarios in BinaryColumn before they cause a node crash.
* It contains multiple fixes for memory safety in the lake (shared-data) write path and ChunkPipelineAccumulator.
Recommended Next Steps
1. Upgrade: The 4.0.9 version has several known stability regressions regarding memory offsets. Upgrading to 4.0.11 is the strongly recommended fix.
2. Short-term Fix: If you cannot upgrade immediately, try setting this session/global variable to help the system catch errors more gracefully:
sql
SET GLOBAL pipeline_enable_large_column_checker = true;
3. Metadata Cleanup: As we identified, the 25GB metadata folder is the catalyst. The bug in the code is being "pushed" to fail by the massive amount of tablet metadata the BE has to hold in memory. Reducing your Kafka write frequency (increasing bufferflush.intervalms) remains the best way to stabilize the system while you plan the upgrade.
References
• release_notes/release-4.0.mdFrancisco Silva
06/24/2026, 9:34 AMRocky
06/24/2026, 9:34 AMbe.conf file of each Backend (BE) node.
1. Configure storage_root_path
You can append ,medium:ssd or ,medium:hdd to each path in your storage configuration.
Example be.conf entry:
properties
# Separate multiple paths with a semicolon
storage_root_path = /data1,medium:ssd; /data2,medium:hdd
* medium:ssd: Tells StarRocks this path is on high-performance storage.
* medium:hdd: Tells StarRocks this path is on standard magnetic storage (the default if omitted).
2. Why this matters (Data Tiering)
Once StarRocks knows which disks are SSDs, you can use Storage Policies to automatically move data between tiers. For example:
* Hot Data: Keep the last 7 days of data on SSD.
* Cold Data: Automatically migrate data older than 7 days to HDD.
You set this at the table or partition level:
sql
-- Example: Force a table to use SSDs
CREATE TABLE my_table ( ... )
PROPERTIES (
"storage_medium" = "SSD"
);
-- Example: Set a TTL for SSD storage
ALTER TABLE my_table
MODIFY PARTITION (p1)
SET("storage_medium"="SSD", "storage_cooldown_time"="2026-12-31 00:00:00");
3. Safety Check (FE Configuration)
If you want to ensure that StarRocks doesn't accidentally try to put "SSD-requested" data on a node that only has HDDs, you can enable this check in your fe.conf:
* enable_strict_storage_medium_check = true: This prevents table creation if the requested storage medium is not available on the BEs.
4. Performance Tip (OS Level)
While not a StarRocks setting, the documentation recommends matching your Linux I/O scheduler to your storage medium for the best results:
* SATA/HDD: Use mq-deadline.
* SSD/NVMe: Use kyber or none.
References
• administration/management/BE_configuration.md
• deployment/environment_configurations.md
• faq/operation_maintenance_faq.md
• administration/management/FE_configuration.md
References
• administration/management/BE_configuration.md
• deployment/environment_configurations.md
• faq/operation_maintenance_faq.md
• administration/management/FE_configuration.md
• faq/Deploy_faq.mdFrancisco Silva
06/24/2026, 9:59 AMRocky
06/24/2026, 9:59 AMSHOW DATA output accounts for all replicas. It represents the total physical storage used across the entire cluster for that table or database.
According to the StarRocks documentation:
* Total Volume: The data volume displayed is the sum of the sizes of all replicas (e.g., if you have 10GB of logical data and a replication factor of 3, SHOW DATA will show approximately 30GB).
* ReplicaCount: This column shows the total number of tablet replicas across all partitions and materialized views.
Verification
If you want to see the "logical" size (the size of a single copy of the data), you can look at the output of:
sql
SHOW PARTITIONS FROM <table_name>;
In the SHOW PARTITIONS output:
* DataSize: This represents the physical size of the data in that specific partition (including its replicas).
* Note: In some newer versions or shared-data (Cloud Native) clusters, the distinction between DataSize (logical) and StorageSize (physical) is made more explicit in the SHOW PARTITIONS output.
Summary: If you see 100 GB in SHOW DATA, that is the actual disk space being occupied by all copies of that data across your BE nodes.
References
• sql-reference/sql-statements/Database/SHOW_DATA.md
• faq/Sql_faq.mdnodes.
References
• sql-reference/sql-statements/Database/SHOW_DATA.md
• faq/Sql_faq.md
• faq/Others.md
• sql-reference/sql-statements/table_bucket_part_index/SHOW_TABLET.md
• administration/management/resource_management/Replica.md
• sql-reference/sql-statements/table_bucket_part_index/SHOW_PARTITIONS.mdFrancisco Silva
06/24/2026, 10:04 AMRocky
06/24/2026, 10:04 AMSHOW DATA does explicitly state this in the Note section of its reference page.
From the official StarRocks documentation for SHOW DATA:
"1. If the FROM clause is not specified... the data volume is the total data volume of all replicas."
"2. If the FROM clause is specified... the data volume is the total data volume of all replicas."How to see the "Single Copy" size If you want to know the size of your data without the replication overhead, you should check the
DataSize column in these commands:
1. SHOW PARTITIONS FROM <table_name>: In a Shared-Nothing cluster (standard), the DataSize column here usually refers to the size of a single logical copy.
2. SHOW TABLETS FROM <table_name>: This will show the DataSize for every individual replica. You can sum the unique Tablet IDs to get the logical size.
Summary Table:
Command | "Size" or "DataSize" includes Replicas?
SHOW DATA | Yes (Total physical disk space)
SHOW PARTITIONS | No (Usually represents logical data size)
SHOW TABLETS | Individual (Shows size per specific replica)
References
• sql-reference/sql-statements/Database/SHOW_DATA.md
• sql-reference/sql-statements/table_bucket_part_index/SHOW_PARTITIONS.md
• faq/Sql_faq.md
References
• sql-reference/sql-statements/table_bucket_part_index/SHOW_PARTITIONS.md
• sql-reference/sql-statements/Database/SHOW_DATA.md
• faq/Sql_faq.md
• knowledge/admin_and_operation/shared_data_compaction.md