Comments (11)
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.
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.
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.
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.
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.
What ever happened with this? I did not see Agoo on the results page.
from agoo.
No response. Closing.
from agoo.
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:
from agoo.
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.
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.
Thanks. I'll do that and see what the response is.
from agoo.
Related Issues (20)
- Fragment usage HOT 17
- CORS issues HOT 8
- Agoo dumps core on malformed SDL HOT 5
- fails to launch in clustered mode HOT 17
- Agoo Fragment Cycle Security Vulnerability HOT 2
- Disabling introspection for GraphQL HOT 12
- Changes on args or req does not get fowarded to the other calls HOT 9
- Static asset with space in filename HOT 4
- gem install agoo fails on MacOS Ventura 13.2.1 HOT 9
- Static .txt files are not served with utf-8 encoding HOT 8
- Protect against smuggling attacks HOT 3
- Agoo & Sidekiq::Web HOT 9
- Can you tell me how I can use agoo with rack middleware? HOT 13
- Case insensitive Content-Type header HOT 4
- GraphQL in rails HOT 22
- How to render a error message using GraphQL HOT 6
- How to create a dynamic GraphQL schema HOT 6
- Configuring worker count and thread count when used with Rails HOT 5
- Port cleanup on shutdown? HOT 3
- REMOTE_ADDR not set on ENV HOT 13
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from agoo.