GithubHelp home page GithubHelp logo

Comments (4)

LucioFranco avatar LucioFranco commented on July 30, 2024

So a lot of the actual request handling is done by hyper. Tonic is merely just a wrapper around types. That said, there have been many upstream changes to both hyper and tokio that have yet to be fully published. So I am personally waiting for both to get to a state where we should really start looking at optimizing performance until then it doesn't make much sense. Remember tonic is still in an alpha state but we are getting closer.

For perf possibly flamegraph?

from tonic.

dominiquelefevre avatar dominiquelefevre commented on July 30, 2024

Hmm. Here is some throughput and latency data for various http frameworks: https://www.techempower.com/benchmarks/#section=data-r18&hw=ph&test=plaintext

It claims that tokio-minihttp has 3.1msec latency for HTTP GETs that return a fixed string "hello world". I see approx. 20msec latency for gRPC requests.

The test of Techempower uses a version of tokio that is not yet async/await-enabled. The 20ms latency, can it be a bug in async/await support in tokio or rust? Who do I talk at tokio/hyper about this?

A flamegraph would be great. How do I generate one for a rust program, or a tokio-based server?

from tonic.

LucioFranco avatar LucioFranco commented on July 30, 2024

@dominiquelefevre right, tokio 0.1 is a bit different from tokio 0.2. In fact the scheduler has even been completely rewritten! https://tokio.rs/blog/2019-10-scheduler/

You could use this https://github.com/ferrous-systems/flamegraph

from tonic.

dominiquelefevre avatar dominiquelefevre commented on July 30, 2024

Fixing #119 actually resolves this one.

from tonic.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.