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
| "memory": spilled_memory, | ||
| "disk": spilled_disk, | ||
| }, | ||
| comm_reserved_bytes=self.state.comm_nbytes, |
There was a problem hiding this comment.
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.
Outgoing traffic can be measured:
Worker.outgoing_current_countfor 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
(add to a total counter after the above line and remove the same amount in afinallyclause)
There was a problem hiding this comment.
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.
Added transfer_outgoing_bytes
There was a problem hiding this comment.
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 WorkerMetricCollectorWorker.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_metricsandWorkerMetricCollectortransfer_incoming_*metricsOut of scope:
transfer_incoming_bytesandtransfer_outgoing_bytesto be added in a follow-up PRNotes:
outgoingmetrics appear to be rather awkward to test since the timing needs to be "just right".pre-commit run --all-files