Hi Louis - not a silly question at all. In fact, I hadn't compiled it for 
production. I just did and ran it again, i *think* the results are better 
but not convinced yet. The confusing thing is that phoenix says things like:

23:21:25.967 request_id=lhoodfssn5bvpjhlldn1c1r2i74fe38o [info] Sent 200 in 
80µs

80 microseconds is pretty great!

But when i hit it with wrk, with 100 open connections from the mac, i get:

Running 30s test @ http://localhost:4001/api/products
  8 threads and 100 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency    29.16ms   32.83ms 365.59ms   94.76%
    Req/Sec   494.23    139.45   770.00     76.14%
  116284 requests in 30.06s, 71.44MB read
Requests/sec:   3868.18
Transfer/sec:      2.38MB

But... if i scale it down to only 10 connections, it seems much better:

Running 10s test @ http://localhost:4001/api/products
  8 threads and 15 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency     2.22ms    6.57ms 125.08ms   92.91%
    Req/Sec     1.16k   290.49     1.95k    72.12%
  92484 requests in 10.02s, 56.82MB read
Requests/sec:   9229.39
Transfer/sec:      5.67MB

Still nowhere near 80 microseconds, but still well under the 20ms I am 
looking for. I would expect more than 100 open connections at a time 
though, but perhaps it is because of the configuration of this laptop. 
Thank you for the suggestion!

On Thursday, June 9, 2016 at 11:13:45 PM UTC-7, Louis Pilfold wrote:
>
> Hello!
>
> Perhaps a silly question, but are you running the application in the 
> production environment when performance testing it?
>
> Cheers,
> Louis
> On 10 Jun 2016 06:20, "Matt Hornsby" <[email protected] <javascript:>> 
> wrote:
>
>> Hi all - I could use some help. I am currently evaluating Elixir and 
>> Phoenix for a performance-critical application for a Fortune 500 company. 
>> This could be another great case study for Elixir and Phoenix if I can show 
>> that it can meet our needs. Initial performance testing looked phenomenal, 
>> but I am running into some performance concerns that will force me to 
>> abandon this tech stack entirely if I cannot make the case.
>>
>> The setup: an out-of-the box phoenix app using mix phoenix.new. No ecto. 
>> Returning a static json response. Basically a hello-world app.
>> The hardware
>>
>>    - Macbook Pro, 16gb, 8 core, 2.5ghz, running elixir/phoenix natively, 
>>    and also using docker container
>>    - Amazon EC2 T2.Medium running Elixir Docker image
>>
>> The tests: used ab, wrk, siege, artillery, curl with a variety of 
>> configurations. Up to 100 concurrent connections. Not super scientific, i 
>> know... but
>>
>> No matter what I try, Phoenix logs out impressive numbers to stdout - 
>> generally on the order of 150-300 microseconds. However, none of the load 
>> testing tooling agrees. No matter the hardware or load test configuration, 
>> I see around 20-40 ms response times. The goal for the services that I am 
>> designing is 20ms and several thousand requests per second. The load tests 
>> that Chris McCord and others have published suggest that I should be able 
>> to expect 3ms or less when running localhost, but i'm not seeing anything 
>> close to that.
>>
>> Would anyone be willing to work with me to look at some options here? I'd 
>> be incredibly grateful. Don't make me go back to Java, please :)
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "elixir-lang-talk" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/elixir-lang-talk/6a625e85-8c8d-43c7-9c1b-a204db09307a%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/elixir-lang-talk/6a625e85-8c8d-43c7-9c1b-a204db09307a%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"elixir-lang-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elixir-lang-talk/d9ef3e63-1c08-427c-b8a9-ad7cbae24876%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to