Skip to content

docs(resource-groups): document Enterprise 4.2.2 CPU policies and group selection - #631

Open
kafka1991 wants to merge 6 commits into
mainfrom
ent_resource_group2
Open

kafka1991 wants to merge 6 commits into
mainfrom
ent_resource_group2

Conversation

@kafka1991

@kafka1991 kafka1991 commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Document the resource group updates in QuestDB Enterprise 4.2.2. Operators can cap a group's query CPU, choose how its users share that CPU, and authorize clients to choose a group for selected work.

CPU limits and scheduling

  • Add cpu_limit and scheduling_policy to the CREATE RESOURCE GROUP and ALTER RESOURCE GROUP references. Explain how percentages convert to cores, how whole-core limits cap worker count, and how a fractional limit uses a refilling CPU budget.
  • Describe parallel query behavior under a cap, including single-threaded work at limits of one core or less. Cover CREATE TABLE ... AS SELECT holding its worker, the exception that can let one parallel task exceed the worker cap, and the CPU accounting for copies in uncapped groups.
  • Explain fifo order and how fair allocates workers by user and then by query. Under fair, the next admission slot goes to a queued user with the fewest admitted queries.
  • Clarify when CPU scheduling engages. A CPU cap or fair policy is sufficient even when DEFAULT is the only group. Idle time accrues zero scheduling credit or debt, and an admitted query keeps its slot while waiting for CPU.

Group selection and access

  • Add the SET RESOURCE GROUP and RESET RESOURCE GROUP reference for PostgreSQL and QWP egress. Document the resource_group parameter for /api/v1/sql/execute, connection reuse and reconnect behavior, and the mapped group used by COPY ... TO and /exp exports.
  • Document resource-group grants and revokes at group and database scope. Cover checks at the start of managed queries and how a revoke, rename, or drop affects sessions that already selected a group. Update the principal-mapping commands and the RBAC reference.

Operations and inspection

  • Add examples for a capped tenant, a team sharing a group fairly, one account sending urgent and routine work, and operators who need a protected share. Expand troubleshooting for CPU waits, group selection errors, and scheduler degradation.
  • Document the four new resource_groups() columns cpu_min_share_pct, cpu_limit_pct, cpu_limit_cores, and scheduling_policy. Explain how to read the configured weight share alongside the CPU cap, and update the current_resource_group() and active_grants() references.
  • Explain how the Prometheus gauges distinguish policies that require CPU scheduling from a degraded scheduler. In degraded mode, admission and memory limits apply while CPU weights, caps, and fair scheduling are suspended until restart.

Upgrade and schema replay

  • Add the 4.2.2 upgrade guidance. Existing groups start with fifo and an unlimited CPU cap. Document the native memory reserved for reduce queues and how a replica upgraded first reads the older group catalog until the primary adds the new columns.
  • Clarify resource group restore steps in the SHOW CREATE DATABASE replay notes and the schema-copy cookbook. Recreate custom groups, reapply DEFAULT settings and principal mappings, and rerun grants on individual groups after replay. The PERMISSIONS output includes database-wide resource-group grants.
  • Add the November changelog entries and link them to the 4.2.2 upgrade section.

Dependencies

Target the QuestDB Enterprise 4.2.2 release. The companion engine changes are in questdb/questdb#8146.

…ESOURCE GROUP

Document the resource group features of QuestDB Enterprise 4.2.0: the
cpu_limit and scheduling_policy parameters, the new resource_groups()
columns, SET and RESET RESOURCE GROUP with the resource_group parameter of
/execute, and the USE RESOURCE GROUP permission. Correct when CPU scheduling
engages and how the parallel tasks of CREATE TABLE AS SELECT are charged.
@github-actions

github-actions Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

🚀 Build success!

Latest successful preview: https://preview-631--questdb-documentation.netlify.app/docs/

Commit SHA: 0db515a

📦 Build generates a preview & updates the link on each commit.

- Revoking one group leaves a database-level USE RESOURCE GROUP grant in
  force; say so on the GRANT, REVOKE and SET RESOURCE GROUP pages.
- The session or request choice does not reach COPY ... TO, /exp or QWP
  queries, and only connection pools that reset sessions clear it.
- cpu_min_share_pct ignores CPU limits, a limit only caps, and whole-core
  limits have no budget; document the one-task waiver on the concept page.
- A degraded scheduler stops enforcing limits and fair as well as weights,
  the built-in admin always runs in DEFAULT, and dropping or renaming a
  group affects USE grants and sessions that chose it.
- Fix the CTAS charging paragraph, the COPY classification, admission slot
  holding, case-sensitive group names and several stale statements.
@kafka1991 kafka1991 changed the title docs(resource-groups): document CPU limits, fair scheduling and SET RESOURCE GROUP docs(resource-groups): document Enterprise 4.2.2 CPU policies and group selection Nov 20, 2026
# Conflicts:
#	documentation/changelog.mdx
#	documentation/operations/resource-groups.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant