Implement MonitoredChannel - #718
Merged
Merged
Conversation
Collaborator
Author
|
/unit_test |
Contributor
GiGL Automation@ 21:34:08UTC : 🔄 @ 21:35:52UTC : ✅ Workflow completed successfully. |
Contributor
GiGL Automation@ 21:34:10UTC : 🔄 @ 21:43:27UTC : ✅ Workflow completed successfully. |
Contributor
GiGL Automation@ 21:34:10UTC : 🔄 |
jchmura-sc
commented
Jul 23, 2026
jchmura-sc
commented
Jul 23, 2026
jchmura-sc
commented
Jul 29, 2026
jchmura-sc
enabled auto-merge
July 29, 2026 18:40
jchmura-sc
commented
Jul 29, 2026
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Jul 29, 2026
jchmura-sc
enabled auto-merge
July 29, 2026 22:52
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.
Purpose
The purpose of this PR is to add telemetry to our
ShmChannel.We want to know how many
SampleMessage's are in each of our channels at any given time, since an empty channel implies a blockingrecv, which implies a dataloader bottleneck. Conversely, if our channels stay comfortably above some low watermark then any changes upstream ofdataloader.__next__is unlikely to improve throughput.PR Changes
SizedShmChannel(ShmChannel): addsqsize()method toShmChannelby attaching to the channels memory region and inspecting the C++ struct layout. It calculates queue size as the delta between the circular buffer's write and read sequence numbers.MonitoredShmChannel(SizedShmChannel): a subclass that integrates with the GiGL metrics service, pushing theqsizeas a gauge on everyrecv()call.Usage (colocated)
gigl.src.common.utils.metrics_service_provider.initialize_metrics()GIGL_ENABLE_PERF_MONITORINGenv var to"True"or"1"Context (Colocated-Mode)
Each of our
Nreplicas launchN_localtraining workers. Each training worker initializes one or more data loaders (e.g.DistABLPLoader,DistNeighborLoader). Each dataloader is associated with aShmChannel. For a given dataloader, multiple sampling workers (e.g.DistNeighborSampler,DistPPRNeighborSampler) push data into the queue.The channel is roughly used like:
Challenge
There is no direct way to gauge the queue size since GLT's
ShmChanneldoes not expose the size to python.Updated Changelog.md? NO
Ready for code review?: YES