Repository navigation
fix: status() fetches the pool root without its children (#310) - #313
Merged
Merged
Conversation
pvestatd calls status() every ~10 s on every node for every storage, and each call made TrueNAS build the whole dataset tree under the pool. On a ~600-dataset pool with 8 nodes that kept middlewared at 300-400 % CPU and timed out alloc_image (reported in #309). status() now asks for the pool root via /pool/dataset/id/<pool> with extra.retrieve_children=false. It still reports the pool root, so PVE shows the same numbers. The /id/ form is required: CORE 13 ignores the option there, but answers [] when it is combined with an ?id= filter (verified live on CORE 13.0-U6.8, SCALE 25.04 and 25.10). The WS transport dropped query options entirely, so the option never reached SCALE 25.04+, the very versions that reported the load. _ws_query_opts now maps extra.* query parameters onto JSON-RPC query options for both pool.dataset.query mappings. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Operators on large pools see middlewared pinned and disk creation timing out with nothing pointing at the plugin. The README entry names the symptom, how to confirm pvestatd is the source, the fixed version, and where to report if 4.0.4 is not enough (#311 decides whether a cache is needed). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
5 tasks done
Owner
Author
|
Lab results, 2026-11-27, pve01 (PVE 9.2.21). CI build
|
TheGrandWazoo
marked this pull request as ready for review
November 27, 2026 14:45
This was referenced Nov 27, 2026
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #310 (phase 1). Phase 2 (optional cache) is tracked separately and conditionally in #311.
Problem
pvestatdcallsstatus()every ~10 s, on every node, for every storage. Each call ranGET /pool/dataset?id=<pool>, which makes TrueNAS build the whole dataset tree under the pool. On a ~600-dataset pool with 8 nodes, that keptmiddlewaredat 300–400 % CPU and madealloc_imagetime out (reported in #309 by @esaudet).Fix
status()now callsGET /pool/dataset/id/<pool>?extra.retrieve_children=false. It still reports the pool root, so the numbers PVE shows don't change._ws_query_optsmapsextra.*query params (withtrue/falseas JSON booleans) into the options of bothpool.dataset.querymappings. Callers with noextra.*params still send{}./id/form: verified live, read-only, from pve01 on 2026-11-26:/id/<pool>?extra.retrieve_children=false?id=<pool>&extra.retrieve_children=false[]WebSocket
pool.dataset.querywith{extra: {retrieve_children: false}}, pool-root payload:These lab pools have only a handful of datasets. The saving scales with the number of datasets.
Testing
prove t/: 65 tests pass, including the newt/status.t(status call shape, missing pool, WS option mapping, unchanged options for other callers)pvesm statusand a full cycle on CORE (.90 REST), Scale01 (.91 WS), Scale2504-Tank01 + Multipath (.92 WS); check that the numbers match 4.0.3middlewaredCPU before and after (decides perf: optional in-memory cache for status() (#310 phase 2, conditional) #311)Docs
[Unreleased] — 4.0.4🤖 Generated with Claude Code