Skip to content
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

Don't offload serialization in scheduler #3776

Closed
mrocklin opened this issue May 5, 2020 · 1 comment · Fixed by #3793
Closed

Don't offload serialization in scheduler #3776

mrocklin opened this issue May 5, 2020 · 1 comment · Fixed by #3793
Assignees

Comments

@mrocklin
Copy link
Member

mrocklin commented May 5, 2020

Currently in TCP and UCX comms we offload serialization for large messages

if deserialize and FRAME_OFFLOAD_THRESHOLD and size > FRAME_OFFLOAD_THRESHOLD:
res = await offload(_from_frames)
else:
res = _from_frames()

The sizeof computation can be a little expensive, particularly when we run it on every message. This ends up taking around 10% of our time under some benchmarks

In the case of workers, this is probably fine (and maybe a good idea). However for the scheduler this is probably unnecessary. The scheduler tends to only store pre-serialized data, so the serialization process is just unpacking some Python objects and won't need to be done in a separate thread.

It would be good to skip offloading in the scheduler, but keep it in the workers.

Probably the place to specify this is in the Scheduler's ConnectionPool. However we'll want to be careful because not every Comm serializes and offloads. This maybe requires some sort of kwargs option? I'm not sure.

@mrocklin
Copy link
Member Author

mrocklin commented May 5, 2020

cc @kkraus14 @quasiben this may interest you and your team, especially since some of them already have some familiarity with Dask comms

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants