content/shared/influxdb3-admin/performance-tuning.md
Configure thread allocation, memory settings, and other parameters to optimize {{% product-name %}} performance based on your workload characteristics.
Before tuning performance, establish baseline metrics to identify bottlenecks:
CPU usage per core
top -H or htop to view per-thread CPU usageMemory consumption
IO and network
iostat# Monitor CPU per thread
top -H -p $(pgrep influxdb3)
# Track memory usage
free -h
watch -n 1 "free -h"
# Check IO wait
iostat -x 1
[!Tip] For comprehensive metrics monitoring, see Monitor metrics.
{{% show-in "enterprise" %}} Use the following to tune performance in all-in-one deployments:
[!Note] For specialized cluster nodes (ingest-only, query-only, etc.), see Configure specialized cluster nodes for mode-specific optimizations. {{% /show-in %}}
IO threads handle HTTP requests and line protocol parsing. Default: 2 (often insufficient). {{% show-in "enterprise" %}}DataFusion threads process queries and snapshots.{{% /show-in %}}
[!Note] {{% product-name %}} automatically allocates remaining cores to DataFusion after reserving IO threads. You can configure both thread pools explicitly by setting the
--num-io-threadsand--datafusion-num-threadsoptions.
{{% show-in "core" %}}
# Write-heavy: More IO threads
influxdb3 --num-io-threads=12 serve \
--node-id=node0 \
--object-store=file --data-dir=~/.influxdb3
# Query-heavy: Fewer IO threads
influxdb3 --num-io-threads=4 serve \
--node-id=node0 \
--object-store=file --data-dir=~/.influxdb3
{{% /show-in %}}
{{% show-in "enterprise" %}}
# Write-heavy: More IO threads, adequate DataFusion
influxdb3 --num-io-threads=12 serve \
--datafusion-num-threads=20 \
--node-id=node0 --cluster-id=cluster0 \
--object-store=file --data-dir=~/.influxdb3
# Query-heavy: Fewer IO threads, more DataFusion
influxdb3 --num-io-threads=4 serve \
--datafusion-num-threads=28 \
--node-id=node0 --cluster-id=cluster0 \
--object-store=file --data-dir=~/.influxdb3
{{% /show-in %}}
[!Warning]
Increase IO threads for concurrent writers
If you have multiple concurrent writers (for example, Telegraf agents), the default of 2 IO threads can bottleneck write performance.
Controls memory for query execution. Default: {{% show-in "core" %}}70%{{% /show-in %}}{{% show-in "enterprise" %}}20%{{% /show-in %}} of RAM.
{{% show-in "core" %}}
# Increase for query-heavy workloads
influxdb3 --exec-mem-pool-bytes=90% serve \
--node-id=node0 \
--object-store=file --data-dir=~/.influxdb3
# Decrease if experiencing memory pressure
influxdb3 --exec-mem-pool-bytes=60% serve \
--node-id=node0 \
--object-store=file --data-dir=~/.influxdb3
{{% /show-in %}}
{{% show-in "enterprise" %}}
# Increase for query-heavy workloads
influxdb3 --exec-mem-pool-bytes=90% serve \
--node-id=node0 --cluster-id=cluster0 \
--object-store=file --data-dir=~/.influxdb3
# Decrease if experiencing memory pressure
influxdb3 --exec-mem-pool-bytes=60% serve \
--node-id=node0 --cluster-id=cluster0 \
--object-store=file --data-dir=~/.influxdb3
{{% /show-in %}}
Caches frequently accessed data files in memory.
{{% show-in "core" %}}
# Enable caching for better query performance
influxdb3 serve \
--parquet-mem-cache-size=4096 \
--node-id=node0 \
--object-store=file --data-dir=~/.influxdb3
{{% /show-in %}}
{{% show-in "enterprise" %}}
# Enable caching for better query performance
influxdb3 --parquet-mem-cache-size=4GB serve \
--node-id=node0 --cluster-id=cluster0 \
--object-store=file --data-dir=~/.influxdb3
{{% /show-in %}}
Controls write latency vs throughput. Default: 1s.
{{% show-in "core" %}}
# Reduce latency for real-time data
influxdb3 --wal-flush-interval=100ms serve \
--node-id=node0 \
--object-store=file --data-dir=~/.influxdb3
{{% /show-in %}}
{{% show-in "enterprise" %}}
# Reduce latency for real-time data
influxdb3 --wal-flush-interval=100ms serve \
--node-id=node0 --cluster-id=cluster0 \
--object-store=file --data-dir=~/.influxdb3
{{% /show-in %}}
Symptoms: Increasing write response times, timeouts, points dropped
Solutions:
Symptoms: Long execution times, high memory usage, query timeouts
Solutions:
Symptoms: OOM errors, swapping, high memory usage
Solutions:
--force-snapshot-mem-threshold=70%)Symptoms: 100% CPU utilization, uneven thread usage (only 2 cores for writes)
Solutions:
[!Important]
"My ingesters are only using 2 cores"
Increase
--num-io-threadsto 8-16+ for ingest nodes.{{% show-in "enterprise" %}} For dedicated ingest nodes with--mode=ingest, see Configure ingest nodes.{{% /show-in %}}
{{% show-in "core" %}}
# 32-core system, high ingest rate
influxdb3 --num-io-threads=12 \
--exec-mem-pool-bytes=80% \
--wal-flush-interval=100ms \
serve \
--node-id=node0 \
--object-store=file \
--data-dir=~/.influxdb3
{{% /show-in %}}
{{% show-in "enterprise" %}}
# 32-core system, high ingest rate
influxdb3 --num-io-threads=12 serve \
--datafusion-num-threads=20 \
--exec-mem-pool-bytes=80% \
--wal-flush-interval=100ms \
--node-id=node0 \
--cluster-id=cluster0 \
--object-store=file \
--data-dir=~/.influxdb3
{{% /show-in %}}
{{% show-in "core" %}}
# 32-core system, analytical queries
influxdb3 --num-io-threads=4 serve \
--exec-mem-pool-bytes=90% \
--parquet-mem-cache-size=2048 \
--node-id=node0 \
--object-store=file \
--data-dir=~/.influxdb3
{{% /show-in %}}
{{% show-in "enterprise" %}}
# 32-core system, analytical queries
influxdb3 --num-io-threads=4 serve \
--datafusion-num-threads=28 \
--exec-mem-pool-bytes=90% \
--parquet-mem-cache-size=2GB \
--node-id=node0 \
--cluster-id=cluster0 \
--object-store=file \
--data-dir=~/.influxdb3
{{% /show-in %}}
{{% show-in "core" %}}
# 32-core system, balanced operations
influxdb3 --num-io-threads=8 serve \
--exec-mem-pool-bytes=70% \
--parquet-mem-cache-size=1024 \
--node-id=node0 \
--object-store=file \
--data-dir=~/.influxdb3
{{% /show-in %}}
{{% show-in "enterprise" %}}
# 32-core system, balanced operations
influxdb3 --num-io-threads=8 serve \
--datafusion-num-threads=24 \
--exec-mem-pool-bytes=70% \
--parquet-mem-cache-size=1GB \
--node-id=node0 \
--cluster-id=cluster0 \
--object-store=file \
--data-dir=~/.influxdb3
{{% /show-in %}}
Use this formula as a starting point:
Total cores = N
Concurrent writers = W
Query complexity factor = Q (1-10, where 10 is most complex)
IO threads = min(W + 2, N * 0.4)
DataFusion threads = N - IO threads
{{% show-in "core" %}}
# Balanced configuration
influxdb3 --num-io-threads=2 serve \
--exec-mem-pool-bytes=10GB \
--parquet-mem-cache-size=500 \
--node-id=node0 \
--object-store=file \
--data-dir=~/.influxdb3
{{% /show-in %}}
{{% show-in "enterprise" %}}
# Balanced configuration
influxdb3 --num-io-threads=2 \
--exec-mem-pool-bytes=10GB \
--parquet-mem-cache-size=500MB \
serve \
--node-id=node0 \
--cluster-id=cluster0 \
--object-store=file \
--data-dir=~/.influxdb3
{{% /show-in %}}
{{% show-in "core" %}}
# Write-optimized configuration
influxdb3 --num-io-threads=6 serve \
--exec-mem-pool-bytes=45GB \
--parquet-mem-cache-size=2048 \
--node-id=node0 \
--object-store=file \
--data-dir=~/.influxdb3
{{% /show-in %}}
{{% show-in "enterprise" %}}
# Write-optimized configuration
influxdb3 --num-io-threads=6 serve \
--datafusion-num-threads=10 \
--exec-mem-pool-bytes=45GB \
--parquet-mem-cache-size=2GB \
--node-id=node0 \
--cluster-id=cluster0 \
--object-store=file \
--data-dir=~/.influxdb3
{{% /show-in %}}
{{% show-in "core" %}}
# Query-optimized configuration
influxdb3 --num-io-threads=8 serve \
--exec-mem-pool-bytes=200GB \
--parquet-mem-cache-size=10240 \
--object-store-connection-limit=200 \
--node-id=node0 \
--object-store=file \
--data-dir=~/.influxdb3
{{% /show-in %}}
{{% show-in "enterprise" %}}
# Query-optimized configuration
influxdb3 --num-io-threads=8 serve \
--datafusion-num-threads=56 \
--exec-mem-pool-bytes=200GB \
--parquet-mem-cache-size=10GB \
--object-store-connection-limit=200 \
--node-id=node0 \
--cluster-id=cluster0 \
--object-store=file \
--data-dir=~/.influxdb3
{{% /show-in %}}
{{% show-in "enterprise" %}}
Dedicated ingest nodes require significant IO threads:
# High-throughput ingester (96 cores)
influxdb3 --num-io-threads=24 serve \
--mode=ingest \
--num-cores=96 \
--datafusion-num-threads=72 \
--force-snapshot-mem-threshold=90% \
--node-id=ingester0 \
--cluster-id=cluster0 \
--object-store=file \
--data-dir=~/.influxdb3
[!Warning] Without explicitly setting
--num-io-threads, a 96-core ingester uses only 2 cores for parsing line protocol, wasting 94% of available CPU for ingest operations.
Query nodes should maximize DataFusion threads:
# Query-optimized node (64 cores)
influxdb3 --num-io-threads=4 serve \
--mode=query \
--num-cores=64 \
--datafusion-num-threads=60 \
--exec-mem-pool-bytes=90% \
--parquet-mem-cache-size=4GB \
--node-id=query0 \
--cluster-id=cluster0 \
--object-store=file \
--data-dir=~/.influxdb3
Compaction is DataFusion-intensive:
# Dedicated compactor (32 cores)
influxdb3 --num-io-threads=2 serve \
--mode=compact \
--num-cores=32 \
--datafusion-num-threads=30 \
--node-id=compactor0 \
--cluster-id=cluster0 \
--object-store=file \
--data-dir=~/.influxdb3
# Note: --compaction-row-limit option is not yet released in v3.5.0
# Uncomment when available in a future release:
# --compaction-row-limit=1000000 \
{{% /show-in %}}
Configure the query execution memory pool:
# Absolute value in bytes
--exec-mem-pool-bytes=8589934592 # 8GB
# Percentage of available RAM
--exec-mem-pool-bytes=80% # 80% of system RAM
Guidelines:
Cache frequently accessed Parquet files:
# Set cache size
--parquet-mem-cache-size=2147483648 # 2GB
# Configure cache behavior
--parquet-mem-cache-prune-interval=1m \
--parquet-mem-cache-prune-percentage=20
Control memory pressure from write buffers:
# Force snapshot when memory usage exceeds threshold
--force-snapshot-mem-threshold=80%
# Configure WAL rotation
--wal-flush-interval=10s \
--wal-snapshot-size=100MB
{{% show-in "enterprise" %}}
For performance optimizations using dedicated ingest, query, compaction, or processing nodes, see Configure specialized cluster nodes. {{% /show-in %}}
For less common performance optimizations and detailed configuration options, see:
Advanced DataFusion runtime parameters:
Request size and network optimization:
--max-http-request-size - For large batches (default: 10 MB)--http-bind - Bind addressPerformance tuning for cloud object stores:
--object-store-connection-limit - Connection pool size--object-store-max-retries - Retry configuration--object-store-http2-only - Force HTTP/2For all available configuration options, see:
Server startup time scales with the number of snapshots stored in the object store. Snapshots accumulate over time and are not automatically deleted.
Without checkpointing, the server loads individual snapshots on startup.
The number of snapshots is determined by the lookback window
(gen1-lookback-duration,
default 1 month) divided by
gen1-duration
(default 10 minutes), with a minimum of 100.
With default settings, a long-running server can accumulate up to ~4,320
snapshots, causing slow restarts.
Two configuration options reduce startup time:
--checkpoint-interval--
periodically consolidates snapshot metadata into monthly checkpoints.
On startup, the server loads one to two checkpoints per calendar month,
then loads only snapshots created since the last checkpoint.--gen1-lookback-duration--
limits how far back the server loads gen1 file index metadata on startup.
Files outside this window still exist in object storage but are not indexed.[!Note] Enabling checkpointing does not delete old snapshots. They remain in object storage but are no longer needed for startup.
| Scenario | Recommended interval |
|---|---|
| Production servers | 1h |
| Development / testing | 10m |
influxdb3 serve --checkpoint-interval 1h
For all checkpoint configuration options, see checkpoint-interval.
# Linux: View per-thread CPU usage
top -H -p $(pgrep influxdb3)
# Monitor specific threads
watch -n 1 "ps -eLf | grep influxdb3 | head -20"
Monitor key indicators:
-- Query system.threads table (Enterprise)
SELECT * FROM system.threads
WHERE cpu_usage > 90
ORDER BY cpu_usage DESC;
-- Check write throughput
SELECT
count(*) as points_written,
max(timestamp) - min(timestamp) as time_range
FROM your_measurement
WHERE timestamp > now() - INTERVAL '1 minute';
Verify your tuning changes:
# Check effective configuration
influxdb3 serve --help-all | grep -E "num-io-threads|num-datafusion-threads"
# Monitor memory usage
free -h
watch -n 1 "free -h"
# Check IO wait
iostat -x 1
Symptoms:
Solutions:
--num-io-threads=16Symptoms:
Solutions:
{{% show-in "core" %}}1. Increase execution memory pool: --exec-mem-pool-bytes=90%
2. Enable Parquet caching: --parquet-mem-cache-size=4GB
3. Optimize query patterns (smaller time ranges, fewer fields){{% /show-in %}}
{{% show-in "enterprise" %}}1. Increase DataFusion threads: --datafusion-num-threads=30
2. Increase execution memory pool: --exec-mem-pool-bytes=90%
3. Enable Parquet caching: --parquet-mem-cache-size=4GB
4. Optimize query patterns (smaller time ranges, fewer fields){{% /show-in %}}
Symptoms:
Solutions:
--exec-mem-pool-bytes=60%--force-snapshot-mem-threshold=70%Symptoms:
Solutions: