Documentation Index
Fetch the complete documentation index at: https://mintlify.com/questdb/questdb/llms.txt
Use this file to discover all available pages before exploring further.
Hardware Requirements
Minimum Requirements
Development/Testing:- CPU: 2 cores
- RAM: 4 GB
- Storage: 10 GB SSD
- OS: Linux, macOS, Windows (64-bit)
- CPU: 4+ cores
- RAM: 16 GB+
- Storage: 100 GB+ SSD/NVMe
- OS: Linux (recommended), macOS, Windows
- Network: 1 Gbps+
Recommended Production Configuration
Small Deployment (< 1 TB data, < 100K rows/sec):- CPU: 8 cores (Intel Xeon, AMD EPYC)
- RAM: 32 GB
- Storage: 500 GB NVMe SSD
- Network: 1 Gbps
- CPU: 16 cores
- RAM: 64-128 GB
- Storage: 2-4 TB NVMe SSD RAID 0/10
- Network: 10 Gbps
- CPU: 32+ cores
- RAM: 256+ GB
- Storage: 10+ TB NVMe SSD RAID 0/10
- Network: 25+ Gbps
- Consider: Distributed setup, separate ingestion/query nodes
CPU Sizing
Thread Pool Configuration
QuestDB uses three shared worker pools:- Network pool: 2-4 threads for typical loads, 8+ for high connection counts
- Query pool: Number of CPU cores for query-heavy workloads
- Write pool: 2-4 threads, increase if WAL apply lags
CPU Affinity
Pin threads to specific cores to reduce context switching:- Leave some cores unassigned for OS and JVM overhead
- On NUMA systems, use cores from same socket
- Avoid hyperthreading for critical threads
Memory Sizing
JVM Heap
QuestDB uses off-heap memory for data operations. JVM heap is used for:- Query compilation and planning
- Symbol tables (if
cairo.default.symbol.cache.flag=true) - Network buffers
- Metadata
- Small: 2-4 GB (
-Xms2g -Xmx4g) - Medium: 4-8 GB (
-Xms4g -Xmx8g) - Large: 8-16 GB (
-Xms8g -Xmx16g)
- More than 50% of system RAM to JVM
- More than 32 GB (loses compressed OOPs)
Off-Heap Memory
QuestDB allocates native memory for:- Memory-mapped files (data, indexes)
- Query execution buffers
- O3 ingestion buffers
- WAL buffers
- JVM Heap: 8 GB
- Off-Heap (QuestDB): ~100 GB (90% - heap)
- OS: ~20 GB
Page Frame Sizing
Data Pages:Storage Sizing
Capacity Planning
Compression Ratio: QuestDB achieves 3-10x compression depending on data:- High compression (8-10x): Repeated values, low cardinality
- Medium compression (4-6x): Time series with patterns
- Low compression (2-3x): Random data, high cardinality
- Row size: 200 bytes
- Ingestion: 1M rows/day
- Retention: 365 days
- Compression: 5x
Storage Types
NVMe SSD (Recommended):- Lowest latency (< 100 μs)
- Highest IOPS (> 500K)
- Best for hot data
- Good latency (< 1 ms)
- Moderate IOPS (> 50K)
- Cost-effective for warm data
- High latency (> 10 ms)
- Low IOPS (< 200)
- Only for cold/archive data with volumes
RAID Configuration
RAID 0 (Striping):- Pros: Maximum performance, double throughput
- Cons: No redundancy, double failure risk
- Use: Development, with external backups
- Pros: Redundancy, same read performance
- Cons: 50% capacity loss, same write performance
- Use: Small deployments
- Pros: Performance + redundancy
- Cons: 50% capacity loss
- Use: Production systems
- Use QuestDB volumes for tiering
- Rely on external backups and snapshots
- Simpler configuration
Volume Configuration
Network Sizing
Bandwidth Requirements
Ingestion Bandwidth:Connection Limits
- Monitor
questdb_connections_activemetric - Set limits 2x peak concurrent connections
- Each connection uses ~1 MB memory
Performance Tuning
Write Performance
Optimize O3 Configuration:Read Performance
Parallel Execution:Memory Optimization
Symbol Tables:Monitoring and Benchmarking
Key Metrics to Monitor
- Write Throughput: Rows/sec ingested
- Query Latency: p50, p95, p99 response times
- Memory Usage: JVM heap and off-heap
- Disk IOPS: Read and write operations
- Network Throughput: Ingress and egress
- Connection Count: Active connections
- WAL Lag: Time between write and apply
Benchmarking
Write Benchmark:Scaling Strategies
Vertical Scaling (Scale Up)
- Add more CPU cores → increase worker counts
- Add more RAM → increase buffer sizes
- Upgrade to faster storage → reduce latency
- Increase network bandwidth → support more clients
Horizontal Scaling (Scale Out)
Read Replicas:- Use WAL replication
- Route queries to replicas
- Primary for writes, replicas for reads
- Partition by time (automatic)
- Use volumes for data tiering
- Archive old partitions
- Split tables across multiple instances
- Application-level routing
- Aggregate results at application layer
Cost Optimization
- Right-size worker pools: Don’t over-allocate threads
- Use storage tiers: Hot on NVMe, warm on SSD, cold on HDD
- Enable compression: Parquet format for exports
- Partition pruning: Drop old partitions to reclaim space
- Symbol optimization: Auto-scale instead of over-provisioning
- Query cache: Reduce redundant computation
- Batch writes: Use ILP or COPY instead of single INSERTs
Cloud Deployments
AWS
Instance Types:- i3/i3en: NVMe instance storage, lowest latency
- r6i/r6a: High memory for large datasets
- c6i/c6a: Compute-optimized for query-heavy
- io2 Block Express: Highest performance
- gp3: Balanced performance/cost
- EFS: Not recommended (high latency)
Azure
VM Series:- Lsv2: NVMe local storage
- Easv5: Memory-optimized
- Fsv2: Compute-optimized
- Premium SSD v2: Adjustable IOPS/throughput
- Ultra Disk: Lowest latency
GCP
Machine Types:- n2-highmem: Memory-optimized
- n2-standard: Balanced
- Local SSD: Lowest latency
- Hyperdisk Extreme: Highest performance
- SSD Persistent Disk: Balanced