Skip to content
This repository has been archived by the owner on Feb 1, 2023. It is now read-only.

Feat/bandwidth limited tests #42

Merged
merged 3 commits into from
Dec 20, 2018
Merged

Conversation

hannahhoward
Copy link
Contributor

Goals

Existing benchmarks do not take into account bandwidth limitations on a peer. IOW, assuming all peers have all blocks for a benchmark, the perfect result can be obtained by just continuing to ask the single fastest peer for blocks.

Implementation

  • Add the option to create a virtual network with rate limits on peers
  • Similar to latency delays, you can use a fixed bandwidth limit or a variable limit on a per peer basis via the FixedBandwidthLimitGenerator() and the VariableBandwidthLimitGenerator()
  • Add a block generator that generates blocks with an actual size (i.e. so bandwidth can be consumed)
  • update "real world" stress test benchmarks to additionally add bandwidth limits. This produces some pretty severe penalties in the current master-branch BS implementation, particularly in the "slow network" test

@ghost ghost assigned hannahhoward Dec 18, 2018
@ghost ghost added the status/in-progress In progress label Dec 18, 2018
@hannahhoward hannahhoward force-pushed the feat/bandwidth-limited-tests branch 2 times, most recently from 7f0b951 to 33d1de2 Compare December 18, 2018 23:51
@hannahhoward hannahhoward changed the base branch from master to bugs/stabilize-test-suite December 18, 2018 23:51
@hannahhoward
Copy link
Contributor Author

due to issues with test suite rebased on to bug fixed branch and this is PR'd against that for now.

make both performance benchmarks write to a tmp dir and put in the .gitignore
Limits connection bandwidth in real world benchmarks so that blocks are delayed if single peer is
overused

fix #40
@hannahhoward hannahhoward changed the base branch from bugs/stabilize-test-suite to master December 19, 2018 02:12
Copy link
Member

@Stebalien Stebalien left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM but I'd consider running gx update QmYxivS34F2M2n44WQQnRHGAKS8aoRUxwGpi9wk4Cdn4Jf to update go-libp2p for the rate limiter stuff (so we don't have to do it later).


type rateLimiter interface {
Limit(dataSize int) time.Duration
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, that type should be exported: libp2p/go-libp2p#507. If you want, you can update go-libp2p to 6.0.30 to pull this in.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, nice :)

Updated Libp2p and used it's newly exposed RateLimiter public interface
@Stebalien Stebalien merged commit 18c401d into master Dec 20, 2018
@ghost ghost removed the status/in-progress In progress label Dec 20, 2018
@Stebalien Stebalien deleted the feat/bandwidth-limited-tests branch December 20, 2018 16:30
Jorropo pushed a commit to Jorropo/go-libipfs that referenced this pull request Jan 26, 2023
…d-tests

Feat/bandwidth limited tests

This commit was moved from ipfs/go-bitswap@18c401d
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants