-
-
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
ipfs pin add is very slow / hanging #3505
Comments
What happens if try pinning after the refs call? |
Results are inconclusive. One time I got fast pin add ~15 minutes, now it hangs anyway. |
If you can, providing following debug info would be quite useful: https://github.com/ipfs/go-ipfs/blob/master/docs/debug-guide.md#beginning |
Best when you observe that it is stuck. |
Make also sure that garbage collector is disabled, it might interfere is you are adding and not pinning. |
Debug info in "stuck" phase: http://dump.bitcheese.net/files/lysomul/ipfs.debug.tar.gz |
In "stuck" phase ipfs daemon is sending 10MB/s somewhere. If command is interrupted, network activity disappears. |
This looks really familiar from my gx publish hassles: #3052 (comment) |
I've ran the same pin add with daemon running in offline mode and got more clear goroutine dump: http://dump.bitcheese.net/files/zapumel/ipfs.stacks I'm new to go so I'm kind of at loss at this, but it appears that fetchNodes is getting stuck on selecting nodes from channel of GetMany() ? I ran the pin op several times and it gets stuck on different hashes each time. Not sure why no goroutines called from github.com/ipfs/go-ipfs/merkledag.fetchNodes.func2 are in the dump. |
Not sure why but reverting 0c14b41 fixes the problem |
Looks like the concurrency limit set over there was too low. We should probably uncap it, check what is reached during normal operation and go on from there. |
Consistently seeing similar behaviour when trying to pin the 33c3 schedule (e.g. /ipfs/QmUFz3URXrbRSAUot3j5hPo3Nw3qcGywZXc4wMMKdAd8Js) on the gateways. |
Problem is not low concurrency limit but possible deadlocking when both output and input of FetchNodes() are full. I think I solved it with deferring input into goroutines: #3550 |
@Kubuxu do you want to take this. I might be able to but I would need a good test case to do what you suggest when you said:
|
I would wait, I have to evaluate @Voker57 solution. |
Issue is not only in pin add hanging but also being slow. Is pin add verifying integrity of whole stored tree really required? One way to solve this would be keeping index of DAG links and traverse it when needed, only checking if nodes exists on disk instead of parsing all of them each time. Proper implementation of index imo required adding relational DB to ipfs (sqlite? pluggable backend for postgres/mysql?), can be done quick&dirty with forward and reverse indexes in leveldb though. |
@Voker57 Yeah, we have a 'linkservice' abstraction that is supposed to be for this type of optimization. I'm going to bump this issue from 0.4.5 so we can focus on the speed of things before closing it. |
Note: The 'linkservice' abstraction will only have an effect when raw leaves are used. |
@kevina the linkservice currently only provides optimization when rew leaves are used, there is nothing stopping us from adding cache/index there for other nodes types. |
I have a same problem. I have IPFS 0.4.4. I try to duplicate files from one computer on another. The .ipfs catalog size — 42 GB. Has received the pins list on one computer and I do Whether there is an opportunity to somehow accelerate this process? |
@balancer in 0.4.4 pin add is broken and can randomly deadlock with a lot of data to pin. |
Closing this now as the optimized code in #3598 was merged |
go-ipfs_v0.4.17_linux-amd64
(OFFTOPIC I haven't been using this node in a while but I had done quite some experimenting and a bit of script writing, 4.1 GB node, Max is set at 500GB for now but wouldn't mind enlarging, the problem was another, internet service provider not allowing to open ports to receive incoming connections, couldn't find out how to proxify the ipfs daemon, searched+tried with various proxifiers with no success, so finally I didn't bother to buy some VPN-proxy service allowing ports forwarding) |
@JazzTp please open a new issue. This one has been closed for quite a while. |
OK, going to do that ASAP!
|
Version information:
go-ipfs version: 0.4.4-
Repo version: 4
System version: amd64/linux
Golang version: go1.7
Type:
Bug
Priority:
P3
Description:
I have a directory with 25G files in IPFS, to which I'm adding another file with 4GB. After adding, I'm trying to pin new directory version.
The text was updated successfully, but these errors were encountered: