{"action":"created","issue":{"url":"https://api.github.com/repos/phoenixframework/phoenix/issues/1658","repository_url":"https://api.github.com/repos/phoenixframework/phoenix","labels_url":"https://api.github.com/repos/phoenixframework/phoenix/issues/1658/labels{/name}","comments_url":"https://api.github.com/repos/phoenixframework/phoenix/issues/1658/comments","events_url":"https://api.github.com/repos/phoenixframework/phoenix/issues/1658/events","html_url":"https://github.com/phoenixframework/phoenix/issues/1658","id":149814047,"number":1658,"title":"Phoenix 1.1.3 seams slower compared to version 0.13.1","user":{"login":"adrian-catana","id":1830747,"avatar_url":"https://avatars.githubusercontent.com/u/1830747?v=3","gravatar_id":"","url":"https://api.github.com/users/adrian-catana","html_url":"https://github.com/adrian-catana","followers_url":"https://api.github.com/users/adrian-catana/followers","following_url":"https://api.github.com/users/adrian-catana/following{/other_user}","gists_url":"https://api.github.com/users/adrian-catana/gists{/gist_id}","starred_url":"https://api.github.com/users/adrian-catana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adrian-catana/subscriptions","organizations_url":"https://api.github.com/users/adrian-catana/orgs","repos_url":"https://api.github.com/users/adrian-catana/repos","events_url":"https://api.github.com/users/adrian-catana/events{/privacy}","received_events_url":"https://api.github.com/users/adrian-catana/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"Gazler","id":477511,"avatar_url":"https://avatars.githubusercontent.com/u/477511?v=3","gravatar_id":"","url":"https://api.github.com/users/Gazler","html_url":"https://github.com/Gazler","followers_url":"https://api.github.com/users/Gazler/followers","following_url":"https://api.github.com/users/Gazler/following{/other_user}","gists_url":"https://api.github.com/users/Gazler/gists{/gist_id}","starred_url":"https://api.github.com/users/Gazler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Gazler/subscriptions","organizations_url":"https://api.github.com/users/Gazler/orgs","repos_url":"https://api.github.com/users/Gazler/repos","events_url":"https://api.github.com/users/Gazler/events{/privacy}","received_events_url":"https://api.github.com/users/Gazler/received_events","type":"User","site_admin":false},"milestone":null,"comments":12,"created_at":"2016-04-20T16:06:50Z","updated_at":"2016-04-20T21:20:07Z","closed_at":null,"body":"About benchmarks from https://github.com/mroth/phoenix-showdown I've noticed they are using an older version of phoenix and I wanted to see how it runs with latest version. The problem is 1.1.3 is about 40% slower.\r\n\r\nFor 0.13.1 I used Elixir 1.0.4 and I get:\r\n\r\n````\r\nAdis-Mac-mini:~ adi$ wrk -t4 -c100 -d30S --timeout 2000 \"http://127.0.0.1:4000/showdown\"\r\nRunning 30s test @ http://127.0.0.1:4000/showdown\r\n  4 threads and 100 connections\r\n  Thread Stats   Avg      Stdev     Max   +/- Stdev\r\n    Latency     7.59ms    6.04ms  99.35ms   77.06%\r\n    Req/Sec     3.67k   318.18     5.85k    78.42%\r\n  438266 requests in 30.04s, 0.90GB read\r\nRequests/sec:  14590.85\r\nTransfer/sec:     30.60MB\r\n```\r\n\r\nFor 1.1.3 test I could not use the benchmarker phoenix app from https://github.com/mroth/phoenix-showdown, so I've created a new phoenix app:\r\n- I used --no-ecto and --no-brunch\r\n- I changed the browser pipeline to be the same as on version 0.13.1\r\n- I disabled :info logging in production\r\n- I've added the page controller and all the templates from the old 0.13.1 version and into web/templates/layout/app.html.eex I've replaced `<%= @inner %>` with `<%= render @view_module, @view_template, assigns %>`\r\n\r\nYou can see the Phoenix 1.1.3 app I used for tests here https://github.com/adrian-catana/benchmarker2 and the test results bellow:\r\n\r\n```\r\nAdis-Mac-mini:~ adi$ wrk -t4 -c100 -d30S --timeout 2000 \"http://127.0.0.1:4000/showdown\"\r\nRunning 30s test @ http://127.0.0.1:4000/showdown\r\n  4 threads and 100 connections\r\n  Thread Stats   Avg      Stdev     Max   +/- Stdev\r\n    Latency    12.68ms    8.82ms 134.29ms   80.93%\r\n    Req/Sec     2.12k   253.06     3.15k    76.98%\r\n  253493 requests in 30.09s, 573.23MB read\r\nRequests/sec:   8423.20\r\nTransfer/sec:     19.05MB\r\n```\r\n\r\nIs this a known issue or there is something wrong with my benchmarks2 app? Maybe I missed some optimizations made in the old 0.13.1 version."},"comment":{"url":"https://api.github.com/repos/phoenixframework/phoenix/issues/comments/212609583","html_url":"https://github.com/phoenixframework/phoenix/issues/1658#issuecomment-212609583","issue_url":"https://api.github.com/repos/phoenixframework/phoenix/issues/1658","id":212609583,"user":{"login":"Gazler","id":477511,"avatar_url":"https://avatars.githubusercontent.com/u/477511?v=3","gravatar_id":"","url":"https://api.github.com/users/Gazler","html_url":"https://github.com/Gazler","followers_url":"https://api.github.com/users/Gazler/followers","following_url":"https://api.github.com/users/Gazler/following{/other_user}","gists_url":"https://api.github.com/users/Gazler/gists{/gist_id}","starred_url":"https://api.github.com/users/Gazler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Gazler/subscriptions","organizations_url":"https://api.github.com/users/Gazler/orgs","repos_url":"https://api.github.com/users/Gazler/repos","events_url":"https://api.github.com/users/Gazler/events{/privacy}","received_events_url":"https://api.github.com/users/Gazler/received_events","type":"User","site_admin":false},"created_at":"2016-04-20T21:20:07Z","updated_at":"2016-04-20T21:20:07Z","body":"@josevalim Both of the following configurations are about the same in terms of performance,\r\nConfig:\r\n\r\n```\r\n  plug Plug.Static,\r\n    at: \"/\", from: :benchmarker2,\r\n    only: ~w(css images js favicon.ico robots.txt)\r\n```\r\n\r\nResults:\r\n\r\n```\r\n1.1.3\r\nRunning 30s test @ http://127.0.0.1:4000/showdown\r\n  4 threads and 100 connections\r\n  Thread Stats   Avg      Stdev     Max   +/- Stdev\r\n    Latency     2.54ms    2.72ms  32.34ms   89.46%\r\n    Req/Sec    10.64k     1.65k   18.78k    72.80%\r\n  1209115 requests in 30.00s, 2.45GB read\r\nRequests/sec:  40304.31\r\nTransfer/sec:     83.69MB\r\n\r\nmaster:\r\nRunning 30s test @ http://127.0.0.1:4000/showdown\r\n  4 threads and 100 connections\r\n  Thread Stats   Avg      Stdev     Max   +/- Stdev\r\n    Latency     2.53ms    2.78ms  36.89ms   89.04%\r\n    Req/Sec    10.68k     1.81k   20.67k    72.83%\r\n  1214368 requests in 30.00s, 2.46GB read\r\nRequests/sec:  40479.39\r\nTransfer/sec:     84.05MB\r\n```\r\n\r\nConfig:\r\n```\r\n  plug Plug.Static,\r\n    at: \"/static\", from: :benchmarker2,\r\n    only: ~w(css images js favicon.ico robots.txt)\r\n```\r\n\r\nResults:\r\n```\r\n1.1.3:\r\nRunning 30s test @ http://127.0.0.1:4000/showdown\r\n  4 threads and 100 connections\r\n  Thread Stats   Avg      Stdev     Max   +/- Stdev\r\n    Latency     1.96ms    3.92ms  69.31ms   89.38%\r\n    Req/Sec    14.23k     3.12k   41.33k    70.19%\r\n  1623176 requests in 30.00s, 3.29GB read\r\nRequests/sec:  54106.33\r\nTransfer/sec:    112.34MB\r\n\r\nmaster:\r\ngazler@gazler-desktop-pc:~$ wrk -t4 -c100 -d30S --timeout 2000 \"http://127.0.0.1:4000/showdown\"\r\nRunning 30s test @ http://127.0.0.1:4000/showdown\r\n  4 threads and 100 connections\r\n  Thread Stats   Avg      Stdev     Max   +/- Stdev\r\n    Latency     1.88ms    3.71ms  59.73ms   89.10%\r\n    Req/Sec    14.54k     3.20k   46.64k    70.82%\r\n  1665076 requests in 30.00s, 3.38GB read\r\nRequests/sec:  55503.07\r\nTransfer/sec:    115.24MB\r\n```\r\n\r\nLooks like performance is a little better on master, especially in the second case."}}