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

(For newcomers:) more tests and benchmarks #143

Open
Berrysoft opened this issue Nov 14, 2023 · 5 comments
Open

(For newcomers:) more tests and benchmarks #143

Berrysoft opened this issue Nov 14, 2023 · 5 comments
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@Berrysoft
Copy link
Member

We need more tests and benchmarks. They will help us debug and improve the code quality.

This issue is for newcomers of this project. If you would like to contribute, but don't know which work you can do, you can start with a test or a benchmark. The experience with compio will help you more familiar with the code.

See monoio and tokio-uring for reference of tests.

@Berrysoft Berrysoft added help wanted Extra attention is needed good first issue Good for newcomers labels Nov 14, 2023
@Berrysoft Berrysoft pinned this issue Nov 14, 2023
@fafhrd91
Copy link
Contributor

I added compio as part of ntex benchmarks to tech empower

test run example is here

@marvin-hansen
Copy link

I have a question, I am currently trying to decided between monoio and compio. The challange I face with monoio is largely related to some hard cross compilation issue.

I sincerely appreciate these initial benchmarks. However, are there any benches related to scaling per additional core?
For example, monoio has some nice benchmarks on its Readme with 1, 4, and 16 cores that clearly showcase the near linear scalability while preserving low latency.

I am asking because I am experimenting with some kind of MPP architecture for message streaming and in that case, latency, and scaling matters quite a bit.

@Berrysoft
Copy link
Member Author

The challange I face with monoio is largely related to some hard cross compilation issue.

AFAIK monoio doesn't support Windows. Cross-platform is a key feature of compio.

However, are there any benches related to scaling per additional core?

Not now. I have noticed the nice benchmarks in monoio, but I didn't have time to write a similar one. That's what this issue is for: calling newcomers to contribute compio starting from adding more tests and benchmarks. PRs are welcome.

@marvin-hansen
Copy link

@Berrysoft Thank you,

I have drafted an initial benchmark based on the monoio bench to compare Tokio, monoio, and compio.

it is a simple ping-pong task where the client calculates how many responses it got from the server.

However, as I am new to compio I don't know if that is the best way to implement the task.

Would you please take a look and give some feedback to make the implementation better?
https://github.com/marvin-hansen/monoio-benchmark/blob/master/compio-server/src/main.rs

@Berrysoft
Copy link
Member Author

Two comments:

  1. You don't need to implement the client yourself (L31 -- L41). The repo has already got a testing client.
  2. Use read_exact and write_all just like the monoio server.

The dispatcher is a suitable way here to write a thread-per-core server. However, I'm not sure which one should be better, either a single-threaded server, or a thread-per-core server. You can write both with compio and benchmark them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants