fsspec / fsspec/filesystem_spec
Removing large zarr stores recursively blows up memory
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.4k
- Forks
- 490
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 38
Description
I am trying to remove a rather large zarr store from the pangeo scratch bucket:
I am doing this on the pangeo google deployment (production)
import fsspec
import os
fs = fsspec.filesystem('gcs')
print(fs.ls('pangeo-scratch/jbusecke/detrending_test/'))
for path in fs.ls('pangeo-scratch/jbusecke/detrending_test/'):
fs.rm(path, recursive=True)
print(f'Finished with {path}')
This will take some time, over which memory usage on the notebook process increases steadily and eventually the kernel crashes.
Is this a misuse of fsspec (I am very new to all of this).
Or is this a bug that might have a workaround? Any help to debug this would be greatly appreciated.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the notebook snippet with fsspec's gcs filesystem and the recursive fs.rm(path, recursive=True) call. Trace the recursive removal path while watching notebook-process memory; done means large zarr stores can be removed without steady memory growth or a kernel crash.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- google-cloud, python
- Domain
- backend, cloud
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100