Skip to content

[Serve] Improve Serialization#7688

Merged
simon-mo merged 2 commits intoray-project:masterfrom
simon-mo:serve/improv-serialization
Mar 29, 2020
Merged

[Serve] Improve Serialization#7688
simon-mo merged 2 commits intoray-project:masterfrom
simon-mo:serve/improv-serialization

Conversation

@simon-mo
Copy link
Copy Markdown
Contributor

Using __dict__ to serialize objects improve the overall noop query latency

Rough benchmark

before
25% in 0.0054 secs
50% in 0.0060 secs
75% in 0.0066 secs
90% in 0.0068 secs

after
25% in 0.0044 secs
50% in 0.0046 secs
75% in 0.0048 secs
90% in 0.0059 secs

Why are these changes needed?

Related issue number

Checks

@simon-mo simon-mo requested review from alindkhare and rkooo567 March 21, 2020 19:24
@AmplabJenkins
Copy link
Copy Markdown

Can one of the admins verify this patch?

@AmplabJenkins
Copy link
Copy Markdown

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Ray-PRB/23498/
Test PASSed.

Using `__dict__` to serialize objects improve the overall noop query latency

Rough benchmark

before
  25% in 0.0054 secs
  50% in 0.0060 secs
  75% in 0.0066 secs
  90% in 0.0068 secs

after
  25% in 0.0044 secs
  50% in 0.0046 secs
  75% in 0.0048 secs
  90% in 0.0059 secs
@simon-mo simon-mo force-pushed the serve/improv-serialization branch from b2d0f7c to bda4076 Compare March 27, 2020 01:24
@AmplabJenkins
Copy link
Copy Markdown

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Ray-PRB/23771/
Test PASSed.

clone.async_future = None
# We can't use cloudpickle due to a recursion issue
return pickle.dumps(clone)
clone = copy.copy(self).__dict__
Copy link
Copy Markdown
Member

@alindkhare alindkhare Mar 27, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add comment for using cloudpickle and __dict__ ? Because looking at the previous comments

We can't use cloudpickle due to a recursion issue

Is this fixed?

Copy link
Copy Markdown
Member

@alindkhare alindkhare left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work!

@simon-mo simon-mo merged commit 353d7e1 into ray-project:master Mar 29, 2020
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 this pull request may close these issues.

4 participants