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

Avoid deep copy of numpy buffers on unspill #7435

Merged
merged 4 commits into from
Dec 28, 2022

Conversation

crusaderky
Copy link
Collaborator

@crusaderky crusaderky commented Dec 27, 2022

Benchmark

import gc
import numpy
import zict
from distributed.spill import SpillBuffer

print(zict.__version__)
a = numpy.random.random(512 * 2**20 // 8)
buf = SpillBuffer("/tmp", target=1)
buf["xxx"] = a
buf.slow.cache.clear()  # Clear weakref cache
buf["xxx"]
buf.get_metrics()

Output:

2.2.0
{...
 'unpickle_time_total': 0.07338492600138125}
2.3.0
{...
 'unpickle_time_total': 0.00016480999875057023}

@github-actions
Copy link
Contributor

github-actions bot commented Dec 27, 2022

Unit Test Results

See test report for an extended history of previous test failures. This is useful for diagnosing flaky tests.

       22 files  ±0         22 suites  ±0   9h 55m 14s ⏱️ - 23m 21s
  3 278 tests ±0    3 188 ✔️ ±0       86 💤 ±0  4 ±0 
35 989 runs  ±0  34 466 ✔️  - 1  1 518 💤 ±0  5 +1 

For more details on these failures, see this check.

Results for commit 987d6aa. ± Comparison against base commit 129f62a.

♻️ This comment has been updated with latest results.

@crusaderky crusaderky marked this pull request as ready for review December 27, 2022 21:41
@crusaderky crusaderky self-assigned this Dec 28, 2022
@crusaderky
Copy link
Collaborator Author

Peer review on dask/zict#74

@crusaderky crusaderky merged commit f3995b5 into dask:main Dec 28, 2022
@crusaderky crusaderky deleted the File_bytearray branch December 28, 2022 12:10
@crusaderky
Copy link
Collaborator Author

CI failures are due to conda env caching - should disappear tomorrow

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.

Deep copy causes memory flare on unspill
1 participant