swarmxq-startup-ops-architect

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

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Misconfigured Ollama CPU environment variables silently degrade every pipeline job's throughput, and a missing warmup sequence adds 2-4 minutes of cold-start latency to the first job. This Skill governs the entire SwarmXQ startup sequence so the host boots into the correct RAM profile with verified post-warmup headroom. ## Core Features & Use Cases - Canonical Startup Sequence: Enforces the exact 9-step order from reading /proc/meminfo through writing the warmup-status file and exiting ready or overloaded. - Ollama CPU Tuning: Sets OLLAMA_NUM_PARALLEL, OLLAMA_FLASH_ATTENTION, OLLAMA_KV_CACHE_TYPE, and OLLAMA_NUM_THREADS with documented rationale for WSL2 versus bare-metal hosts. - RAM Profile Detection: Auto-detects 8 GB versus 16 GB profiles via MemAvailable thresholds and gates Pilot pre-warm with a zero-token probe plus FULL_PIPELINE_MIN_AVAILABLE_MB verification. - Health Endpoint Integration: Surfaces warmup status and cold-start ETA through /api/system/health so the dashboard never hard-codes ETA values. - Use Case: When modifying startup-enhanced.sh or the server boot sequence, use this Skill to validate that CPU safety vars are set before any model load and that post-warmup RAM checks block job acceptance on overloaded hosts. ## Quick Start Ask the AI to review startup-enhanced.sh and verify the Ollama CPU performance variables, RAM profile detection, and warmup-status file integration against the canonical startup sequence.

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 for CPU-only inference performance?

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 detect available RAM and switch profiles in a bash startup script?

Read MemAvailable from /proc/meminfo with awk and compare it against a threshold such as 12288 MB. Below the threshold activate the constrained 8 GB profile with OLLAMA_MAX_LOADED_MODELS=1; above it enable the 16 GB profile with two resident models and Pilot pre-warm.

Why should OLLAMA_NUM_PARALLEL stay at 1 on CPU-only hosts?

A CPU has a single effective inference thread, so setting NUM_PARALLEL above 1 makes Ollama context-switch between queued requests and halves throughput with no latency benefit. More RAM does not create more inference threads on CPU.

Why use OLLAMA_NUM_THREADS=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 the script should use 4 threads instead.

How do I surface model warmup status through a health endpoint?

Have the startup script write a JSON warmup-status file containing profile, pilotWarmed, and coldStartEtaSecs, then read it in the /api/system/health handler. When the file is absent, return a conservative fallback ETA of 140 seconds.

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

The startup script compares post-warmup MemAvailable against FULL_PIPELINE_MIN_AVAILABLE_MB (6170 MB) and exits with code 1 if insufficient. This blocks job acceptance on overloaded hosts before the first pipeline job runs.