Giter Site home page Giter Site logo

I added Agoo to the TFB about agoo HOT 11 CLOSED

ohler55 avatar ohler55 commented on May 17, 2024
I added Agoo to the TFB

from agoo.

Comments (11)

ohler55 avatar ohler55 commented on May 17, 2024

The code looks pretty reasonable. The only thing I would change might be the number of workers. That is something you would have to experiment with though. I suspect the database will be the most significant bottleneck since it looked like the queries are synchronous. Spreading them out over as many separate real threads will probably give the best performance. I wonder if the connection pool make a significant difference or if more workers would give better results.

Nice charts by the way.

from agoo.

GertThiel avatar GertThiel commented on May 17, 2024

The charts aren't mine. I only added Agoo to the TechEmpower Framework Benchmark (TFB): TechEmpower/FrameworkBenchmarks#4709

I suspect the database will be the most significant bottleneck since it looked like the queries are synchronous. Spreading them out over as many separate real threads will probably give the best performance.

Do you have sample code how to accomplish that?

from agoo.

ohler55 avatar ohler55 commented on May 17, 2024

Just change the worker_count in app.rb and maybe the size of the connection pool. If it is easy for you to run the test try multiplying the worker_count by some scaling factor and see what yields the best results. Using a machine close to the one they do the benchmark runs on would be best of course.

from agoo.

GertThiel avatar GertThiel commented on May 17, 2024

The TFB runs the actual benchmark in Docker containers. worker_count is derived from nproc (see here). The pool is set as big as set by the competing frameworks( everyone uses about 250).

The machines which will run the benchmarks is considerably different from mine. So nproc seems to be a good strategy to configure worker_count except you think a multiplicator would be better (Two workers per processor core?).

from agoo.

ohler55 avatar ohler55 commented on May 17, 2024

It might be better to have a multiplier on worker_count since most of the time will be spent waiting for the database.

I'm not sure how the connection pool works but if it establishes 250 connections right away that could be a problem if mongo is not configured for for a large number of connections. Let me explain a little.

The worker_count is used to create that number of separate Ruby processes. They show up as separate entries when running top. Each one is running app.rb so with the pool at 250 connections and lets say 12 CPUs thats a lot of connections. Looking at it still further we know that Ruby uses a global lock for each app so the app is locked until the database returns. Depending on the database driver it may allow other Ruby threads to run in which case increasing the Agoo thread_count could help. Having connections in the pool that are not used will only slow down the server as those connections still need to be checked and in MongoDB's case there is a new thread created for each connection. So I would suggest the pool size should be the same as the thread_count.

So I threw in another variable, didn't I. Not knowing how the drivers are implemented makes it tough to give specific values for the worker_count and thread_count but they are configurable so some trial runs with different values should allow the best values to be determined.

from agoo.

ohler55 avatar ohler55 commented on May 17, 2024

What ever happened with this? I did not see Agoo on the results page.

from agoo.

ohler55 avatar ohler55 commented on May 17, 2024

No response. Closing.

from agoo.

ElMassimo avatar ElMassimo commented on May 17, 2024

What ever happened with this? I did not see Agoo on the results page.

@ohler55 In case you never found it, it was added in TechEmpower/FrameworkBenchmarks#4709.

Have in mind the implementation is flagged as Stripped, which means it's not shown by default, and needs to be manually enabled in the filters:

Screen Shot 2020-06-02 at 1 37 04 PM

from agoo.

ohler55 avatar ohler55 commented on May 17, 2024

I failed to find the implementation approach option for Stripped in the filters. All that appears is Realistic. I would love to see the results and would be glad to check the configuration to see if it is optimum. I would also like to get Agoo so it shows up with Realistic if you can point me at what to takes to earn that label.

from agoo.

ElMassimo avatar ElMassimo commented on May 17, 2024

From the general requirements in the project:

This project intends to measure performance of production-grade deployments of real-world web application frameworks and platforms. All implementations are expected (but not required) to be based on robust implementations of the HTTP protocol. Implementations that are not based on a realistic HTTP implementation will be marked as Stripped. Rather than stipulate a rigid specification of HTTP requirements, we defer to common sense: the implementation should provide a viable subset of HTTP to reasonably unbiased outsiders familiar with HTTP.

Not familiar with how the decision is made, in this case it seems it was added as Stripped by @GertThiel.

Perhaps you can make a pull request with changes to the sample app to flag it as Realistic instead.

from agoo.

ohler55 avatar ohler55 commented on May 17, 2024

Thanks. I'll do that and see what the response is.

from agoo.

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.