-
-
Notifications
You must be signed in to change notification settings - Fork 719
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expose transfer-related metrics in Worker.get_metrics
and WorkerMetricCollector
#6936
Conversation
Unit Test ResultsSee test report for an extended history of previous test failures. This is useful for diagnosing flaky tests. 3 files - 12 3 suites - 12 0s ⏱️ - 6h 37m 28s For more details on these failures, see this check. Results for commit f247b24. ± Comparison against base commit 817ead3. ♻️ This comment has been updated with latest results. |
distributed/worker.py
Outdated
@@ -974,6 +974,7 @@ async def get_metrics(self) -> dict: | |||
"memory": spilled_memory, | |||
"disk": spilled_disk, | |||
}, | |||
comm_reserved_bytes=self.state.comm_nbytes, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Worth noting that on line 967 above,
in_flight=self.state.in_flight_tasks_count,
This is also strictly the number of incoming in-flight tasks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Outgoing traffic can be measured:
Worker.outgoing_current_count
for number of outgoing connections- there is no measure for outgoing number of bytes. However it's straightforward to add it to
Worker.get_data
:
distributed/distributed/worker.py
Line 1688 in 4cf9baf
nbytes = {k: self.state.tasks[k].nbytes for k in data if k in self.state.tasks}
(add to a total counter after the above line and remove the same amount in afinally
clause)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To clarify: it's OK to leave metering of outgoing traffic to a different PR.
However, within the scope of this PR, make it clear through naming that the "in flight tasks" and nbytes are specifically about incoming traffic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added transfer_outgoing_bytes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Regarding in_flight
: Can we safely rename this?
To recap our meeting:
comm:
incoming_bytes: #
incoming_count: #
incoming_cumulative_count: #
outgoing_bytes: #
outgoing_count: #
outgoing_cumulative_count: #
|
[EDIT] let's not drop the cumulative counter; they're free |
Updated naming after conversation on #6933 (comment)
Heartbeat will return transfer:
incoming_bytes_current: ...
etc. |
Note that the above list does not include
They would be new attributes, but I'd rather leave them for a future PR if and when we realize they're actually useful.
|
I will |
did you mean |
Regarding |
this makes sense |
Then let's go with |
Waiting for #6933 to get merged before giving this a once-over with fresh names. |
ff3ae35
to
f247b24
Compare
comm_nbytes
in Worker.get_metrics
and WorkerMetricCollector
Worker.get_metrics
and WorkerMetricCollector
Damn deadlocks everywhere... you're self referencing this issue ;) |
I guess we need to start linting comments, I don't see another way. |
98ba29c
to
15dce70
Compare
7d28792
to
efe0a62
Compare
Co-authored-by: crusaderky <crusaderky@gmail.com>
ty! |
Closes #6892
Worker.get_metrics
andWorkerMetricCollector
transfer_incoming_*
metricsOut of scope:
transfer_incoming_bytes
andtransfer_outgoing_bytes
to be added in a follow-up PRNotes:
outgoing
metrics appear to be rather awkward to test since the timing needs to be "just right".pre-commit run --all-files