That seems unusually slow, on my laptop i can easily get 900+ req/s using just the built in Mojolicous web server.
Normally the web server is pretty much irrelevant for performance and a database backend is the actual bottleneck.
But since you are just using the minimal generated app something has to be broken.
ave you tried the latest version from GitHub yet?
--
Sebastian Riedel
http://labs.kraih.com
http://mojolicious.org
http://twitter.com/kraih
--
You received this message because you are subscribed to the Google Groups "Mojolicious" group.
To post to this group, send email to mojol...@googlegroups.com.
To unsubscribe from this group, send email to mojolicious...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/mojolicious?hl=en.
For a hello world app those numbers are way too low, something is not right.
Here's a good test scenario btw. (since you didn't give us details about yours)
% mojolicious generate lite_app
% MOJO_MODE=production ./myapp.pl daemon_prefork --clients 10 --servers 4 --start 4
% ab -c 30 -n 10000 -k http://127.0.0.1:3000/
I would also like to see the log output in development mode, it contains a req/s number for pure web framework activity (leaving out the web server).
Wed Jul 28 16:41:27 2010 debug Mojolicious:157 [1541]: GET / (ApacheBench/2.3).
Wed Jul 28 16:41:27 2010 debug Mojolicious::Plugin::RequestTimer:37 [1541]: 200 OK (0.001350s, 740.741/s).
> To low rates for heavy loaded production environment.
> What can be wrong with this?
That depends very much on what exactly your app does, for example if your app was talking to a database backend those would be very respectable numbers. ;)
Take reddit for example, they handle about 800 req/s during peak hours with 80 servers, thats just 10 req/s per server.
People often mistake mistake micro benchmarks with scalability. (not saying it's the case here, but worth mentioning)
Log messages are more helpful if they are from the same process.
But 2 req/s points at a problem on the framework layer.
> When I commented line, where setting environment variable
> "$ENV{MOJO_APP} ||= 'TestApp';",
> "ab" reported: "Requests per second: 2135.94" in "daemon_prefork"
> mode.
Ok, that would use Mojo::HelloWorld instead of the generated application, so the problem is somewhere inside Mojolicious.
> Problem in routes?
There is nothing platform specific in routes, it could be pretty much everywhere.
--
Most databases will incur a heavy cost to re-open the connection every
time. Nobody concerned with performance will run without some sort of
DB connection cache which can hand out connections quickly.