On 10/06/2016 11:35, Ed W wrote:
On 10/06/2016 06:20, Matt Hornsby wrote:
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.
This smells like a networking issue?
I would get a packet trace from the machine and check packet timing.
I wonder if you are seeing:
I have to agree, there is something a bit odd?
I did a mix phoenix.new and created a basic project, nothing else. Then
using curl over localhost on OSX10.11
Phonenix logs show:
[info] GET /
[debug] Processing by HelloPhoenix.PageController.index/2
Parameters: %{}
Pipelines: [:browser]
[info] Sent 200 in 179µs
tcpdump shows:
listening on lo0, link-type NULL (BSD loopback), capture size 262144 bytes
12:20:27.372566 IP localhost.60834 > localhost.terabase: Flags [S], seq
2825464538, win 65535, options [mss 16344,nop,wscale 5,nop,nop,TS val
507676387 ecr 0,sackOK,eol], length 0
12:20:27.372656 IP localhost.terabase > localhost.60834: Flags [S.], seq
2342322357, ack 2825464539, win 65535, options [mss 16344,nop,wscale
5,nop,nop,TS val 507676387 ecr 507676387,sackOK,eol], length 0
12:20:27.372668 IP localhost.60834 > localhost.terabase: Flags [.], ack
1, win 12759, options [nop,nop,TS val 507676387 ecr 507676387], length 0
12:20:27.372681 IP localhost.terabase > localhost.60834: Flags [.], ack
1, win 12759, options [nop,nop,TS val 507676387 ecr 507676387], length 0
12:20:27.372718 IP localhost.60834 > localhost.terabase: Flags [P.], seq
1:79, ack 1, win 12759, options [nop,nop,TS val 507676387 ecr
507676387], length 78
12:20:27.372748 IP localhost.terabase > localhost.60834: Flags [.], ack
79, win 12756, options [nop,nop,TS val 507676387 ecr 507676387], length 0
12:20:27.381452 IP localhost.terabase > localhost.60834: Flags [P.], seq
1:2276, ack 79, win 12756, options [nop,nop,TS val 507676395 ecr
507676387], length 2275
12:20:27.381472 IP localhost.60834 > localhost.terabase: Flags [.], ack
2276, win 12688, options [nop,nop,TS val 507676395 ecr 507676395], length 0
12:20:27.381593 IP localhost.60834 > localhost.terabase: Flags [F.], seq
79, ack 2276, win 12688, options [nop,nop,TS val 507676395 ecr
507676395], length 0
12:20:27.381616 IP localhost.terabase > localhost.60834: Flags [.], ack
80, win 12756, options [nop,nop,TS val 507676395 ecr 507676395], length 0
12:20:27.381623 IP localhost.60834 > localhost.terabase: Flags [.], ack
2276, win 12688, options [nop,nop,TS val 507676395 ecr 507676395], length 0
12:20:27.381638 IP localhost.terabase > localhost.60834: Flags [F.], seq
2276, ack 80, win 12756, options [nop,nop,TS val 507676395 ecr
507676395], length 0
12:20:27.381723 IP localhost.60834 > localhost.terabase: Flags [.], ack
2277, win 12688, options [nop,nop,TS val 507676395 ecr 507676395], length 0
And this is backed up by the curl stats:
time_namelookup: 0.000
time_connect: 0.000
time_appconnect: 0.000
time_pretransfer: 0.000
time_redirect: 0.000
time_starttransfer: 0.009
----------
time_total: 0.009
The delay does appear to be between receiving the GET and delivering the
response? (about 9ms from the packet timestamps and backed up by the
curl timings)
Any thoughts? Perhaps the delay is somewhere in cowboy/ranch? Move it to
the phoenix mailing list?
Ed W
--
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/fb7dbc5c-4e5e-cf44-1b90-1c771d4951bb%40wildgooses.com.
For more options, visit https://groups.google.com/d/optout.