tensorflow / tensorflow/datasets
DownloadManager with register checksum is much slower
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 1.6k
- Avg merge
- 3h 54m
- Merged PRs (30d)
- 1
Description
Short description
When using the DownloadManager to download many small files (1M+ images), if register checksum is disabled, the download seems to go relatively fast. However, if register checksums is enabled, then the download is painfully slow. We are talking about multiple orders of magnitude difference. I'm doing this with a non-beam dataset.
I'm unsure if this has something to do with the parallelization of the downloads. The documentation says that if the dl_manager receives a data structure to download it will parallelize it. Does parallelization not work when register checksums is enabled?
If this is the case, at the very least it would be nice to update the documentation to clarify this.
Environment information
-
Operating System: Ubuntu 20.04
-
Python version: 3.8.5
-
tensorflow-datasetsversion: 4.1.0 -
tensorflowversion: 2.3.1 -
Does the issue still exists with the last
tfds-nightlypackage (pip install --upgrade tfds-nightly) Yes
Reproduction instructions
I'm using dl_manager to download files from S3. So to reproduce this issue, we can try comparing at the speed of downloading multiple small files from S3, once with register_checksums enabled and once disabled. In my case, the size of the dataset is upwards of 70GB, but I don't believe this needs to be the case: a couple GB will probably be enough.
Expected behavior
I expected the download speed to not change so drastically due to checksums registration.
Contributor guide
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 with the DownloadManager entry point and reproduce the comparison described: downloading many small S3 files with register_checksums enabled and disabled. Check whether parallelization changes between the two paths. Done means identifying and addressing the cause of the drastic slowdown, or documenting the limitation if the behavior is expected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, python, tensorflow
- Domain
- data, performance, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100