openclaw - ✅(Solved) Fix Performance: chain of issues causing excessive CPU/event-loop saturation on low-power hosts [1 pull requests, 5 comments, 4 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#76188Fetched 2026-05-03 04:41:06
View on GitHub
Comments
5
Participants
4
Timeline
15
Reactions
3
Author
Assignees
Timeline (top)
commented ×5cross-referenced ×4subscribed ×2assigned ×1

This issue documents a chain of compounding performance problems that collectively make OpenClaw unusable on low-power hardware (Pi, NUC, homelab mini-PCs). Each issue is independently harmful, but together they cause full CPU saturation and event-loop delays of 30+ seconds.

Related to: #76096 (node.list blocks event loop when orphaned agent directories exist)


Error Message

[WARN] liveness warning: reasons=event_loop_delay eventLoopDelayMaxMs=36641.4 eventLoopUtilization=0.864

Root Cause

Impact: The core-plugin-tools prep stage takes ~40 seconds on every single agent invocation because it loads tools from all 69 plugins. Measured on a Celeron N4000 with eMMC:

core-plugin-tools:39657ms@39688ms   # every agent run
core-plugin-tools:39759ms@40570ms

After manually disabling 57 unused plugins (leaving 13 active), this stage dropped to near-zero.

Fix Action

Fix / Workaround

Before / After (all mitigations applied)

PR fix notes

PR #76277: fix: reduce WebUI session latency churn

Description (problem / solution / changelog)

Summary

  • avoid a full Control UI sessions.list reload when a message-phase sessions.changed payload already patched local session state
  • pass known sessionKey through file-only transcript update events so Gateway event handling can skip transcript-file-to-session lookup on hot paths
  • make media generation provider discovery lazy for explicit image/video/music model config, including the music execution path without reference-image validation

Root Cause

The latency cluster mixed several hot-path costs: UI-side full list invalidation on message updates, Gateway transcript update events without session keys, and eager provider/tool materialization even when explicit generation model config already selected the provider/model.

Validation

  • pnpm test ui/src/ui/app-gateway.sessions.node.test.ts
  • pnpm test src/gateway/session-transcript-key.test.ts src/gateway/session-message-events.test.ts
  • pnpm test src/agents/tools/media-tool-shared.test.ts src/agents/tools/image-generate-tool.test.ts src/agents/tools/video-generate-tool.test.ts src/agents/tools/music-generate-tool.test.ts
  • pnpm test ui/src/ui/app-gateway.sessions.node.test.ts src/agents/pi-embedded-runner/compact.hooks.test.ts src/agents/pi-embedded-runner/transcript-rewrite.test.ts src/agents/pi-embedded-runner/tool-result-truncation.test.ts src/agents/tools/image-generate-tool.test.ts src/agents/tools/video-generate-tool.test.ts src/agents/tools/music-generate-tool.test.ts
  • pnpm exec oxfmt --check --threads=1 ...
  • pnpm check:changelog-attributions
  • Testbox: OPENCLAW_TESTBOX=1 pnpm check:changed

Triage Notes

prtags auth is valid, but prtags group list/search returned 502 during triage, so no duplicate group or gated @clawsweeper comment was written yet.

Refs https://github.com/openclaw/openclaw/issues/76236 Refs https://github.com/openclaw/openclaw/issues/76203 Refs https://github.com/openclaw/openclaw/issues/76188 Refs https://github.com/openclaw/openclaw/issues/76107 Refs https://github.com/openclaw/openclaw/issues/76166

Changed files

  • CHANGELOG.md (modified, +1/-0)
  • docs/nodes/audio.md (modified, +0/-1)
  • docs/providers/arcee.md (modified, +12/-12)
  • docs/web/control-ui.md (modified, +0/-2)
  • docs/web/webchat.md (modified, +1/-2)
  • extensions/arcee/index.test.ts (modified, +0/-176)
  • extensions/arcee/index.ts (modified, +7/-12)
  • extensions/arcee/models.ts (modified, +5/-4)
  • extensions/arcee/provider-catalog.ts (modified, +28/-10)
  • extensions/arcee/provider-policy-api.test.ts (removed, +0/-73)
  • extensions/arcee/provider-policy-api.ts (removed, +0/-11)
  • extensions/arcee/provider-policy.ts (removed, +0/-132)
  • scripts/openclaw-npm-release-check.ts (modified, +10/-8)
  • src/agents/command/attempt-execution.ts (modified, +1/-1)
  • src/agents/pi-embedded-runner/compact.hooks.test.ts (modified, +12/-3)
  • src/agents/pi-embedded-runner/compaction-hooks.ts (modified, +1/-1)
  • src/agents/pi-embedded-runner/tool-result-truncation.test.ts (modified, +6/-0)
  • src/agents/pi-embedded-runner/tool-result-truncation.ts (modified, +8/-2)
  • src/agents/pi-embedded-runner/transcript-rewrite.test.ts (modified, +1/-1)
  • src/agents/pi-embedded-runner/transcript-rewrite.ts (modified, +4/-1)
  • src/agents/tools/image-generate-tool.test.ts (modified, +51/-6)
  • src/agents/tools/image-generate-tool.ts (modified, +12/-2)
  • src/agents/tools/media-tool-shared.ts (modified, +11/-3)
  • src/agents/tools/music-generate-tool.test.ts (modified, +57/-0)
  • src/agents/tools/music-generate-tool.ts (modified, +28/-10)
  • src/agents/tools/video-generate-tool.test.ts (modified, +53/-0)
  • src/agents/tools/video-generate-tool.ts (modified, +15/-2)
  • src/commands/channel-setup/plugin-install.test.ts (modified, +2/-2)
  • src/commands/onboarding-plugin-install.test.ts (modified, +5/-133)
  • src/commands/onboarding-plugin-install.ts (modified, +3/-8)
  • src/config/sessions/transcript.test.ts (modified, +4/-1)
  • src/config/sessions/transcript.ts (modified, +1/-1)
  • src/flows/channel-setup.status.test.ts (modified, +8/-99)
  • src/flows/channel-setup.status.ts (modified, +9/-9)
  • src/flows/channel-setup.test.ts (modified, +3/-75)
  • src/flows/channel-setup.ts (modified, +4/-5)
  • src/gateway/method-scopes.ts (modified, +0/-1)
  • src/gateway/server-methods-list.ts (modified, +0/-1)
  • src/gateway/server-methods.ts (modified, +0/-2)
  • src/gateway/server-methods/chat-transcribe-audio.runtime.ts (removed, +0/-1)
  • src/gateway/server-methods/chat-transcribe-audio.test.ts (removed, +0/-123)
  • src/gateway/server-methods/chat-transcribe-audio.ts (removed, +0/-125)
  • src/image-generation/runtime-types.ts (modified, +1/-0)
  • src/image-generation/runtime.test.ts (modified, +40/-0)
  • src/image-generation/runtime.ts (modified, +1/-0)
  • src/music-generation/runtime-types.ts (modified, +1/-0)
  • src/music-generation/runtime.test.ts (modified, +37/-0)
  • src/music-generation/runtime.ts (modified, +1/-0)
  • src/plugins/install.npm-spec.test.ts (modified, +0/-55)
  • src/plugins/install.ts (modified, +2/-23)
  • src/plugins/tool-descriptor-cache.test.ts (modified, +47/-1)
  • src/plugins/tool-descriptor-cache.ts (modified, +14/-3)
  • src/plugins/tools.optional.test.ts (modified, +49/-0)
  • src/video-generation/runtime-types.ts (modified, +1/-0)
  • src/video-generation/runtime.test.ts (modified, +37/-0)
  • src/video-generation/runtime.ts (modified, +1/-0)
  • ui/src/styles/chat/layout.css (modified, +0/-9)
  • ui/src/ui/app-chat.test.ts (modified, +0/-63)
  • ui/src/ui/app-chat.ts (modified, +0/-67)
  • ui/src/ui/app-gateway.sessions.node.test.ts (modified, +64/-1)
  • ui/src/ui/app-gateway.ts (modified, +17/-3)
  • ui/src/ui/app-lifecycle.node.test.ts (modified, +0/-3)
  • ui/src/ui/app-lifecycle.ts (modified, +0/-2)
  • ui/src/ui/app-render.ts (modified, +0/-3)
  • ui/src/ui/app-view-state.ts (modified, +1/-4)
  • ui/src/ui/app.test.ts (removed, +0/-205)
  • ui/src/ui/app.ts (modified, +0/-132)
  • ui/src/ui/controllers/sessions.test.ts (modified, +63/-1)
  • ui/src/ui/controllers/sessions.ts (modified, +17/-5)
  • ui/src/ui/views/chat.test.ts (modified, +1/-40)
  • ui/src/ui/views/chat.ts (modified, +10/-50)

Code Example

core-plugin-tools:39657ms@39688ms   # every agent run
core-plugin-tools:39759ms@40570ms

---

[WARN] liveness warning: reasons=event_loop_delay eventLoopDelayMaxMs=36641.4 eventLoopUtilization=0.864
RAW_BUFFERClick to expand / collapse

Overview

This issue documents a chain of compounding performance problems that collectively make OpenClaw unusable on low-power hardware (Pi, NUC, homelab mini-PCs). Each issue is independently harmful, but together they cause full CPU saturation and event-loop delays of 30+ seconds.

Related to: #76096 (node.list blocks event loop when orphaned agent directories exist)


Issue Chain

1. 69 plugins enabled by default — all loaded into every agent run

All stock provider plugins are enabled out-of-the-box, including dozens of providers with no credentials configured (alibaba, amazon-bedrock, arcee, byteplus, cerebras, chutes, deepinfra, deepseek, fireworks, groq, kimi, litellm, lmstudio, minimax, mistral, moonshot, nvidia, ollama, qianfan, qwen, tencent, together, venice, vllm, volcengine, xai, xiaomi, zai, and more).

Impact: The core-plugin-tools prep stage takes ~40 seconds on every single agent invocation because it loads tools from all 69 plugins. Measured on a Celeron N4000 with eMMC:

core-plugin-tools:39657ms@39688ms   # every agent run
core-plugin-tools:39759ms@40570ms

After manually disabling 57 unused plugins (leaving 13 active), this stage dropped to near-zero.

Fix: Either lazy-load plugin tools on first use, or do not enable provider plugins that have no credentials/config. A provider with no API key configured contributes zero value to the agent context.


2. Plugin runtime deps re-staged on every config hot-reload

Plugin staging ([plugins] acpx staging bundled runtime deps (45 specs)) fires not only on startup but on every config hot-reload. On a gateway that hot-reloads frequently (e.g. due to active config management), this repeatedly hammers slow storage.

Impact: Each staging round causes a liveness warning burst:

[WARN] liveness warning: reasons=event_loop_delay eventLoopDelayMaxMs=36641.4 eventLoopUtilization=0.864

Fix: Skip staging if the runtime-deps snapshot hash matches the current version.


3. Workspace directory scanned on every sessions.list / node.list call

The workspace directory (~/.openclaw/workspace/) is scanned recursively on every sessions.list and node.list RPC call. If the workspace contains large projects (e.g. a Python venv, Node.js project with node_modules, build artifacts), the I/O cost is enormous on slow eMMC/SD storage.

Measured:

  • sessions.list: 4–8 seconds per call
  • node.list: 7–48 seconds per call (see also #76096)

Workspace contained: a 2.8 GB Python project with .venv, an 828 MB Node.js project, and several other large dirs — totalling 4.3 GB. After moving them out, workspace dropped to 9 MB and call times normalized.

Fix: Do not recurse into workspace project subdirectories when listing sessions/nodes. Only index the top-level session metadata, not full directory trees.


4. No low-power host defaults

The doctor command recommends NODE_COMPILE_CACHE and OPENCLAW_NO_RESPAWN=1 for "small hosts (Pi/VM)" — but only after the fact. The default config ships with subagents.maxConcurrent: 8 and agents.defaults.maxConcurrent: 4, which spawns up to 12 concurrent Node processes on a 2-core 1.1 GHz machine.

Impact: Instant CPU saturation when any multi-step task runs.

Fix: Ship a low-power profile, or detect core count at startup and cap concurrency accordingly.


Environment

  • OpenClaw: 2026.4.29 (a448042)
  • OS: Ubuntu, Linux 6.8.0-111-generic x86_64
  • CPU: Intel Celeron N4000 @ 1.10GHz, 2 cores
  • Storage: eMMC (mmcblk0)
  • Node.js: 25.5.0

Before / After (all mitigations applied)

MetricBeforeAfter
Plugins loaded6913
Workspace size4.3 GB9 MB
eventLoopDelayMaxMs36,000 ms~1,700 ms
Event loop utilization100%~7%
Gateway CPU at idle85–100%~13%
System load average3.50.59
core-plugin-tools stage~40,000 ms~0 ms
node.list RPC7–48 s<300 ms

Suggested priority

  1. Do not enable provider plugins with no credentials (highest impact, trivial fix)
  2. Skip plugin staging when version hash unchanged (reduces reload cost)
  3. Do not recurse workspace subdirs in session/node listing (correctness + perf)
  4. Cap default concurrency based on detected core count (prevents new-user foot-gun)

extent analysis

TL;DR

Disable unused provider plugins and implement lazy-loading to reduce CPU saturation and event-loop delays.

Guidance

  • Identify and disable unused provider plugins to prevent unnecessary loading of plugin tools, which can take up to 40 seconds on low-power hardware.
  • Implement lazy-loading of plugin tools to only load them when needed, reducing the load time.
  • Consider skipping plugin staging when the runtime-deps snapshot hash matches the current version to reduce the cost of config hot-reloads.
  • Review the workspace directory scanning on every sessions.list and node.list call to optimize performance.

Example

No code example is provided as the issue does not require a specific code change, but rather a configuration and optimization approach.

Notes

The provided information suggests that the issue is related to performance problems on low-power hardware, and the suggested fixes are aimed at reducing CPU saturation and event-loop delays. However, the exact implementation details may vary depending on the specific OpenClaw version and configuration.

Recommendation

Apply the suggested fixes, starting with disabling unused provider plugins and implementing lazy-loading, to improve performance on low-power hardware. This approach is recommended as it addresses the highest impact issue and is a relatively trivial fix.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING