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

http: migrate to fsspec #6413

Closed
isidentical opened this issue Aug 11, 2021 · 4 comments · Fixed by #6525
Closed

http: migrate to fsspec #6413

isidentical opened this issue Aug 11, 2021 · 4 comments · Fixed by #6525
Assignees
Labels
fs: http Related to the HTTP filesystem

Comments

@isidentical
Copy link
Contributor

http is an important remote, and we should migrate it to fsspec. There is already a built-in http filesystem inside fsspec, but it seem to lack a couple of features we depend. So there should be some benchmarkings to determine whether we should create a sync, requests backed httpfs or just use the HTTPFileSystem from fsspec.

@isidentical isidentical added the fs: http Related to the HTTP filesystem label Aug 11, 2021
@isidentical isidentical self-assigned this Aug 11, 2021
@isidentical
Copy link
Contributor Author

It seems like with some changes (see fsspec/filesystem_spec#731) passes all the functional tests against HTTP. I am now moving to the phase of running benchmarks, but some early microbenchmarks indicate that as is aiohttp is not as performant as requests when it comes to the threaded code. Still need to do more concrete examples (thinking about #6222 using as a benchmark case).

@isidentical
Copy link
Contributor Author

I might've spoke a bit too soon, seems like it was causing due to a weird race which now is fixed but still it is not outperforming, but just catching up;

http://speedtest-ny.turnkeyinternet.net/1000mb.bin (get-url)

    regular: 4m9.420s
    httpsfs: 4m1.616s

dataset-registry/mnist/images (pull)

    regular: 19m0.577s (1 fail)
    httpfs: 18m54.310s (no fail)

@skshetry
Copy link
Member

skshetry commented Aug 24, 2021

but still it is not outperforming, but just catching up;

@isidentical, did you check with HTTPStreamFile? We stream download the file using IterStream, whereas default open in fsspec.http uses chunking.

class IterStream(io.RawIOBase):


EDIT: Maybe not, I see that it has fetch_all that gets everything in one go.
Also, the differences are quite small, could be chunking or any other things.

@isidentical
Copy link
Contributor Author

Also we directly use get_file / put_file so I don't think HTTPStreamFile affects anything in the benchmarks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fs: http Related to the HTTP filesystem
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants