{"action":"created","issue":{"url":"https://api.github.com/repos/alesasnouski/prom_plugs_app/issues/1","repository_url":"https://api.github.com/repos/alesasnouski/prom_plugs_app","labels_url":"https://api.github.com/repos/alesasnouski/prom_plugs_app/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/alesasnouski/prom_plugs_app/issues/1/comments","events_url":"https://api.github.com/repos/alesasnouski/prom_plugs_app/issues/1/events","html_url":"https://github.com/alesasnouski/prom_plugs_app/issues/1","id":180331942,"number":1,"title":"Performance","user":{"login":"deadtrickster","id":172311,"avatar_url":"https://avatars.githubusercontent.com/u/172311?v=3","gravatar_id":"","url":"https://api.github.com/users/deadtrickster","html_url":"https://github.com/deadtrickster","followers_url":"https://api.github.com/users/deadtrickster/followers","following_url":"https://api.github.com/users/deadtrickster/following{/other_user}","gists_url":"https://api.github.com/users/deadtrickster/gists{/gist_id}","starred_url":"https://api.github.com/users/deadtrickster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deadtrickster/subscriptions","organizations_url":"https://api.github.com/users/deadtrickster/orgs","repos_url":"https://api.github.com/users/deadtrickster/repos","events_url":"https://api.github.com/users/deadtrickster/events{/privacy}","received_events_url":"https://api.github.com/users/deadtrickster/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-09-30T15:23:49Z","updated_at":"2016-10-01T18:54:02Z","closed_at":null,"body":"I'll continue here if you don't mind.\r\n\r\n1) What I have right now is 2/4 I7 4510U. I don't have access to bigger machines.\r\n2) I had to disable logging with.\r\n\r\n```elixir\r\nconfig :logger,\r\n  level: :warn\r\n```\r\n\r\n3) We still test the complete stack - Cowboy, Plugs. Not Prometheus.erl itself.\r\n\r\nI wasn't able to reproduce your results (I think because of 1)).\r\n\r\n```\r\nPlugs Commented\r\n\r\nRunning 30s test @ http://localhost:8088/profiles/1/\r\n  16 threads and 256 connections\r\n  Thread Stats   Avg      Stdev     Max   +/- Stdev\r\n    Latency    44.84ms    6.27ms 139.57ms   81.57%\r\n    Req/Sec   358.42     32.84     0.89k    79.78%\r\n  171456 requests in 30.10s, 43.69MB read\r\nRequests/sec:   5696.98\r\nTransfer/sec:      1.45MB\r\n\r\n\r\nUncommented\r\n\r\nRunning 30s test @ http://localhost:8088/profiles/1/\r\n  16 threads and 256 connections\r\n  Thread Stats   Avg      Stdev     Max   +/- Stdev\r\n    Latency    45.63ms    6.07ms 252.06ms   79.92%\r\n    Req/Sec   351.83     30.33   515.00     76.99%\r\n  168375 requests in 30.09s, 42.90MB read\r\nRequests/sec:   5595.81\r\nTransfer/sec:      1.43MB\r\n```\r\nI had a test code a-la https://github.com/jlouis/fuse/blob/master/stress/stress.erl but well, lost it :-). Few thoughts though:\r\n\r\n - ETS backend scales (in terms of 'client' processes count) bad when you just have one metric you constantly increment. Which is understandable since `write_concurrency` optimization won't work for single ETS table item;\r\n- ETS scales when many client processes work with many different metrics (thanks to `write_concurrency`);\r\n- You can get smaller latency with d-functions and `call_timeout` set to `false` essentially forcing `gen_server:cast` but as I mentioned on Twitter queues can be overflowed and moreover it could make calculating rates on Prometheus side useless because queue smooths peaks. \r\n"},"comment":{"url":"https://api.github.com/repos/alesasnouski/prom_plugs_app/issues/comments/250930132","html_url":"https://github.com/alesasnouski/prom_plugs_app/issues/1#issuecomment-250930132","issue_url":"https://api.github.com/repos/alesasnouski/prom_plugs_app/issues/1","id":250930132,"user":{"login":"alesasnouski","id":223009,"avatar_url":"https://avatars.githubusercontent.com/u/223009?v=3","gravatar_id":"","url":"https://api.github.com/users/alesasnouski","html_url":"https://github.com/alesasnouski","followers_url":"https://api.github.com/users/alesasnouski/followers","following_url":"https://api.github.com/users/alesasnouski/following{/other_user}","gists_url":"https://api.github.com/users/alesasnouski/gists{/gist_id}","starred_url":"https://api.github.com/users/alesasnouski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alesasnouski/subscriptions","organizations_url":"https://api.github.com/users/alesasnouski/orgs","repos_url":"https://api.github.com/users/alesasnouski/repos","events_url":"https://api.github.com/users/alesasnouski/events{/privacy}","received_events_url":"https://api.github.com/users/alesasnouski/received_events","type":"User","site_admin":false},"created_at":"2016-10-01T18:54:01Z","updated_at":"2016-10-01T18:54:01Z","body":"Wow, that was really fast. I didn't have enough time to dive deep into your changes, but result is good: \r\n**Before:** \r\n```\r\n~/wrk/wrk -d30s -c256 -t16 http://localhost:8088/profiles/1/\r\nRunning 30s test @ http://localhost:8088/profiles/1/\r\n  16 threads and 256 connections\r\n  Thread Stats   Avg      Stdev     Max   +/- Stdev\r\n    Latency     8.05ms    1.91ms  32.67ms   72.76%\r\n    Req/Sec     2.00k   398.69    17.21k    89.42%\r\n  954547 requests in 30.10s, 243.23MB read\r\nRequests/sec:  31712.45\r\nTransfer/sec:      8.08MB\r\n```\r\n**After**:\r\n```\r\n~/wrk/wrk -d30s -c256 -t16 http://localhost:8088/profiles/1/\r\nRunning 30s test @ http://localhost:8088/profiles/1/\r\n  16 threads and 256 connections\r\n  Thread Stats   Avg      Stdev     Max   +/- Stdev\r\n    Latency     4.65ms    1.12ms  50.43ms   87.19%\r\n    Req/Sec     3.47k   382.68     9.47k    83.69%\r\n  1659848 requests in 30.10s, 422.95MB read\r\nRequests/sec:  55146.19\r\n```\r\nTransfer/sec:     14.05MB\r\n![prometheus_master](https://cloud.githubusercontent.com/assets/223009/19016411/6aba7074-8821-11e6-8b6a-b5c33dca26d4.png)\r\n![branch_ets_schedulers](https://cloud.githubusercontent.com/assets/223009/19016412/6ea8f246-8821-11e6-9fb3-1e9f716505ae.png)\r\n\r\nNow cpu is 100% utilized. Is it possible to include merge your changes into master?"}}
{"actor":{"display_login":"alesasnouski"}}