Skip to content

Emit Quent events for cudf-polars memory reservation. - #24038

Draft
TomAugspurger wants to merge 3 commits into
NVIDIA:mainfrom
TomAugspurger:tom/quent-resources+memory-reservation
Draft

Emit Quent events for cudf-polars memory reservation.#24038
TomAugspurger wants to merge 3 commits into
NVIDIA:mainfrom
TomAugspurger:tom/quent-resources+memory-reservation

Conversation

@TomAugspurger

Copy link
Copy Markdown
Contributor

Description

This updates our emitted Quent telemetry to better track memory reservations. I've added a wrapper around rapidsmpf.streaming.core.memory_reserve_or_wait.reserve_memory that includes

  • the reservation size
  • the memory tier
  • the net memory delta
  • the sequence number

Like any other Quent event, this can be tied back to an individual Operator (cudf-polars Actor).

@copy-pr-bot

copy-pr-bot Bot commented Sep 8, 2026

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@github-actions github-actions Bot added Python Affects Python cuDF API. cudf-polars Issues specific to cudf-polars labels Sep 8, 2026
Comment thread python/cudf_polars/cudf_polars/quent/_context.py Outdated
Comment thread python/cudf_polars/cudf_polars/quent/_context.py Outdated
This emits the following events:

- queueing
- allocating (with the Quent Processor for the current thread)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a note: making a memory reservation is async in python, so this will to be running on the asyncio event loop, concurrently with many other things. I think this is the right way to model this in Quent, but we'll want to double check that. We aren't really consuming CPU resources to run this task.

Comment thread python/cudf_polars/cudf_polars/quent/_context.py
Comment thread python/cudf_polars/cudf_polars/quent/_types.py Outdated
Comment on lines +906 to +908
purpose
What the memory is reserved for (e.g. ``"scan"``). Distinguishes
reservations made by a single operator.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like to understand this better: what operators make multiple reservations?

Requiring this might not be smart. Then we'll end up with redundant info in the telemetry like "The Scan operator reserved memory for a scan."

And perhaps this could be an enum rather than an arbitrary string, to make things easier for consumers of the output.

Comment thread python/cudf_polars/cudf_polars/quent/_types.py Outdated
Comment thread python/cudf_polars/cudf_polars/quent/_types.py Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cudf-polars Issues specific to cudf-polars Python Affects Python cuDF API.

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

1 participant