<div dir="ltr"><br>Hello,<div><br><div class="gmail_quote"><div dir="ltr">On Tue, Dec 18, 2018 at 2:36 AM Vans S <<a href="mailto:vans_163@yahoo.com">vans_163@yahoo.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div>If anyone is interested here is the writeup <span><span style="color:rgb(36,41,46);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";font-size:14px"> </span><a href="https://elixirforum.com/t/300k-requests-per-second-webserver-in-elixir-otp21-2-10-cores/18823" style="color:rgb(3,102,214);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";font-size:14px" rel="nofollow" target="_blank">https://elixirforum.com/t/300k-requests-per-second-webserver-in-elixir-otp21-2-10-cores/18823</a>.<br><br>tl;dr; <span><span style="color:rgb(36,41,46);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";font-size:14px">About 22% of time the scheduler spent in poll. to serve 30k~ HTTP Get requests. I think its a little much still?</span></span></span></div></div></blockquote><div><br></div><div>Firstly, it is not poll that you spend 22% in, it is PORT, i.e. the work done by gen_tcp to call writev/read. Polling shows up in the state CHECK_IO. The optimizations introduced in 21.2 were mainly done to reduce the time spent doing polling.</div><div><br></div><div>Secondly, I'd say it is too little. As you saw in the edit that you made, if your remove/optimize the Erlang parts you will get higher a throughput rate as the system can spend more time doing port work. What you are seeing as OTHER is most likely the system spinning looking for work to do. You can get more states if you are interested in digging deeper by passing --with-microstate-accounting=extra to configure.</div><div><br></div><div>The inet_driver (the port driver that is used for TCP/UDP/SCTP) is not perfect, but almost 2 decades have been spent improving it, so there are very few low hanging fruits left.</div><div><br></div><div>Lukas</div></div></div></div>