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

Fix release test -- client remote put #15325

Merged
merged 5 commits into from
Apr 15, 2021

Conversation

richardliaw
Copy link
Contributor

@richardliaw richardliaw commented Apr 15, 2021

Why are these changes needed?

Enables a system config for the ray client tests:

New output for remote put:

2021-04-14 20:52:48,892	INFO logservicer.py:102 -- New logs connection established. Total clients: 1
client: remote put calls per second 68286.7 +- 3223.44

Prior to this PR:

client: remote put calls per second 7104.87 +- 154.42

Full run:

(raybuild) ➜  scripts git:(fix-benchmark) ✗ ray microbenchmark
Tip: set TESTS_TO_RUN='pattern' to run a subset of benchmarks
2021-04-14 20:47:54,835	INFO services.py:1264 -- View the Ray dashboard at http://127.0.0.1:8265
single client get calls per second 51038.52 +- 1901.46
single client put calls per second 31553.03 +- 1743.21
multi client put calls per second 97801.13 +- 2437.81
2021-04-14 20:48:26,564	INFO services.py:1264 -- View the Ray dashboard at http://127.0.0.1:8265
single client get calls (Plasma Store) per second 9160.23 +- 619.74
single client put calls (Plasma Store) per second 4707.35 +- 100.23
multi client put calls (Plasma Store) per second 6917.51 +- 417.71
single client put gigabytes per second 2.62 +- 2.41
multi client put gigabytes per second 3.46 +- 0.53
single client tasks sync per second 1835.03 +- 78.99
single client tasks async per second 12123.7 +- 296.05
multi client tasks async per second 19161.18 +- 715.67
1:1 actor calls sync per second 2703.54 +- 83.52
1:1 actor calls async per second 7024.55 +- 188.21
1:1 actor calls concurrent per second 7773.28 +- 519.77
1:n actor calls async per second 14367.64 +- 334.6
n:n actor calls async per second 24377.59 +- 828.75
n:n actor calls with arg async per second 8593.7 +- 213.81
1:1 async-actor calls sync per second 1759.53 +- 52.62
1:1 async-actor calls async per second 3961.22 +- 77.88
1:1 async-actor calls with args async per second 3017.21 +- 27.51
1:n async-actor calls async per second 9922.37 +- 259.87
n:n async-actor calls async per second 14935.92 +- 664.38
2021-04-14 20:52:22,179	INFO logservicer.py:102 -- New logs connection established. Total clients: 1
client: get calls per second 2660.24 +- 90.76
2021-04-14 20:52:35,455	INFO logservicer.py:102 -- New logs connection established. Total clients: 1
client: put calls per second 1451.36 +- 7.64
2021-04-14 20:52:48,892	INFO logservicer.py:102 -- New logs connection established. Total clients: 1
client: remote put calls per second 68286.7 +- 3223.44
2021-04-14 20:53:02,733	INFO logservicer.py:102 -- New logs connection established. Total clients: 1
2021-04-14 20:53:03,820	INFO services.py:1264 -- View the Ray dashboard at http://127.0.0.1:8265
client: 1:1 actor calls sync per second 814.32 +- 14.79
client: 1:1 actor calls async per second 908.16 +- 13.03
client: 1:1 actor calls concurrent per second 910.06 +- 9.59

Related issue number

Addresses part of #15247

Checks

  • I've run scripts/format.sh to lint the changes in this PR.
  • I've included any doc changes needed for https://docs.ray.io/en/master/.
  • I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failures at https://flakey-tests.ray.io/
  • Testing Strategy
    • Unit tests
    • Release tests
    • This PR is not tested :(

Signed-off-by: Richard Liaw <rliaw@berkeley.edu>
Signed-off-by: Richard Liaw <rliaw@berkeley.edu>
Comment on lines 93 to 94
if self.num_clients == 0:
with disable_client_hook():
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do we change swap this?

}

def ray_connect_handler(job_config=None):
import ray as real_ray
Copy link
Contributor

Choose a reason for hiding this comment

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

should import ray just work? I feel disable_client_hook will take care of everything.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Well, if you don't have the import in here and only the disable_client_hook, the behavior is actually unexpected (and fails).

So it's important to have some form of import in here, but I felt that real_ray was more readable and would prevent scoping problems

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, you misunderstood me.
I mean we don't necessarily rename it to real_ray since it doesn't quite make sense here.

If you don't call with disable_client_hook, it's actually not real_ray, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK i tried a small fix here!

@fishbone
Copy link
Contributor

@richardliaw could you give more details about this PR? Or could you give any link to the issues related to this PR? I don't quite understand what's the issue fixed here.

@richardliaw
Copy link
Contributor Author

Thanks @iycheng for the fast review! I've added some contextual information in the PR description. Please take a look again?

Copy link
Contributor

@fishbone fishbone left a comment

Choose a reason for hiding this comment

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

Overall, I feel good about this PR. I'll give an approval. The comment is NIT. It's up to you to change this.

Copy link
Contributor

@krfricke krfricke left a comment

Choose a reason for hiding this comment

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

Looks good to me - as ray_start_client_server seems to be a testing utility I'm fine with changing this just for this benchmarking test.

I'm wondering though if we should move the new ray connect handler to ray_start_cluster_client_server_pair(), but I'm lacking client code context to really judge that.

Happy to go forward with this solution for now as it won't affect other tests.

Copy link
Contributor

@ijrsvt ijrsvt left a comment

Choose a reason for hiding this comment

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

This looks good to me. It may make sense to move other tests to use this fixture in the future, but just scoping it to perf tests for now is okay with me.

@wuisawesome
Copy link
Contributor

4 Approvals oughta be enough.

test_object_spilling_2 failure looks unrelated

merging

@wuisawesome wuisawesome merged commit eaa3ce3 into ray-project:master Apr 15, 2021
amogkam pushed a commit that referenced this pull request Apr 15, 2021
* fix-test

Signed-off-by: Richard Liaw <rliaw@berkeley.edu>

* fix

Signed-off-by: Richard Liaw <rliaw@berkeley.edu>

* Update python/ray/util/client/server/dataservicer.py

* Update python/ray/util/client/server/dataservicer.py

* Update python/ray/_private/ray_client_microbenchmark.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-blocker P0 Issue that blocks the release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants