-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
Call ray.put in ray.init() to speed up first object store access. #5685
Conversation
Test FAILed. |
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.
LGTM. The behavior with the plasma client is odd, though.
Jenkins, retest this please. |
Test FAILed. |
Jenkins, retest this please. |
Should we also do
to warm up the workers? That might be overkill but otherwise we spend a lot of time waiting for workers to start as well. |
Test FAILed. |
Re: plasma put, maybe that's because ray put also does a get afterwards to pin the object. |
@ericl good question, the |
Let's hold off on merging, some initial commands are still taking longer than expected, and I need to investigate that. EDIT: The issue was just that I was testing on the wrong branch. |
@ericl I confirmed that this PR also warms up the workers. |
One problem that users often run into is that the first time they do something with Ray it is very slow. The second time is much faster. This applies to the first usage of any worker and not just the driver. The reason is that the first time a driver or worker accesses the object store (e.g., by calling
ray.put
or by completing a task), it takes about half a second (presumably to memory map the a large file).Note that instead of calling
ray.put
, I tried just callingplasma_client.put
instead. However, that only sped things up by a factor of 2.Before this PR: The timed line takes 500+ milliseconds.
Using plasma_client.put instead of ray.put: The timed line takes 250+ milliseconds (I'm not 100% sure why).
After this PR: The timed line takes 700 microseconds.
Note that
ray.init()
gets slower in this PR.It's important that this happens on workers as well as the driver.