-
-
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
POST to /api/v0/dag/put?pin=true causes high CPU usage #4673
Comments
Mind running |
Here you go. I ran the curl loop a few times while it was profiling. |
Do you have a lot of pins? It looks like our handling of the pinset is really inefficient. |
Well, considering Is there a faster way to see how many pins I may have? |
However, I'm pretty sure you have a lot of directly pinned nodes. |
|
Hm. Yeah, we need to optimize that. |
Yeap. @iamruinous is well into the land of "wow, we really didnt think through how the cdb pinset would handle that many things". Since this is now hurting real users, lets put a little more fuel on that fire. I like the proposal in #4675 |
I'm having a similar issue for similar reasons I presume.
Using it as the initial block propagation layer for a blockchain, hence the pinning. AFAIK it'd be unsafe not to pin data. Note: I'm not using |
@XertroV You should probably use |
@whyrusleeping - thanks for the advice. I've been peripherally aware there's a way for a blockchain structure to integrate with the merkledag but haven't found any good docs on how to link things together. Is there anything you could point me too? Right now each block header, block, and tx have their own MH (there are some good reasons we do this at the tx level), and we need to be able to deal with multiple heads. Any pointers (ha!) would be very much appreciated. Followup: Had a google and a look and it seems like Initial thoughts:
And answering my own questions:
|
Hey @XertroV I wrote a really simple/dumb blockchain on ipfs a little bit ago just to see how it would go. I pushed it up here just now: https://github.com/whyrusleeping/toychain Regarding The code for the hashing of things (depending on how you're asking) is here: https://github.com/ipfs/go-ipld-cbor |
Closing in favor of #5221. |
Version information:
go-ipfs version: 0.4.14-dev-9014c64f8
Repo version: 6
System version: amd64/darwin
Golang version: go1.9.3
Type:
Bug
Description:
When posting to /api/v0/dag/put?pin=true, my CPU is maxed out. pin=false does not have the same CPU utilization.
The text was updated successfully, but these errors were encountered: