Performance Tuning
Optimize Dits for maximum performance in your specific use case. Learn about tuning chunking algorithms, storage backends, and network settings.
Performance First
Dits is designed to be fast by default. These tuning options are for advanced users who need to optimize for specific workloads.
Chunking Performance
Chunk Size Optimization
Balance between deduplication and overhead
Smaller chunks increase deduplication but add metadata overhead. Larger chunks reduce overhead but may miss deduplication opportunities.
Small files (<1MB)
4KB-16KB chunksLarge files (>100MB)
64KB-256KB chunksVideo/Media
1MB-4MB chunksAlgorithm Selection
Choose the right chunking algorithm
Fixed-size chunking
Fastest, best for static content
Content-defined chunking
Better deduplication, handles insertions well
FastCDC
Recommended default - balanced performance
Storage Backend Tuning
Local Storage Optimization
Filesystem Choices
- XFS: Best for large files and high concurrency
- ext4: Good general purpose choice
- Btrfs: Built-in compression and snapshots
- ZFS: Maximum data integrity
I/O Settings
- Use SSD/NVMe for hot data
- Enable write caching
- Tune I/O scheduler for workload
- Consider RAID for throughput
Configuration Examples
High-Performance Configuration
# dits.toml - High performance settings
[chunks]
algorithm = "fastcdc"
min_size = "32KB"
avg_size = "64KB"
max_size = "256KB"
parallel_workers = 8
[storage]
type = "local"
path = "/fast-ssd/dits"
cache_size = "8GB"
write_buffer = "256MB"
[network]
max_connections = 1000
buffer_size = "4MB"
compression = "lz4"
[cache]
enabled = true
size = "4GB"
eviction = "lru"Low-Memory Configuration
# dits.toml - Memory-constrained settings
[chunks]
algorithm = "fixed"
size = "64KB"
parallel_workers = 2
[storage]
type = "local"
cache_size = "256MB"
write_buffer = "32MB"
[cache]
enabled = true
size = "512MB"
aggressive_eviction = trueMonitoring Performance
Latency Metrics
- Chunk read/write time
- Hash computation time
- Network round-trip
- Database query time
Throughput Metrics
- MB/s upload rate
- MB/s download rate
- Chunks processed/sec
- Deduplication ratio
Resource Usage
- CPU utilization
- Memory consumption
- Disk I/O wait
- Network bandwidth
Benchmarking
Use the built-in benchmarking tool to measure performance:
# Run comprehensive benchmark
dits benchmark --all
# Test specific operations
dits benchmark --chunking --file large-file.bin
dits benchmark --network --remote origin
dits benchmark --storage --size 10GBPerformance Profiling
Enable the built-in profiler with
dits --profile to identify bottlenecks in your specific workflow.