Advanced Parameters & Tuning
Lifecycle budget, Tailscale clustering, audit logging, and secret redaction
Lifecycle & Memory Budget Parameters
| Parameter | Type | Default | Description |
total_budget_mb | int | 0 | Combined RSS cap across all managed adapters in MB. 0 = unlimited (reliant on device RAM and Android LMK). Set to 70–80 % of device RAM for safe concurrent multi-adapter operation. |
load_timeout_s | float | 120.0 | Maximum seconds to wait for a COLD → HOT transition. Increase for large models (> 4 GB) on slower devices. Exceeding this raises LifecycleTimeoutError and transitions the adapter to ERROR. |
inference_timeout_s | float | 30.0 | Maximum seconds for a single .call() request. Prevents an ACTIVE adapter from stalling the orchestrator indefinitely. |
auto_unload_idle_s | float | 0 | Automatically unload an adapter after this many seconds of inactivity in HOT state. 0 = never auto-unload. Useful on low-RAM devices to reclaim memory between requests. |
Clustering (Tailscale / UDP PIN) Parameters
| Parameter | Type | Default | Description |
tailscale_key | str | '' | Tailscale auth key for mesh VPN overlay. Empty string disables distributed clustering; the orchestrator manages local adapters only. |
pin_pairing_port | int | 29501 | UDP port used for zero-config 6-digit PIN pairing. The master broadcasts a signed UDP beacon; workers enter the PIN to authenticate. |
pin_ttl_s | int | 300 | Time-to-live for a one-time PIN in seconds. After expiry, a new PIN is issued automatically. |
Audit Log Parameters
| Parameter | Type | Default | Description |
audit_log_path | str | '~/.ameva/audit.log' | File path for the tamper-evident SHA-256 hash-chained audit log. Each entry is linked to its predecessor's hash; run AuditChain.verify() to validate the chain. |
audit_max_size_mb | int | 100 | Maximum audit log file size before rotation in MB. Rotated logs are renamed with a timestamp suffix. |
redact_secrets | bool | True | Passes all log entries through SecretRedactor before writing. Prevents Bearer tokens, API keys, and URL credentials from appearing in the audit log. |