Skip to content

Add some sanity checks for memory use in dataset#22642

Merged
ericl merged 4 commits intoray-project:masterfrom
ericl:test-memuse
Feb 26, 2022
Merged

Add some sanity checks for memory use in dataset#22642
ericl merged 4 commits intoray-project:masterfrom
ericl:test-memuse

Conversation

@ericl
Copy link
Copy Markdown
Contributor

@ericl ericl commented Feb 24, 2022

Why are these changes needed?

Add some tests on upper bounding memory usage. One is disabled for now until we are able to clear input blocks for normal Datasets.



def test_memory_release_lazy_shuffle(shutdown_only):
# TODO(ekl) why is this flaky? Due to eviction delay?
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

FYI @stephanie-wang , not sure if you also observed this in your shuffle experiments (memory sometimes not getting released in a timely manner during shuffle)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hmm I think @franklsf95 actually did see something like this.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It's quite odd. I don't think it's related to Python GC or anything. I figured it might be a unit-test artifact since we have some batching/delay before releasing memory, which would only show up in a fast test, but it could also be an issue at larger scale.

@ericl ericl added the tests-ok The tagger certifies test failures are unrelated and assumes personal liability. label Feb 25, 2022
error = e
print("Failed", e)
finally:
ray.shutdown()
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

will this cause double shutdown since you also have shutdown_only?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yea; though it is harmless.

Copy link
Copy Markdown
Contributor

@clarkzinzow clarkzinzow left a comment

Choose a reason for hiding this comment

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

Awesome!

@ericl ericl merged commit ae16aa1 into ray-project:master Feb 26, 2022
simonsays1980 pushed a commit to simonsays1980/ray that referenced this pull request Feb 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tests-ok The tagger certifies test failures are unrelated and assumes personal liability.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants