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

fix(p2p): Increase the size of the kad mem store #320

Merged
merged 1 commit into from
Oct 11, 2022

Conversation

rklaehn
Copy link
Contributor

@rklaehn rklaehn commented Oct 11, 2022

This allows adding large files without getting an error. It is a stopgap until we have a persistent kad store.

Before:

❯ time cargo run --release -p iroh-ctl -- add --no-wrap test1g  
    Finished release [optimized] target(s) in 0.17s
     Running `target/release/iroh add --no-wrap test1g`
Error: status: Internal, message: "the store cannot contain any more provider records", details: [], metadata: MetadataMap { headers: {"content-type": "application/grpc", "date": "Tue, 11 Oct 2022 10:39:21 GMT", "content-length": "0"} }
cargo run --release -p iroh-ctl -- add --no-wrap test1g  0.71s user 0.33s system 7% cpu 13.072 total

After:

❯ time cargo run --release -p iroh-ctl -- add --no-wrap test1g
    Finished release [optimized] target(s) in 0.18s
     Running `target/release/iroh add --no-wrap test1g`
/ipfs/bafybeiepocidrgivy3uqfh54klmtmfjolx7mceouvt2cggrpkghwsdxzni
cargo run --release -p iroh-ctl -- add --no-wrap test1g  4.75s user 2.29s system 4% cpu 2:53.84 total

@dignifiedquire
Copy link
Contributor

this will still fail if you do it many times asfaik. so this is fine to improve things for the moment but we very much need to store provider records on disk to avoid this limitation entirely

@rklaehn
Copy link
Contributor Author

rklaehn commented Oct 11, 2022

this will still fail if you do it many times asfaik. so this is fine to improve things for the moment but we very much need to store provider records on disk to avoid this limitation entirely

Yes, that would be the very next thing I would do. Just wanted to do something quickly so you can at least add a 1gb file without error.

This allows adding large files without getting an error. It is a stopgap until
we have a persistent kad store.
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.

2 participants