-
Notifications
You must be signed in to change notification settings - Fork 60
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
Measure GIL contention in benchmarks #937
Measure GIL contention in benchmarks #937
Conversation
Add argument to measure and report GIL contention in benchmarks. This may provide some useful insight when optimizing asyncio-related changes.
This is really cool! Can you describe what the output results are ? Is it time, a ratio, etc ? |
It is a ratio of the perceived time the user code (in this case, UCX-Py send/recv messages) had the GIL. Thus 0.0 would mean the user code never took the GIL, whereas 1.0 would mean the user code had the GIL for the entirety of time without releasing it. |
This looks neat! The Dask dashboard has a plot for this too, it's under the "more" list and is called "Contention". There were some performance implications with |
Yes, Ben pointed me to that, and that's where I stole the idea from. |
/ok to test |
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.
Minor nits, looks good though.
Interested to know how contended things are.
Co-authored-by: Lawrence Mitchell <[email protected]>
Not sure if you mean something different, but I reported contention numbers in the description. Did you overlook that or are you asking for something else? |
/ok to test |
Oh no, I'm just blind... |
Thanks @wence- ! |
/merge |
Add argument to measure and report GIL contention in benchmarks. This may provide some useful insight when optimizing asyncio-related changes.
Sample results observed are below.
Small messages (1 B)
Medium messages (1 MiB)
Large messages (1 GiB)