Skip to content

(For newcomers:) more tests and benchmarks #143

Open

Description

@Berrysoft

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 get familiar with the code.

See monoio and tokio-uring for reference of tests.

Activity

  1. pinned this issue on Nov 14, 2023
  2. fafhrd91 commented on Oct 30, 2024

    @fafhrd91
    Contributor

    I added compio as part of ntex benchmarks to tech empower

    test run example is here

  3. marvin-hansen commented on Feb 24, 2025

    @marvin-hansen

    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.

  4. Berrysoft commented on Feb 24, 2025

    @Berrysoft
    MemberAuthor

    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.

  5. marvin-hansen commented on Feb 24, 2025

    @marvin-hansen

    @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

  6. Berrysoft commented on Feb 25, 2025

    @Berrysoft
    MemberAuthor

    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.

  7. 0x676e67 commented on May 27, 2025

    @0x676e67
    Contributor

    Hello, I’d like to adapt a Hyper-based HTTP Client library for use with compio. This will involve porting much of Hyper’s underlying code, and making special adjustments for compio where necessary. Do you think it can work similarly to how it does with Tokio? I’m new to compio and not very familiar with its development progress yet.

  8. George-Miao commented on May 27, 2025

    @George-Miao
    Member

    @0x676e67 You can checkout compio-rs/cyper and see if that fits your need

  9. 0x676e67 commented on May 27, 2025

    @0x676e67
    Contributor

    Nice, the compio-rs/cyper project showed me that this is possible.

  10. adamanteye commented on Dec 8, 2025

    @adamanteye

    Hi, I didn't find the git repository behind compio buffers. Are these documentations generated from the rust code?

  11. Berrysoft commented on Dec 8, 2025

    @Berrysoft
    MemberAuthor
  12. adamanteye commented on Dec 8, 2025

    @adamanteye

    The website source is in another repo: https://github.com/compio-rs/compio-website

    Will compio-website serves as the doc site of compio instead of its crates on docs.rs for the users?

  13. Berrysoft commented on Dec 8, 2025

    @Berrysoft
    MemberAuthor

    No, they are for different purposes. Those on docs.rs are API docs. The website is a book describing the ideas and (hopefully) providing a quick start.

  14. fakeshadow commented on Jan 2, 2026

    @fakeshadow

    I added compio feature to my web framework and postgres driver to see the difference between it and tokio-uring as runtime.
    The benchmark has been submitted to techempower and you can check the recent score here.

  15. kkimdev commented on Jan 2, 2026

    @kkimdev

    If I'm reading correctly, it looks like compio == tokio < tokio-uring(by ~5%)` ?

  16. fakeshadow commented on Jan 2, 2026

    @fakeshadow

    If I'm reading correctly, it looks like compio == tokio < tokio-uring(by ~5%)` ?

    Sorry I should have add more context to it as the bench site does not offer individual test based filter.

    The xitca-web [barebone] can be ignored as it's tokio only and not realistic.

    xitca-web runs on tokio-uring and xitca-web [compio] runs on compio. Both are almost identical implements on the http side.

    The postgres drivers are different. For tokio-uring I took advantage of it's compat to tokio ecosystem and the driver is written in the way that can run on tokio entirely. For compio the driver is rewritten for io_uring specifically. Therefore I consider them both are as efficient in their own way.

    From my observation tokio-uring and compio are at the same level of perf for the specific bench workload techempowers offers. That said I may not have either perform in their peak so there could be rooms left for either for improvement.

  17. fafhrd91 commented on Jan 2, 2026

    @fafhrd91
    Contributor

    i have run compio in prod for sometime for large service. from my experience compio yields same results as tokio, no real advantages. i dont run it anymore, it may perform better in latest versions though

  18. George-Miao commented on Jan 2, 2026

    @George-Miao
    Member

    I'm thinking about adding some performance-related documentation as suggested on reddit.

  19. ararog commented on Mar 4, 2026

    @ararog
    Contributor

    I will resume efforts on make Deboa work with compio, this time based on cypher.

    In other hand, my next project, a more robust web server, will be fully compio based.

  20. George-Miao commented on Mar 5, 2026

    @George-Miao
    Member

    @ararog Sounds good! Feel free to post any results/problems. And also you can join our telegram group for a more timely respond.

  21. ararog commented on Mar 5, 2026

    @ararog
    Contributor

    @George-Miao is it possible consider have a discord server too?

  22. George-Miao commented on Mar 5, 2026

    @George-Miao
    Member

    @ararog We do have one: https://discord.gg/bGG8EF9v, just there's nobody except me in there. Feel free to join and chat!

  23. 0x676e67 commented on Mar 16, 2026

    @0x676e67
    Contributor

    This is my first time using compio, and I've just adapted it for btls (a fork of boring): https://github.com/0x676e67/btls/pulls. Everything seems to be working fine in testing.

    Next, I plan to add compio support to wreq: 0x676e67/wreq#1097

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions