Skip to content
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

Mixnet benchmark #375

Merged
merged 5 commits into from
Sep 7, 2023
Merged

Mixnet benchmark #375

merged 5 commits into from
Sep 7, 2023

Conversation

youngjoon-lee
Copy link
Contributor

@youngjoon-lee youngjoon-lee commented Sep 6, 2023

Since the PR #328 contains a lot of changes made from other branches, I'm instead opening this PR with also simplifying the benchmark code.

Holding a MutexGuard across an await point is not a good idea.
Removing that solves the issues we had with the mixnet test
@youngjoon-lee youngjoon-lee added this to the Mixnet milestone Sep 6, 2023
@youngjoon-lee youngjoon-lee self-assigned this Sep 6, 2023
@youngjoon-lee youngjoon-lee linked an issue Sep 6, 2023 that may be closed by this pull request
Base automatically changed from mixnet-pool-performance-yjlee to fix-guard-await September 6, 2023 08:16
@youngjoon-lee youngjoon-lee changed the base branch from fix-guard-await to mixnet September 6, 2023 09:27
@al8n al8n mentioned this pull request Sep 6, 2023
Copy link
Contributor

@al8n al8n left a comment

Choose a reason for hiding this comment

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

The code looks good to me. But I am curious about whether are we still facing port conflicts when running the benchmark.

@youngjoon-lee
Copy link
Contributor Author

The code looks good to me. But I am curious about whether are we still facing port conflicts when running the benchmark.

Thank you! Yeah, we don't have port conflicts now. We use the same mechanism (get_available_port()) for not only benchmark but also integration tests. And, this mechanism guarantee that port conflicts doesn't happen when all tests are started by a single process. If multi processes run tests simutaneously in the same machine (like Jenkins), port conflicts can sometimes happen. But, we switched to Github Actions which execute a fresh VM for each workflow. So, we're safe!

@youngjoon-lee youngjoon-lee merged commit 0950782 into mixnet Sep 7, 2023
11 checks passed
@youngjoon-lee youngjoon-lee deleted the mixnet-criterion-yj branch September 7, 2023 04:03
youngjoon-lee added a commit that referenced this pull request Sep 14, 2023
* Add `mixnode` and `mixnet-client` crate (#302)

* Add `mixnode` binary (#317)

* Integrate mixnet with libp2p network backend (#318)

* Fix #312: proper delays (#321)

* proper delays

* add missing duration param

* tiny fix: compilation error caused by `rand` 0.8 -> 0.7

* use `get_available_port()` for mixnet integration tests (#333)

* add missing comments

* Overwatch mixnet node (#339)

* Add mixnet service and overwatch app

* remove #[tokio::main]

---------

Co-authored-by: Youngjoon Lee <[email protected]>

* fix tests for the overwatch mixnode (#342)

* fix panic when corner case happen in RandomDelayIter (#335)

* Use `log` service for `mixnode` bin (#341)

* Use `wire` for MixnetMessage in libp2p (#347)

* Prevent tmixnet tests from running forever (#363)

* Use random delay when sending msgs to mixnet (#362)

* fix a minor compilation error caused by the latest master

* Fix run output fd (#343)

* add a connection pool

* Exp backoff (#332)

* move mixnet listening into separate task

* add exponential retry for insufficient peers in libp2p

* fix logging

* Fix MutexGuard across await (#373)

* Fix MutexGuard across await

Holding a MutexGuard across an await point is not a good idea.
Removing that solves the issues we had with the mixnet test

* Make mixnode handle bodies coming from the same source concurrently (#372)

---------

Co-authored-by: Youngjoon Lee <[email protected]>

* Move wait at network startup (#338)

We now wait after the call to 'subscribe' to give the network
the time to register peers in the mesh before starting to
publish messages

* Remove unused functions from mixnet connpool (#374)

* Mixnet benchmark (#375)

* merge fixes

* add `connection_pool_size` field to `config.yaml`

* Simplify mixnet topology (#393)

* Simplify bytes and duration range ser/de (#394)

* optimize bytes serde and duration serde

---------

Co-authored-by: Al Liu <[email protected]>
Co-authored-by: Daniel Sanchez <[email protected]>
Co-authored-by: Giacomo Pasini <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Mixnet performance test
3 participants