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

Add preresolving feature #43

Open
rom1504 opened this issue Sep 11, 2021 · 5 comments
Open

Add preresolving feature #43

rom1504 opened this issue Sep 11, 2021 · 5 comments

Comments

@rom1504
Copy link
Owner

rom1504 commented Sep 11, 2021

It was recently noticed that laion 400m only contains urls from 5M domains.
The same is probably true for other datasets.

Pre-resolving the domains would decrease the charge on the dns process by a lot and increase downloading speed.

@rom1504
Copy link
Owner Author

rom1504 commented Sep 11, 2021

would need to handle dns load balancing properly

@rom1504
Copy link
Owner Author

rom1504 commented Sep 20, 2021

tried https://stackoverflow.com/a/15065711/1658314 with no much success

@rom1504 rom1504 pinned this issue Jan 21, 2024
@rom1504
Copy link
Owner Author

rom1504 commented Jan 21, 2024

This approach seems to work very well:

  1. get unique domains
  2. configure knot resolver to have a very long TTL
  3. use dnsperf to fetch all the domains
  4. run img2dataset

dnsperf -f inet -s 10.80.97.250 -d /tmp/list.txt -l 3600 -S 10 -Q 1000 -q 100 2>&1 | grep -v Timeout | grep -v "maybe timed out"

https://github.com/DNS-OARC/dnsperf/blob/master/README.md

I think that is pretty promising and it may be interesting to try and put that directly in img2dataset (at least the dnsperf part)

@rom1504
Copy link
Owner Author

rom1504 commented Jan 21, 2024

@rom1504
Copy link
Owner Author

rom1504 commented Jan 21, 2024

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

No branches or pull requests

1 participant