title: "Improve memory configuration documentation and validation for InfluxDB3 Enterprise"
labels:
- documentation
- enhancement
- influxdb3-enterprise
Summary
Add comprehensive memory configuration documentation and validation to prevent common OOM (Out of Memory) kills in InfluxDB 3 Enterprise deployments, particularly affecting the compactor component.
Problem
Customer deployments are experiencing OOM kills due to memory overcommitment from misconfigured cache settings. Current issues:
- No memory configuration guidance in HELM chart documentation
- No validation of memory settings during chart installation
- Percentage-based cache configuration is ambiguous (
INFLUXDB3_PT_FILE_CACHE_MAX_BYTES: 50%)
- Conflicting defaults that lead to cache allocation > container limit
- No warnings when force snapshot threshold is misconfigured
Real-World Example (VAST Customer)
Customer configured:
resources:
limits:
memory: 95Gi
env:
- name: INFLUXDB3_PT_FILE_CACHE_MAX_BYTES
value: 50% # 47.5GB
- name: INFLUXDB3_OBJECT_STORE_CACHE_MAX_SIZE_BYTES
value: "34359738368" # 32GB
- name: INFLUXDB3_PT_COMPACTOR_INPUT_SIZE_BUDGET
value: 12GB
Result:
- Total cache allocation: 91.5GB (96% of limit)
- Available for operations: 3.5GB (4% of limit)
- Compactor OOMKilled after 38 minutes
Root cause: Caches alone consumed 96% of available memory, leaving insufficient space for compaction operations.
Proposed Solution
1. Add Memory Sizing Documentation
Create comprehensive memory sizing guide covering:
- Memory budget calculation
- Component-by-component sizing guidelines
- Pre-configured profiles (small/standard/large/high-performance)
- Troubleshooting guide
- Validation checklist
Documentation structure:
docs/
memory-sizing-guide.md # Comprehensive guide with calculator
memory-troubleshooting.md # OOM troubleshooting
examples/
memory-config-64gb.yaml # Small deployment
memory-config-95gb.yaml # Standard deployment
memory-config-150gb.yaml # Large deployment
memory-config-200gb.yaml # High-performance deployment
2. Add HELM Chart Validation
Add values.schema.json to validate memory configuration at install/upgrade time.
Validation checks:
- Warn if total cache allocation > 80% of container memory
- Error if force snapshot threshold > 60% of container memory
- Warn if force snapshot threshold > total cache allocation
- Warn if percentage-based cache configuration used in production
- Recommend absolute byte values instead of percentages
Example validation output:
⚠️ WARNING: Memory overcommitment detected
Total cache allocation: 91.5GB (96% of 95GB limit)
Recommended maximum: 76GB (80% of limit)
Current configuration:
File cache: 47.5GB (50%)
Object store cache: 32.0GB
Compactor input budget: 12.0GB
Recommendation:
Use one of the pre-configured memory profiles:
helm install ... -f examples/memory-config-95gb.yaml
Or reduce cache sizes manually. See:
docs/memory-sizing-guide.md
3. Update Default Values
Change values.yaml defaults to be safer:
Current (dangerous):
compactor:
env:
- name: INFLUXDB3_PT_FILE_CACHE_MAX_BYTES
value: 50% # Ambiguous, error-prone
- name: INFLUXDB3_FORCE_SNAPSHOT_MEM_THRESHOLD
value: 70% # Too high
Proposed (safe):
compactor:
env:
# Use absolute values by default (for 95GB container)
- name: INFLUXDB3_PT_FILE_CACHE_MAX_BYTES
value: "21474836480" # 20GB (21% of 95GB)
- name: INFLUXDB3_OBJECT_STORE_CACHE_MAX_SIZE_BYTES
value: "21474836480" # 20GB (21% of 95GB)
- name: INFLUXDB3_PT_COMPACTOR_INPUT_SIZE_BUDGET
value: "8GB"
- name: INFLUXDB3_EXEC_MEM_POOL_BYTES
value: "21474836480" # 20GB (21% of 95GB)
- name: INFLUXDB3_DATAFUSION_NUM_THREADS
value: "8" # Limit parallelism
- name: INFLUXDB3_FORCE_SNAPSHOT_MEM_THRESHOLD
value: "50%" # Reduced from 70%
Memory budget with safe defaults:
File cache: 20 GB (21%)
Object store cache: 20 GB (21%)
Compactor input budget: 8 GB (8%)
Exec mem pool: 20 GB (21%)
Runtime overhead: 5 GB (5%)
---------
Total allocated: 73 GB (77%)
Container limit: 95 GB
Available for ops: 22 GB (23%) ✅ SAFE
4. Add Pre-Configured Memory Profiles
Add example configurations for common deployment sizes:
examples/memory-config-64gb.yaml (Small deployment)
- Container: 64GB
- File cache: 15GB
- Object cache: 10GB
- Input budget: 5GB
- Exec pool: 10GB
- Total allocated: 43GB (67%)
examples/memory-config-95gb.yaml (Standard deployment)
- Container: 95GB
- File cache: 20GB
- Object cache: 20GB
- Input budget: 8GB
- Exec pool: 20GB
- Total allocated: 73GB (77%)
examples/memory-config-150gb.yaml (Large deployment)
- Container: 150GB
- File cache: 40GB
- Object cache: 30GB
- Input budget: 15GB
- Exec pool: 30GB
- Total allocated: 123GB (82%)
examples/memory-config-200gb.yaml (High-performance deployment)
- Container: 200GB
- File cache: 50GB
- Object cache: 40GB
- Input budget: 20GB
- Exec pool: 40GB
- Total allocated: 160GB (80%)
Usage:
helm install influxdb3-enterprise influxdata/influxdb3-enterprise \
-f examples/memory-config-95gb.yaml \
-f my-custom-values.yaml
5. Add Memory Monitoring Dashboard
Add Grafana dashboard with memory metrics:
- Container memory usage (%)
- Cache utilization (file, object)
- Execution pool utilization
- Forced snapshot rate
- OOMKill event count
Alert thresholds:
- ⚠️ Warning at 80% memory usage
- 🔥 Critical at 90% memory usage
- 🔥 Critical on any OOMKill event
Implementation Checklist
Phase 1: Documentation (High Priority)
Phase 2: Example Configurations (High Priority)
Phase 3: Chart Validation (Medium Priority)
Phase 4: Update Defaults (Medium Priority)
Phase 5: Monitoring (Low Priority)
Testing Plan
-
Validation testing:
- Test that validation catches overcommitted memory
- Test that validation warns about percentage-based configs
- Test that validation accepts safe configurations
-
Configuration testing:
- Deploy with each pre-configured profile
- Run compaction workload for 2+ hours
- Verify no OOM kills
- Verify memory stays under 85% of limit
-
Upgrade testing:
- Upgrade existing deployment with new defaults
- Verify no disruption to running workload
- Verify memory usage improves
Benefits
- Prevents OOM kills by providing safe default configurations
- Educates users with comprehensive documentation
- Validates early to catch misconfigurations before deployment
- Saves time with pre-configured profiles for common scenarios
- Improves observability with memory monitoring dashboard
Related Issues
Additional Context
Full analysis and documentation already created:
COMPACTOR-OOM-ANALYSIS.md - Deep technical analysis (23KB)
COMPACTOR-OOM-QUICK-FIX.md - Customer quick fix guide (19KB)
MEMORY-SIZING-GUIDE.md - Comprehensive sizing guide (18KB)
These documents are available and can be adapted for inclusion in the HELM chart repository.
title: "Improve memory configuration documentation and validation for InfluxDB3 Enterprise"
labels:
Summary
Add comprehensive memory configuration documentation and validation to prevent common OOM (Out of Memory) kills in InfluxDB 3 Enterprise deployments, particularly affecting the compactor component.
Problem
Customer deployments are experiencing OOM kills due to memory overcommitment from misconfigured cache settings. Current issues:
INFLUXDB3_PT_FILE_CACHE_MAX_BYTES: 50%)Real-World Example (VAST Customer)
Customer configured:
Result:
Root cause: Caches alone consumed 96% of available memory, leaving insufficient space for compaction operations.
Proposed Solution
1. Add Memory Sizing Documentation
Create comprehensive memory sizing guide covering:
Documentation structure:
2. Add HELM Chart Validation
Add
values.schema.jsonto validate memory configuration at install/upgrade time.Validation checks:
Example validation output:
3. Update Default Values
Change
values.yamldefaults to be safer:Current (dangerous):
Proposed (safe):
Memory budget with safe defaults:
4. Add Pre-Configured Memory Profiles
Add example configurations for common deployment sizes:
examples/memory-config-64gb.yaml(Small deployment)examples/memory-config-95gb.yaml(Standard deployment)examples/memory-config-150gb.yaml(Large deployment)examples/memory-config-200gb.yaml(High-performance deployment)Usage:
5. Add Memory Monitoring Dashboard
Add Grafana dashboard with memory metrics:
Alert thresholds:
Implementation Checklist
Phase 1: Documentation (High Priority)
docs/memory-sizing-guide.mddocs/memory-troubleshooting.mdPhase 2: Example Configurations (High Priority)
examples/memory-config-64gb.yamlexamples/memory-config-95gb.yamlexamples/memory-config-150gb.yamlexamples/memory-config-200gb.yamlPhase 3: Chart Validation (Medium Priority)
values.schema.jsonwith memory validation rules_helpers.tplhelm install/upgradePhase 4: Update Defaults (Medium Priority)
INFLUXDB3_EXEC_MEM_POOL_BYTESto defaultsINFLUXDB3_DATAFUSION_NUM_THREADSto defaultsPhase 5: Monitoring (Low Priority)
Testing Plan
Validation testing:
Configuration testing:
Upgrade testing:
Benefits
Related Issues
Additional Context
Full analysis and documentation already created:
COMPACTOR-OOM-ANALYSIS.md- Deep technical analysis (23KB)COMPACTOR-OOM-QUICK-FIX.md- Customer quick fix guide (19KB)MEMORY-SIZING-GUIDE.md- Comprehensive sizing guide (18KB)These documents are available and can be adapted for inclusion in the HELM chart repository.