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

process directory entries asynchronously #1658

Closed
wants to merge 1 commit into from

Conversation

whyrusleeping
Copy link
Member

This does all the file stats and opens for a directory in async. On my 700MB/s m.2 SSD, its not any faster, but for disks with slower (non-zero) lookup times, i imagine this might be a little faster, especially for lots of smaller files.

@davidar could you test this out and let me know if its any better?

License: MIT
Signed-off-by: Jeromy [email protected]

@jbenet jbenet added the status/in-progress In progress label Sep 5, 2015
@rht
Copy link
Contributor

rht commented Sep 9, 2015

Tested on local SSD.

#prepare the files once for both cases
mkdir -p foo && for i in `seq 999`; do dd if=/dev/urandom of=foo/$i bs=1M count=1; done

time ipfs add -r foo
rm -r ~/.ipfs/blocks && ipfs init -f  # "hard zero-ing"

Current master:

ipfs add -r foo 12.55s user 2.92s system 5% cpu 4:31.69 total
ipfs add -r foo 12.86s user 2.92s system 4% cpu 5:49.27 total
ipfs add -r foo 12.55s user 2.92s system 4% cpu 5:47.31 total

feat/async-files:

ipfs add -r foo 12.39s user 2.87s system 5% cpu 4:32.64 total
ipfs add -r foo 12.59s user 2.94s system 4% cpu 5:54.86 total

@jbenet
Copy link
Member

jbenet commented Sep 14, 2015

(@rht can use https://github.com/jbenet/go-random-files for this sort of test)

so this means it's not meaningful?

@whyrusleeping
Copy link
Member Author

yeah, he tested on an SSD too though, i'll set up ipfs machine on my raid later and try there to see how it affects rusty metal disks.

@whyrusleeping whyrusleeping self-assigned this Sep 14, 2015
@whyrusleeping
Copy link
Member Author

alright, tried it on a 5400rpm disk. didnt get any speedup. closing.

@jbenet jbenet removed the status/in-progress In progress label Sep 15, 2015
@rht
Copy link
Contributor

rht commented Sep 15, 2015

For ref, time ipfs get $hash: 4.24s user 1.92s system 13% cpu 46.096 total.
The slow add needs to be fixed.

@davidar
Copy link
Member

davidar commented Sep 15, 2015

@whyrusleeping oops, sorry, I meant to test this myself, thanks for doing it for me (getting a dev build onto Pollux is a little bit painful)

The slow add needs to be fixed.

:+100:

@ghost ghost mentioned this pull request Sep 15, 2015
51 tasks
@Kubuxu Kubuxu deleted the feat/async-files branch February 27, 2017 20:36
@ajnavarro ajnavarro mentioned this pull request Aug 24, 2022
72 tasks
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.

4 participants