swarmxq-startup-ops-architect

Configures Ollama CPU performance variables, RAM profile detection, and model warmup for SwarmXQ startup.

1|Updated Aug 25, 2026
One-click install
npx skills add https://github.com/sabiscore/swarmxq --skill swarmxq-startup-ops-architect-sabiscore
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: swarmxq-startup-ops-architect
Source: https://github.com/sabiscore/swarmxq/tree/main/.ai/skills/swarmxq-startup-ops-architect
Command: npx skills add https://github.com/sabiscore/swarmxq --skill swarmxq-startup-ops-architect-sabiscore

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Misconfigured Ollama CPU environment variables silently degrade every pipeline job's throughput, incorrect warmup sequencing adds 2-4 minutes of cold-start latency, and missing warmup status in the health endpoint makes the dashboard display wrong cold-start ETAs. ## Core Features & Use Cases - Canonical Startup Sequence: Enforces the exact 9-step boot order from reading /proc/meminfo through writing the warmup-status file and exiting with the correct code. - Ollama CPU Tuning: Governs OLLAMA_NUM_PARALLEL, OLLAMA_FLASH_ATTENTION, OLLAMA_KV_CACHE_TYPE, and OLLAMA_NUM_THREADS with per-variable rationale and validation checks. - RAM Profile Detection: Auto-detects 8 GB vs 16 GB host profiles via MemAvailable thresholds and gates Pilot pre-warming with a zero-token probe plus post-warmup RAM verification against FULL_PIPELINE_MIN_AVAILABLE_MB. - Use Case: When modifying startup-enhanced.sh or the /api/system/health endpoint, use this Skill to ensure the warmup status file is written, the dashboard reads coldStartEtaSecs from the API, and post-warmup RAM failures exit with code 1. ## Quick Start Ask the AI to review or modify startup-enhanced.sh so the 16 GB profile pre-warms the Pilot router and surfaces warmup status through /api/system/health.

Frequently Asked Questions about swarmxq-startup-ops-architect

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I configure Ollama environment variables for CPU-only inference?

Set OLLAMA_NUM_PARALLEL=1, OLLAMA_FLASH_ATTENTION=0, OLLAMA_KV_CACHE_TYPE=f16, and OLLAMA_NUM_THREADS=3 before Ollama loads any model. These variables are not hot-reloadable, so they must be exported in the startup script before the service starts.

How do I pre-warm an Ollama model to reduce cold-start latency?

Use a zero-token probe: run the model with an empty prompt and a scoped keep-alive, such as OLLAMA_KEEP_ALIVE=5m ollama run instruct-phi4-pro-q8-prod "". This forces the model into RAM without changing the global keep-alive default.

Why should OLLAMA_NUM_THREADS be 3 instead of 4 on WSL2?

WSL2 shares cores with the Windows host hypervisor, so using all 4 threads causes preemption stalls that reduce throughput by roughly 15 percent. On bare-metal Linux, set OLLAMA_NUM_THREADS=4 instead.

How does the dashboard know the cold-start ETA after startup?

The startup script writes a warmup-status JSON file containing coldStartEtaSecs (45 for pre-warmed 16 GB, 140 for cold 8 GB). The /api/system/health endpoint reads this file and the dashboard polls it rather than hard-coding a value.

What happens when post-warmup RAM falls below the minimum threshold?

If available RAM after Pilot warmup drops below FULL_PIPELINE_MIN_AVAILABLE_MB (6170 MB), startup-enhanced.sh exits with code 1 and logs an overload error. This prevents the pipeline from accepting jobs it cannot run safely.

When should flash attention be enabled for Ollama on CPU?

Only after a measured compatibility pass proves the active Ollama version and model set are stable. Q8 Phi-4 with flash attention has shown host-specific segfault risk, so the conservative default keeps OLLAMA_FLASH_ATTENTION=0 paired with KV cache type f16.