Advanced Parameters & Tuning

Memory pool sizing, transport tuning, guard-band, and failover configuration

Memory Pool Parameters

ParameterTypeDefaultDescription
memory_budget_mbint0LPDDR memory to donate to the pool in MB. 0 = all available RAM minus guard_band_mb. On a 12 GB device this is approximately 11.7 GB minus the 300 MB guard-band.
guard_band_mbint300Reserved headroom subtracted from the donatable pool. Keep at ≥ 200 MB on devices with 6 GB RAM or less; increase to 400–500 MB under heavy concurrent workloads to avoid Android LMK kills on worker nodes.
chunk_size_kbint256TCP transfer chunk size in KB. Smaller values lower peak memory on the receive side but increase syscall overhead. Recommended range: 64–1024 KB.
read_ahead_chunksint4Number of chunks to pipeline in flight simultaneously. Higher values improve throughput on low-latency LAN but consume more buffer memory.

Failover Parameters

ParameterTypeDefaultDescription
failover_pathstr'~/cluster_swap'Local UFS 3.1 directory used for storage-assisted failover. Ensure at least memory_budget_mb of free storage at this path.
failover_timeout_msint5000Time in milliseconds to wait before declaring a worker dead and activating flash failover. Decrease to speed up recovery; increase on unreliable Wi-Fi to reduce false failovers.
heartbeat_interval_msint1000Worker heartbeat period in ms. Workers that miss 5 consecutive heartbeats are declared dead.

GuardProxy / Authentication Parameters

ParameterTypeDefaultDescription
auth_secretstr''Shared HMAC-SHA256 pre-shared key. All master–worker connections are authenticated with this secret. Empty string disables authentication (development only; never deploy without a secret).
fail_fast_msfloat1.0Milliseconds to complete HMAC verification before rejecting the connection. Tuned to 1 ms to prevent timing oracle attacks.