Skip to main content

Performance & Capacity Planning

This guide provides sizing recommendations, performance tuning options, and capacity planning guidance for DR-Syncer deployments.

Quick Reference​

ComponentDefaultRecommended RangeNotes
Controller CPU100m-500m100m-2000mScale with cluster count
Controller Memory128Mi-512Mi128Mi-2GiScale with resource count
Global Concurrency41-256Concurrent PVC syncs
Parallel Streams11-8Per-PVC rsync streams
Bandwidth LimitUnlimited1024-102400 KB/sNetwork throttling

Controller Sizing​

CPU and Memory Requirements​

The DR-Syncer controller resource needs scale with:

  • Number of remote clusters managed
  • Total resources being synchronized
  • Sync frequency (Continuous mode requires more resources)
  • Number of concurrent PVC sync operations

Sizing Matrix​

Cluster SizeResourcesRecommended CPURecommended Memory
Small1-2 clusters, <500 resources100m-200m128Mi-256Mi
Medium3-5 clusters, 500-2000 resources200m-500m256Mi-512Mi
Large5-10 clusters, 2000-10000 resources500m-1000m512Mi-1Gi
Enterprise10+ clusters, 10000+ resources1000m-2000m1Gi-2Gi

Helm Configuration​

# values.yaml
resources:
requests:
cpu: 200m
memory: 256Mi
limits:
cpu: 1000m
memory: 1Gi

Controller Tuning Parameters​

ParameterDefaultDescription
controller.maxConcurrentReconciles5Max concurrent reconciliations
controller.watch.bufferSize1024Watch event buffer size
controller.syncInterval5mInterval between scheduled syncs
controller.resyncPeriod1hFull resource resync period
# values.yaml
controller:
watch:
bufferSize: 2048
maxConcurrentReconciles: 10
syncInterval: "3m"
resyncPeriod: "30m"

PVC Sync Performance​

Concurrency Configuration​

DR-Syncer provides two levels of concurrency control:

Global Concurrency Limit​

Controls the maximum number of PVC sync operations running simultaneously across all NamespaceMappings for a cluster.

SettingDefaultRangeUse Case
globalConcurrencyLimit41-256Total concurrent syncs
apiVersion: dr-syncer.io/v1alpha1
kind: RemoteCluster
metadata:
name: dr-cluster
spec:
pvcSync:
enabled: true
globalConcurrencyLimit: 8 # Allow 8 concurrent PVC syncs

Per-NamespaceMapping Concurrency​

Controls concurrent syncs within a single NamespaceMapping:

apiVersion: dr-syncer.io/v1alpha1
kind: NamespaceMapping
metadata:
name: production-sync
spec:
pvcConfig:
dataSyncConfig:
concurrentSyncs: 2 # Default: 2

Concurrency Guidelines​

EnvironmentGlobal LimitPer-MappingNotes
Development2-41-2Conservative for shared resources
Production (standard)4-82-3Balanced performance
Production (high-bandwidth)8-163-4Dedicated network
Enterprise (dedicated)16-644-8Maximum throughput

Parallel Rsync Streams​

For large PVCs (10GB+), parallel rsync streams can significantly improve throughput by partitioning top-level directories across multiple concurrent rsync processes.

StreamsBest ForThroughput Improvement
1 (default)PVCs under 10GB, simple directory structureBaseline
2-3PVCs 10-50GB, moderate directory count1.5-2x
4-6PVCs 50-200GB, many top-level directories2-3x
7-8PVCs 200GB+, highly parallel workloads3-4x
apiVersion: dr-syncer.io/v1alpha1
kind: NamespaceMapping
metadata:
name: large-data-sync
spec:
pvcConfig:
dataSyncConfig:
parallelConfig:
streams: 4 # 4 parallel rsync processes
failureMode: "fail-all" # or "continue" for partial success

Stream Count Recommendations​

PVC SizeDirectory CountRecommended Streams
Under 10GBAny1 (default)
10-50GBUnder 102
10-50GB10-503
50-200GBUnder 203
50-200GB20-1004-6
200GB+50+6-8

Note: Stream count should not exceed the number of top-level directories in the PVC, as directories are partitioned across streams.


Network Bandwidth Planning​

Bandwidth Requirements​

Calculate required bandwidth based on:

  • Total data volume to sync
  • Sync frequency
  • Acceptable sync duration (RTO requirements)

Formula​

Required Bandwidth (MB/s) = Data Volume (GB) × 1024 / Sync Window (seconds)

Example Calculations​

Data VolumeSync WindowRequired Bandwidth
10 GB30 minutes~5.7 MB/s
100 GB1 hour~28.4 MB/s
500 GB4 hours~35.5 MB/s
1 TB8 hours~35.5 MB/s

Bandwidth Limiting​

Prevent DR sync from consuming all available bandwidth:

apiVersion: dr-syncer.io/v1alpha1
kind: NamespaceMapping
metadata:
name: production-sync
spec:
pvcConfig:
dataSyncConfig:
bandwidthLimit: 10240 # 10 MB/s (value in KB/s)
Network TypeRecommended LimitNotes
Shared 1 Gbps10240-51200 KB/s (10-50 MB/s)Leave headroom for production
Dedicated 1 Gbps102400 KB/s (100 MB/s)~80% utilization
Shared 10 Gbps102400-512000 KB/sConservative for shared
Dedicated 10 Gbps1024000 KB/s (1 GB/s)Maximum practical
Cross-region WAN5120-20480 KB/sConsider latency

Agent Resource Configuration​

Agent Pod Sizing​

The DR-Syncer agent runs as a DaemonSet on source cluster nodes. Size based on:

  • Number of PVCs per node
  • Concurrent sync operations
  • PVC sizes
apiVersion: dr-syncer.io/v1alpha1
kind: RemoteCluster
metadata:
name: source-cluster
spec:
pvcSync:
enabled: true
deployment:
resources:
requests:
cpu: "100m"
memory: "128Mi"
limits:
cpu: "500m"
memory: "512Mi"

Agent Sizing Matrix​

Node WorkloadCPU RequestMemory RequestCPU LimitMemory Limit
Light (1-5 PVCs)50m64Mi200m256Mi
Medium (5-20 PVCs)100m128Mi500m512Mi
Heavy (20+ PVCs)200m256Mi1000m1Gi

Rsync DaemonSet Pool​

The rsync DaemonSet pool runs on destination cluster nodes, eliminating per-sync pod startup overhead (1-5 minutes per sync).

apiVersion: dr-syncer.io/v1alpha1
kind: RemoteCluster
metadata:
name: dr-cluster
spec:
pvcSync:
rsyncDaemonSet:
enabled: true # Default: true
namespace: "dr-syncer-system"
image: "supporttools/dr-syncer-rsync:latest"

Benefit: Reduces sync initiation time from 1-5 minutes to under 10 seconds.


Performance Benchmarks​

Test Environment​

The following benchmarks were measured in a controlled environment:

  • 3-node Kubernetes clusters (source and destination)
  • 10 Gbps network connectivity
  • NVMe SSD storage
  • DR-Syncer v0.1.0

Throughput by Configuration​

ConfigurationThroughputNotes
Single stream, no limit80-100 MB/sNetwork-bound
4 parallel streams200-300 MB/sStorage-bound on most systems
8 parallel streams350-450 MB/sHigh-end storage required

Sync Duration by PVC Size​

PVC SizeSingle Stream4 Streams8 Streams
1 GB10-15 sec8-10 sec8-10 sec*
10 GB1.5-2 min40-60 sec30-45 sec
100 GB15-20 min6-8 min4-5 min
500 GB1.5-2 hours30-45 min20-30 min
1 TB3-4 hours1-1.5 hours45-60 min

*Small PVCs don't benefit from additional streams due to overhead.

Incremental Sync Performance​

After initial full sync, incremental syncs are significantly faster:

ScenarioDurationNotes
No changes5-30 secMetadata comparison only
1% changed files1-5 minRsync checksums changed blocks
10% changed files5-15 minProportional to change volume
50% changed files50-75% of full syncConsider full resync

Maximum Tested Configurations​

Validated Limits​

MetricTested MaximumNotes
Remote clusters50Per controller instance
NamespaceMappings500Across all clusters
Total synced resources100,000ConfigMaps, Secrets, Deployments, etc.
Concurrent PVC syncs64Per controller
PVC size5 TBSingle PVC
Total PVC data50 TBAcross all syncs

Scaling Guidelines​

For deployments exceeding these limits:

  1. Deploy multiple controller instances with separate cluster assignments
  2. Use namespace-based sharding across controllers
  3. Consider dedicated controllers for PVC-heavy workloads

Tuning Recommendations​

For Maximum Throughput​

# RemoteCluster
spec:
pvcSync:
globalConcurrencyLimit: 32
rsyncDaemonSet:
enabled: true

# NamespaceMapping
spec:
pvcConfig:
dataSyncConfig:
concurrentSyncs: 4
parallelConfig:
streams: 8
failureMode: "continue"
# No bandwidth limit

For Minimal Production Impact​

# RemoteCluster
spec:
pvcSync:
globalConcurrencyLimit: 2

# NamespaceMapping
spec:
pvcConfig:
dataSyncConfig:
concurrentSyncs: 1
bandwidthLimit: 10240 # 10 MB/s
parallelConfig:
streams: 2

For Large PVCs (100GB+)​

spec:
pvcConfig:
dataSyncConfig:
concurrentSyncs: 1 # Focus on single PVC at a time
timeout: "4h" # Extended timeout
parallelConfig:
streams: 6 # Parallel streams for throughput
failureMode: "fail-all"
snapshotConfig:
enabled: true # Point-in-time consistency
snapshotTimeout: "15m"

For Cross-Region/WAN​

spec:
pvcConfig:
dataSyncConfig:
concurrentSyncs: 1
bandwidthLimit: 5120 # 5 MB/s for WAN
timeout: "8h" # Extended timeout for WAN latency
parallelConfig:
streams: 2 # Limited streams for WAN
rsyncOptions:
- "--compress" # Enable compression for WAN

Monitoring Performance​

Key Metrics to Watch​

MetricWarning ThresholdCritical Threshold
Sync duration>2x baseline>5x baseline
Failed syncs>5%>10%
Queue depth>10 pending>50 pending
Controller memory>70% limit>90% limit

Performance Troubleshooting​

  1. Slow syncs: Check bandwidth limits, network latency, storage IOPS
  2. Queue buildup: Increase globalConcurrencyLimit or add controller replicas
  3. Timeout failures: Increase timeout values, add parallelStreams
  4. Memory pressure: Reduce concurrent syncs, increase memory limits

See Troubleshooting for detailed diagnostic procedures.