Comments (6)
I was hopping to rethink how this whole logic is applied such that you wouldn't need to turn off fairness in high trust environment because fairness would only comes into play when resources are constrained.
However I lack the time to do so. I'll be happy to review a for your option.
from kubo.
I explained that briefly in ipfs discuss.
In this private network, only one node owns the file at the beginning (usually a large file, and no new file will be added anytime soon). I want this file to be sent to each peer as fast as possible, and the peers to be connected to each other in a DHT so they can send the received blocks to the other peers.
The result of this attempt is that at 80 or 100 peers, the entire p2p transfer becomes slow, about twice as slow as at a lower number of peers. I had to troubleshoot the cause of the slowness. The bandwidth on the private network is abundant, more than Bitswap's traffic rate (as seen in metrics and system monitoring), so I started tweaking Bitswap's config, but there wasn't much real improvement.
I noticed that bitswap has a debt system. If I understand it correctly, it encourages peers to upload as much as possible, otherwise, it affects the transfer priority. It defeats the purpose of what I'm trying to do, I don't care about transfer priority, I want to get the file to each peer as fast as possible. If more peers have the full file, it makes the whole transfer process faster.
Back to the enhancement of disabling ScoreLedger
, I was thinking of something similar to Swarm.ConnMgr
, with a default
and none
value, and when the value is none
, there will be an empty implementation of ScoreLedger
. Do you think this is acceptable?
from kubo.
@Dreamacro did you try disabling it by hand and that solved your issue?
from kubo.
@hsanjuan The testing process is complex and will take a long time to observe and validate. But I did observe such a phenomenon:
I made an api to watch the inbound/outbound traffic between each peer and other peers after a download. Before disabling ScoreLegder
(which implements an empty ScoreLegder
), most traffic was from the kubo (i.e., the node that initially owned the file). After the disable the total inbound from kubo is lower (but still around 50%). This indicates that p2p between nodes becomes more frequent after disabling ScoreLegder
.
from kubo.
triage:
- Disabling the
ScoreLedger
will likely result in some unexpected edge cases (e.g. peers getting pruned by the connection manager while you're downloading from them), that would require a bunch of explanation and warnings in the docs section if this was added as an option toInternal.Bitswap
- It's likely the the
DefaultScoreLedger
has issues like lock-content or overly used CPU/lack of parallelism. @Dreamacro if when you run comparisons you could collect some profiles to determine likely issues that would be great, and likely lead to a fix and better result overall compared to just turning off theScoreLedger
.
from kubo.
Thanks all, after testing I realized that the "traffic is downloading from the initial node" behavior was due to merkledag.NewSession
. This was a trick I learned from ipfs discuss, but it was not what I was aiming for. After getting the node through dag usually, the p2p behavior became normal again.
So I'll close this issue for now, but the slow fetch on multiple nodes is still being tested accordingly, thanks again for all the help!
from kubo.
Related Issues (20)
- Get key by name
- websocket: failed to close network connection: close tcp HOT 8
- Describe environment variable names/expected values in config docs HOT 1
- Cannot retrieve content by addressing with SHA256 (raw binary?) HOT 1
- api/v0/resolve returns invalid JSON
- Release 0.30 HOT 10
- IPFS RPC API documentation HOT 3
- Ipfs kubo node memory usage increases endlessly HOT 4
- /api/v0/get can't save file and not equal cmd: ipfs get HOT 4
- kubo behind haproxy unable to return deserialized responses HOT 3
- Exception 0xc0000005 0x8 0x0 0x0 when try to run ipfs. HOT 2
- Binding UDP sockets to a non-IP address HOT 3
- Lost Some of the files HOT 2
- panic: runtime error: invalid memory address or nil pointer dereference
- Memory leak HOT 19
- Add ability to deny serving any `Paths` content on a gateway by default
- Debian handler scripts - Copy or Submodule? HOT 1
- Set the public gateway in the web UI, custom ports are not accepted.
- Add a grace period to obtain the lock to avoid "Error: lock /data/ipfs/repo.lock: someone else has the lock"
- Download & upload IPNS records through API / CLI HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kubo.