Hi <@U0A71G31CDV>, Please have a look into the con...
# questions-and-troubleshooting
r
Hi @Rocky, Please have a look into the configuration and give feedback is this good for my >50 GB workload
r
Hi! I'd be happy to take a look at your configuration. While 50 GB is a relatively small workload for StarRocks (which can handle petabytes), getting the configuration right from the start ensures better performance and stability. Could you please share the details of your setup? Specifically: 1. Node Count: How many FE (Frontend) and BE (Backend) nodes are you planning to use? 2. Hardware Specs: CPU (cores), RAM, and Disk type (SSD/HDD) for each node. 3. Table Types: Are you using the Primary Key model, Duplicate Key, etc.? 4. Query Profile: Is this for high-concurrency short queries or complex analytical joins? ────────── General Feedback for a > 50 GB Workload Based on StarRocks' standard recommendations, here is what a "good" baseline looks like: * High Availability (Production): * 3 FE nodes (Followers) to ensure no single point of failure. * 3 BE nodes to maintain the default 3-replica data safety. * Minimum Hardware (Per Node): * FE: 8 vCPU cores and 16 GB RAM. (Metadata for 50 GB is very small, so 16 GB is plenty). * BE: 16 vCPU cores and 64 GB RAM is the standard recommendation, though for 50 GB you could likely start with 8 cores and 16-32 GB RAM if the query volume is low. * CPU: Ensure your CPUs support the AVX2 instruction set for vectorized execution. * Storage: * SSD is strongly recommended, especially if you use the Primary Key table engine or require low-latency queries. * Capacity: 50 GB of raw data will likely compress to ~10-15 GB. With 3 replicas, you'll need about 30-45 GB of usable disk space across your BEs. * Networking: 10 Gigabit Ethernet is recommended for stable data transmission between nodes. Once you provide your specific specs, I can give you more tailored advice! References • deployment/plan_cluster.md • faq/Others.md • deployment/deployment_prerequisites.md • introduction/Architecture.md
r
Hi @Rocky, Please review my configuration my data will be below 50 gb at the starting, and i wanted to know is this resources are suitable or over and the method of deployment ?
r
Hi there! I'm Rocky. I've reviewed your proposed configuration for a starting dataset of 50 GB. Overall, your plan is very well-structured, especially for a "Safest Configuration" focusing on High Availability (HA). For a dataset of < 50 GB, here is the breakdown of whether these resources are suitable or overkill: 1. Resource Suitability * FE (m6i.large - 2 vCPU, 8 GB): * Suitability: This is a good "starter" production spec. While official documentation often recommends 8 vCPU / 16 GB for large clusters, for < 50 GB of data, your metadata will be very small. 8 GB RAM is the minimum safe amount for FE. * Verdict: Suitable. * BE (m6i.xlarge - 4 vCPU, 16 GB): * Suitability: StarRocks is a vectorized engine that thrives on CPU and Memory. 16 GB is the minimum recommended for a BE. For 50 GB of data, this will work well for low-to-moderate query complexity. If you plan to run massive joins or have hundreds of concurrent users, you might eventually need to scale to
m6i.2xlarge
(32 GB RAM). * Verdict: Suitable for starting, but keep an eye on memory usage if queries get complex. * Node Count (3 FE, 3 BE): * Suitability: For 50 GB, 1 BE could technically hold all the data. However, 3 BEs are required for High Availability and to support your "Replication = 3" strategy. Similarly, 3 FEs are required for Leader election/quorum. * Verdict: Overkill for capacity, but PERFECT for safety/HA. 2. Table Design Review * Partitioning (Monthly): At 50 GB/year, you have ~4 GB per month. This is a very manageable partition size. * Bucketing (8 Buckets): With 4 GB per partition and 8 buckets, each bucket (tablet) will be roughly 500 MB. * StarRocks Best Practice: Aim for compressed bucket sizes between 100 MB and 1 GB. Your choice of 8 buckets puts you exactly in the "sweet spot" for performance and metadata management. * Mapping Table (1 Bucket): Correct. Small dimension/mapping tables should use 1 bucket to keep metadata low. 3. Storage * Disk (500 GB gp3 per BE): _ 50 GB raw data _ 3 replicas = 150 GB total. * Distributed across 3 BEs = 50 GB used per BE. * Verdict: Slightly overkill. You could safely start with 200 GB gp3 disks and scale them up later (gp3 allows live volume expansion). However, 500 GB gives you plenty of headroom for growth and background compaction. 4. Method of Deployment Since you are on AWS, you have two primary options: 1. StarRocks Kubernetes Operator (Recommended): If you use Amazon EKS, the Operator is the easiest way to manage lifecycle, scaling, and upgrades. It handles the deployment of FE/BE and ensures they stay healthy. 2. Manual EC2 Deployment: If you prefer standard VMs, you can deploy manually. * Tip: Use a tool like Ansible or simple scripts. * Tip: Ensure all nodes are in the same Placement Group (Cluster) for the lowest possible network latency. Summary Recommendations: * Keep the 3-node setup: It's the only way to guarantee the "Fault Tolerance" you listed. * Instance Type: Your choices are a great balance between cost and the "safe" minimums for StarRocks. * Deployment: Use Amazon EKS with the StarRocks Operator if you are comfortable with Kubernetes; otherwise, use EC2 with an Auto Scaling Group (fixed at 3) to ensure nodes are replaced if they fail. Your backup strategy (S3 snapshots) is the industry standard for StarRocks and is highly recommended. You are in great shape to start! References • best_practices/bucketing.md • best_practices/partitioning.md • knowledge/usage/best-practice.md • table_design/data_distribution/Data_distribution.md
Hello! I'm Rocky. For a starting dataset of 50 GB, you have a lot of flexibility. StarRocks is highly efficient with storage (often achieving 3:1 to 5:1 compression), so your 50 GB will likely occupy only 10–15 GB on disk. Since you didn't list your specific hardware specs yet, here is a breakdown of what would be considered suitable, overkill, or underpowered for your use case: 1. Resource Recommendations (for 50 GB) * Suitable (Balanced): * FE (Frontend): 1 node, 4–8 vCPU, 16 GB RAM. * BE (Backend): 1 node (or 3 for high availability), 8–16 vCPU, 32 GB RAM. * Disk: SSD is highly recommended for the best performance, though HDD works for 50 GB. * Overkill: * The "Standard Production" recommendation of 16 vCPU / 64 GB RAM per BE is likely more than you need for just 50 GB, unless you have extremely high concurrency (hundreds of simultaneous users) or very complex real-time joins. * Underpowered: * Running with less than 8 GB of RAM for a BE may lead to stability issues during heavy data loading or complex queries. 2. Recommended Deployment Methods The best method depends on your infrastructure: * For Cloud/Kubernetes (Highly Recommended): Use the StarRocks Operator. It is the modern way to deploy, making scaling and management (like adding more BEs later) very easy. * For Quick Testing/Small Scale: Docker Compose is the fastest way to get started. You can run a complete FE + BE setup on a single large VM. * For On-Prem/Bare Metal: Use the RPM or Tarball installation. This gives you the most control over performance tuning and AVX2 instruction set utilization. 3. Key Configuration Tips for your size: * Replication: If you only use 1 BE node, set your table replication factor to 1 (
"replication_num" = "1"
). If you want high availability, use 3 BEs and 3 replicas. * CPU Instructions: Ensure your CPU supports AVX2. StarRocks uses vectorization to speed up queries, and AVX2 is essential for production-grade performance. * Memory Limit: Ensure the
mem_limit
in your
be.conf
is set appropriately (usually 80-90% of the total RAM available to the container/VM). Feel free to share your specific CPU/RAM/Disk specs, and I can give you a more detailed review! References • deployment/plan_cluster.md • quick_start/shared-nothing.md • quick_start/shared-data.md • knowledge/usage/best-practice.md • deployment/deployment_prerequisites.md • faq/Others.md
r
Hi @Rocky, What about AWS quick start deployment ? is this good way to deploy prod by this method ?
r
Hello! I'm Rocky. The AWS Quick Start (which typically uses CloudFormation templates) is a great way to get a StarRocks cluster up and running quickly for testing, development, or a Proof of Concept (PoC). However, for a production environment, there are several factors to consider when deciding if it's the right fit for you. Is it good for Production? While you can use the Quick Start for production, most users prefer other methods for long-term production management due to the following reasons: 1. Lifecycle Management: Quick Start templates are excellent for initial "day 1" deployment, but "day 2" operations—like rolling upgrades, scaling individual components, and complex monitoring integration—can be more manual compared to other methods. 2. Customization: Production environments often require specific VPC configurations, security group hardening, and integration with existing IAM roles that might exceed the parameters provided in a standard Quick Start template. Recommended Production Deployment Methods on AWS: If you are planning a production rollout, I recommend looking at these alternatives: 1. StarRocks Operator on Amazon EKS: This is highly recommended if you are already using Kubernetes. The StarRocks Operator manages the lifecycle of the cluster, including automated upgrades, scaling, and self-healing. It’s generally considered the best way to run StarRocks in a modern cloud-native production environment. 2. StarRocks Cloud (Managed Service): For the easiest production experience, StarRocks has a fully managed version (offered by CelerData) available on the AWS Marketplace. This handles all the infrastructure management, tuning, and scaling for you. 3. Manual Deployment on EC2 (via Terraform/Ansible): If you need absolute control over the OS and hardware tuning and don't use Kubernetes, many production users use Terraform to provision EC2 instances and Ansible to deploy StarRocks. This allows for fine-grained tuning of disk I/O and network settings. Summary: * Use AWS Quick Start if: You want to test StarRocks features quickly or need a baseline template to build your own automation. * Use StarRocks Operator (EKS) if: You want the best balance of control and automated management for production. * Use Managed Service if: You want to focus on data and queries rather than managing the database infrastructure. Would you like more details on the EKS deployment or specific hardware recommendations for AWS?
r
@Rocky Why does a freshly-joined FE follower (empty meta, correct helper flag, successfully passes
checkCurrentNodeExist()
) stop replaying at a fixed journal ID (
9363239
) instead of continuing to catch up to the leader's current position (~9,510,000+), and why does this happen identically across multiple independent wipe-and-rejoin attempts?
Supporting details to include Environment: • StarRocks version:
3.5.13-dca7c0a
• Topology: 3 FE + 3 BE colocated on a single VM, all on loopback IPs (
127.0.0.1/.2/.3
for FE; all 3 BE on
127.0.0.1
, differentiated by port) • This is the AWS side of a GCP→AWS migration; the AWS StarRocks install predates the current cluster incarnation (originally set up in February, GCP became the active cluster in between, now migrated back) What was done, in order: 1. Found FE2/FE3 crash-looping with
NodeMgr.checkCurrentNodeExist(): current node is not added to the cluster, will exit
— traced to stale February-dated
ROLE
files never re-registered under the leader's current
ClusterId
(formed fresh in September) 2.
ALTER SYSTEM DROP FOLLOWER
+
ALTER SYSTEM ADD FOLLOWER
+ fresh
meta_dir
wipe + restart with
--helper <leader_ip>:<edit_log_port>
— repeated this cleanly three separate times for FE2 3. Each time, the follower successfully joins (
Alive: true
, fresh identity timestamp assigned by the leader) but
ReplayedJournalId
freezes at exactly
9363239
and never advances, even after several minutes, while the leader's own
ReplayedJournalId
continues climbing normally What's been ruled out: • Not a networking/connectivity issue — leader's ports (
9011
edit log,
8031
HTTP) confirmed listening and reachable via
netstat
• Not a log4j/permissions issue — separately found and fixed (rotated log files owned by
root
vs. process running as
ubuntu
), confirmed logging now works correctly, but replay still freezes at the same number • Not a stale-PID/zombie-process issue — confirmed via
ps
, killed and restarted cleanly • Not GC/memory pressure — GC logs from FE3's crash-loop period showed entirely normal short pauses, no OOM Specific things worth asking someone with deeper knowledge: 1. Is
9363239
significant — e.g., does it correspond to a
CHECKPOINT
boundary, a schema-change operation, or an entry type BDB-JE handles specially during replay? 2. Is there a known issue/limitation with follower catch-up when the BE topology uses shared loopback IPs across multiple BE processes (as opposed to true unique per-BE IPs) — could tablet/replica-related journal entries be failing to replay cleanly against this non-standard topology? 3. Given the current
replication_num=1
workaround already in use (from the earlier RESTORE, due to BE IP-sharing), is there a metadata/journal-entry type tied to replica placement that assumes
replication_num >= 3
and chokes followers during replay under this topology? 4. Is there a way to inspect the actual content of the leader's edit log at journal ID
9363239
directly (a BDB-JE / edit-log dump tool) to see what operation is there, rather than inferring from follower behavior alone? 5. Given this FE2/FE3 install pre-dates the current cluster (Feb setup, cluster re-formed in September), is there a known failure mode where an FE that was ever part of an older cluster incarnation (different
ClusterId
history) can get stuck like this even after a full metadata wipe — i.e., is metadata wipe via
rm -rf meta/
actually sufficient, or is there other cached state (e.g., in BDB-JE's
.jdb
files if any remained, or something at the OS/filesystem level) that needs clearing too? Also worth including • Confirm whether
ALTER SYSTEM ADD FOLLOWER
timing relative to process start matters in 3.5.13 specifically (some versions want it issued before start, some after) — the docs/behavior here wasn't fully clear during troubleshooting • Ask if there's a supported way to force a follower to skip straight to a fresh image transfer from the leader instead of relying on journal replay from position 0, to sidestep whatever's blocking replay at that specific point
r
Based on the behavior you described, the frozen
ReplayedJournalId
at a specific, consistent ID usually points to a blocking operation or a logical "poison pill" in the journal replay thread, rather than a networking or BDB-JE corruption issue. 1. Why it freezes at
9363239
The most likely cause in recent 3.x/4.x versions is a known issue where the FE replayer thread blocks on external metadata resolution (Bug #73832). * The Mechanism: If your metadata contains operations related to external catalogs (Hive, Iceberg, Glue, etc.), certain journal entries (like
OP_ADD_EXTERNAL_BASIC_STATS_META
) trigger a synchronous cache refresh during replay. * The Freeze: If the follower cannot reach the external metastore (HMS, HDFS, or AWS Glue) due to the migration context (GCP→AWS firewall changes, stale credentials, or DNS issues), the replayer thread will block waiting for a network timeout or retry indefinitely. This prevents
ReplayedJournalId
from advancing even though the FE is "Alive." 2. How to inspect Journal ID
9363239
You can directly inspect the content of that specific entry using the BDB-JE utility included in the StarRocks
lib
directory: 1. On the Leader FE, locate your BDB-JE jar (e.g.,
starrocks-bdb-je-18.3.x.jar
). 2. Run the
DbPrintLog
tool against the leader's BDB directory:
Copy code
bash
    java -jar fe/lib/starrocks-bdb-je-*.jar DbPrintLog -h <meta_dir>/bdb/ -vd
3. Look for the entry corresponding to VLSN
9363239
. This will tell you the
OperationType
(e.g.,
OP_CREATE_TABLE
,
OP_ADD_PARTITION
,
OP_ADD_EXTERNAL_BASIC_STATS_META
). 3. Impact of loopback/shared-IP topology While StarRocks officially recommends unique IPs, the loopback topology shouldn't cause a replay freeze unless: * The journal entry involves a Global Transaction or Tablet Management operation that performs a synchronous check against the BEs. * In a
replication_num=1
environment, if the follower tries to validate replica health against the local BEs during replay and hits a deadlock/timeout because all 3 BEs are on the same IP. * However, replay is designed to be a local state-machine update. It rarely calls out to BEs. The "external catalog blocking" (Point 1) is a far more common culprit for a fixed-ID freeze. 4. How to bypass the "Poison Pill" If the replayer is indeed stuck on a specific problematic entry, you have two primary options: A. Force a New Image (Checkpoint) A fresh follower download begins by pulling the latest
image.<id>
file and then replaying journals after that ID. 1. On the Leader, force a checkpoint:
ALTER SYSTEM CREATE IMAGE;
2. Monitor
fe.log
for "finished save image." 3. Ensure the new image ID is greater than
9363239
. 4. Wipe the follower's
meta/
and restart with
--helper
. It will now skip the problematic journal range by starting from the new image. B. Skip the Journal ID If the ID is a "poison pill" (e.g., a schema change that crashes the parser), you can force the FE to skip it: 1. Add this to the follower's `fe.conf`:
Copy code
properties
    metadata_journal_skip_bad_journal_ids=9363239
2. Restart the follower. 5. Meta Wipe Sufficiency Yes,
rm -rf <meta_dir>/*
is sufficient to clear all local FE state. BDB-JE stores everything (including the election group and sequence numbers) inside that directory. If it freezes at the same ID after a wipe, it confirms the "poison pill" is coming from the Leader's edit log stream itself. Summary of Recommendations: 1. Check
fe.log
and
fe.warn.log
specifically for "external catalog," "timeout," or "thrift" errors appearing repeatedly on the follower. 2. Inspect the ID via
DbPrintLog
to confirm if it's an external metadata operation. 3. Run
ALTER SYSTEM CREATE IMAGE
on the leader to "jump over" the problematic log segments for the newly joining follower. References