-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Store peerstore data to disk #2848
Comments
With @whyrusleeping we decided to bump it off the 0.4.3, it uses only 6MiB of RAM on long running nodes. |
I know this was removed from the milestones, but I wouldn't mind digging a little deeper into the structures IPFS uses if you still want the help @whyrusleeping |
@csasarak that would be very helpful! I'd love to have some help with this :) |
Cool, I'm actually traveling starting Saturday through to next Friday so unfortunately I won't be able to help until then. I've been thinking about this though and was thinking there might be some way to make some reified caching strategy object (if one doesn't exist already) or interface. That way things could get a bit smarter than simply writing entries to disk when the finger table gets larger than a certain point. Also, crazy idea, but would it be possible or desirable to store peerstore data in IPFS itself? I'm wondering if that might be an efficient way to pass around peerstores or parts of peerstores to other nodes that request them? |
The thought of storing the information in IPFS itself is very appealing, but it has a few challenges off the bat, the first of which is that the peerstore data is very mutable in nature, addresses change quickly, new peers come online and leave and our knowledge of things changes with nearly every RPC made (at an extreme). IPFS objects are immutable, so every change that gets made will end up creating a new object (unless optimized similarly to how the mfs bubbling up happens). The second concern there is about privacy, its not necessarily a problem, but something that needs to be thought through. If you put all the peerstore data in ipfs, it becomes accessible to everyone. Anyways, Safe travels and i'll hopefully hear from you after next friday :) |
I figured there'd be something wrong with it, and it's probably a spec question rather than an issue for go-ipfs anyways. Anyways, I will get back to you - have a good week! |
|
@whyrusleeping I've returned. @jbenet Are you saying that we should try to implement it this way? I'd assume that storing it in IPFS would achieve the goal of writing it to disk. |
@csasarak for now lets not store the data in ipfs, we need to figure a lot of stuff out first. Lets just put this data in leveldb for now, But before we get to that, we need to make the go-libp2p-peerstore support writing into a go-datastore. You should go open an issue there to start discussing the design/changes |
I took a first stab at it here libp2p/go-libp2p-peerstore/pull/10, storing peer addresses in datastore. Anybody care to take a look? |
This has now been implemented but is blocked on work being done in libp2p to make it performant (e.g., libp2p/go-libp2p#1702). |
IPFS is actually using the most memory over time of all my server apps. |
This is very similar to #2847.
Information about peers (their addresses, the protocols they have, their public keys) are currently stored in memory and need to be written to disk to avoid consuming excess memory.
I havent started this one yet and would appreciate some help getting this done.
The text was updated successfully, but these errors were encountered: