<@U0A71G31CDV> How to determine FE persistent stor...
# questions-and-troubleshooting
s
@Rocky How to determine FE persistent storage size requirements ?
r
To determine the persistent storage requirements for StarRocks Frontends (FE), you should consider two main components: Metadata Storage and Log Storage. 1. Metadata Storage (BDB JE) The FE uses Berkeley DB Java Edition (BDB JE) to persist its metadata (catalog, schema, permissions, etc.). * Recommendation: In most production scenarios, 100 GB of SSD or high-performance HDD is sufficient for metadata. * What is stored: This includes "Image" files (checkpoints of the current state) and "Edit Logs" (incremental changes). * Growth Factors: Metadata size is primarily driven by the number of databases, tables, partitions, and tablets. While metadata is kept in memory for performance, it is persisted to disk for recovery and replication. 2. Log Storage (Audit and System Logs) Log files often consume more disk space than the metadata itself, especially in clusters with high query concurrency. * Audit Logs (
fe.audit.log
):
These record every SQL query executed. If your cluster handles thousands of queries per second, these logs can grow very quickly. * Control Mechanisms: * `audit_log_delete_age`: Default is 30 days. * `audit_log_roll_num`: Default is 90 files. * `audit_log_enable_compress`: (Available in v3.2.12+) Set to
true
to compress archived audit logs to save space. * System Logs (
fe.log
):
These contain the FE's operational logs. High log levels (like
DEBUG
) will significantly increase storage usage. 3. Sizing Guidelines & Best Practices Metric | Recommendation Minimum Disk Size | 100 GB Recommended Disk Type | SSD (Recommended for faster metadata synchronization and recovery) Safety Margin | Ensure the disk usage stays below 80% to avoid performance degradation in BDB JE. How to Estimate Your Specific Needs: 1. Metadata: Check the size of your
meta/
directory. If you have 1 million tablets, your metadata image might be a few GBs. 2. Audit Logs: Estimate daily query volume. If each query log entry is roughly 1 KB and you run 1 million queries a day, that's 1 GB/day. With a 30-day retention, you'd need ~30 GB just for audit logs. Key Configuration Parameters You can tune these in
fe.conf
to manage your storage footprint: * `meta_dir`: The location where metadata is stored (defaults to
FE_HOME/meta
). * `audit_log_dir`: The location for audit logs (defaults to
FE_HOME/log
). * `bdbje_reserved_disk_size`: (v3.2.0+) Ensures BDB JE keeps a minimum amount of free space (default 512 MiB). Rocky's Tip: Always place the FE metadata directory on a persistent, reliable volume (like EBS or a RAID array) rather than ephemeral storage, as losing this data means losing your entire cluster's structure. Referencesadministration/management/FE_configuration.md