<div dir="ltr">I've been experimenting with hello world requests running under self-hosted Nancy and I'm getting about 2000 requests/second and sometimes locks up after a long period of time. When running similar test using Golang and Martini I'm getting around 4700 on the same hardware. I'm concerned why there is such a big difference between Mono/HttpListener and Go. It shouldn't be that much slower.<div>
<br></div><div>Anyway gonna try your FastCGI implementation with Nginx in front and see how it performs.</div><div><br></div><div>Keep these benchmarks coming, that's the only way Webstuff on Mono will improve! We need to get Mono higher up in <a href="http://www.techempower.com/benchmarks/#section=data-r8&hw=i7&test=json&s=2&p=13ydj4-0">http://www.techempower.com/benchmarks/#section=data-r8&hw=i7&test=json&s=2&p=13ydj4-0</a>.</div>
<div><br></div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Apr 7, 2014 at 3:20 PM, Marcelo Zabani <span dir="ltr"><<a href="mailto:mzabani@gmail.com" target="_blank">mzabani@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I have not compared the fastcgi implementation per se, because it is not very easy to test only the underlying fastcgi implementations and I never had the time for that.<div>
Fos, however, is a highly asynchronous server implementation, and I've seen it dealing with a lot of connections simultaneously. I haven't benchmarked it properly and compared it to other servers yet, but I'll try to do that in the next two weeks.</div>

<div>I run a website with Fos and I get 10-20ms average response time (measured as Fos -> Nginx, that is, not counting the time it takes for the response to reach the user) with static pages. In case you want to take a better look at these numbers, take a look at <a href="http://beeder.com.br/_stats" target="_blank">http://beeder.com.br/_stats</a></div>

<div><br></div><div>Don't be scared by the large response times for some of the URLs, as those are usually contacting Facebook through Fb's API.</div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra">
<br><br><div class="gmail_quote">
On Mon, Apr 7, 2014 at 8:02 AM, Giuliano Barberi <span dir="ltr"><<a href="mailto:gbarberi@aotaonline.com" target="_blank">gbarberi@aotaonline.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div dir="ltr">Have you benchmarked it to see how it compares to the existing FastCGI implementation?<div><br></div><div>Regards</div></div><div class="gmail_extra"><br><br><div class="gmail_quote"><div>On Sun, Apr 6, 2014 at 11:03 PM, Marcelo Zabani <span dir="ltr"><<a href="mailto:mzabani@gmail.com" target="_blank">mzabani@gmail.com</a>></span> wrote:<br>



</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div><div>
<div>
<div style="FONT-SIZE:11pt;FONT-FAMILY:Calibri,sans-serif">In case you want to host an OWIN application with Mono and FastCgi, you may wanna take a look at a project of mine, Fos: <a href="https://github.com/mzabani/Fos" target="_blank">https://github.com/mzabani/Fos</a><br>




It is also available at NuGet.</div></div>
</div><div dir="ltr">
<hr>
<span style="FONT-SIZE:11pt;FONT-FAMILY:Calibri,sans-serif;FONT-WEIGHT:bold">From: </span><span style="FONT-SIZE:11pt;FONT-FAMILY:Calibri,sans-serif"><a href="mailto:gregnajda@gmail.com" target="_blank">Greg Najda</a></span><br>



<span style="FONT-SIZE:11pt;FONT-FAMILY:Calibri,sans-serif;FONT-WEIGHT:bold">Sent: </span><span style="FONT-SIZE:11pt;FONT-FAMILY:Calibri,sans-serif">06/04/2014 22:43</span><div><br>
<span style="FONT-SIZE:11pt;FONT-FAMILY:Calibri,sans-serif;FONT-WEIGHT:bold">To: </span><span style="FONT-SIZE:11pt;FONT-FAMILY:Calibri,sans-serif"><a href="mailto:gbarberi@aotaonline.com" target="_blank">Giuliano Barberi</a></span><br>



<span style="FONT-SIZE:11pt;FONT-FAMILY:Calibri,sans-serif;FONT-WEIGHT:bold">Cc: </span><span style="FONT-SIZE:11pt;FONT-FAMILY:Calibri,sans-serif"><a href="mailto:mono-devel-list@lists.ximian.com" target="_blank">Mono Developer List</a></span><br>




<span style="FONT-SIZE:11pt;FONT-FAMILY:Calibri,sans-serif;FONT-WEIGHT:bold">Subject: </span><span style="FONT-SIZE:11pt;FONT-FAMILY:Calibri,sans-serif">Re: [Mono-dev] FastCGI Performance</span><br><br></div></div></div>

<div>
<div dir="ltr"><div>Someone looked into Mono FastCGI performance a couple months ago and made a series of blog posts:<br><br><a href="http://forcedtoadmin.blogspot.com/2013/11/servicestack-performance-in-mono-p1.html" target="_blank">http://forcedtoadmin.blogspot.com/2013/11/servicestack-performance-in-mono-p1.html</a><br>






<a href="http://forcedtoadmin.blogspot.com/2013/11/servicestack-performance-in-mono-p2.html" target="_blank">http://forcedtoadmin.blogspot.com/2013/11/servicestack-performance-in-mono-p2.html</a><br><a href="http://forcedtoadmin.blogspot.com/2013/12/servicestack-performance-in-mono-p3.html" target="_blank">http://forcedtoadmin.blogspot.com/2013/12/servicestack-performance-in-mono-p3.html</a><br>






<br></div>He ended up writing a replacement for the Mono FastCGI server instead of changing it because of architectural changes: <a href="https://github.com/xplicit/HyperFastCgi" target="_blank">https://github.com/xplicit/HyperFastCgi</a></div>





<div class="gmail_extra"><br><br><div class="gmail_quote">On Sun, Apr 6, 2014 at 7:43 PM, Giuliano Barberi <span dir="ltr"><<a href="mailto:gbarberi@aotaonline.com" target="_blank">gbarberi@aotaonline.com</a>></span> wrote:<br>





<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div style="font-family:arial,sans-serif;font-size:13px">After looking at some of the Mono web benchmarks ( <a href="http://www.techempower.com/benchmarks/#section=data-r8&hw=i7&test=json&s=2&p=13ydj4-0" target="_blank">http://www.techempower.com/benchmarks/#section=data-r8&hw=i7&test=json&s=2&p=13ydj4-0</a> ) I got very curious as to why FastCGI performance was so much lower than when using a C# libevent implementation.</div>







<div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">If you look at nancy-libevent2 vs nancy benchmarks, the only difference is a C# wrapper around libevent ( <a href="https://github.com/kekekeks/evhttp-sharp" target="_blank">https://github.com/kekekeks/evhttp-sharp</a> ) vs Mono FastCGI. Since Mono uses epoll underneath which is what libevent uses afaik, I would not expect there to be such a gap in performance. </div>







<div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">I'm curious whether performance of FastCGI is being looked at or if this is expected. Mono when using FastCGI benchmarks almost at the bottom of the list when compared to many other technologies ( <a href="http://www.techempower.com/benchmarks/#section=data-r8&hw=i7&test=json" target="_blank">http://www.techempower.com/benchmarks/#section=data-r8&hw=i7&test=json</a> ). I've done a bit of analysis on where the bottleneck is and everything I've found is pointing to the FastCGI implementation.</div>







<div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">Regards</div><span><font color="#888888"><span><font color="#888888">-- <br>Giuliano Barberi
</font></span></font></span></div><span><font color="#888888">
<br>_______________________________________________<br>
Mono-devel-list mailing list<br>
<a href="mailto:Mono-devel-list@lists.ximian.com" target="_blank">Mono-devel-list@lists.ximian.com</a><br>
<a href="http://lists.ximian.com/mailman/listinfo/mono-devel-list" target="_blank">http://lists.ximian.com/mailman/listinfo/mono-devel-list</a><br>
<br></font></span></blockquote></div><br></div>
</div></blockquote></div><span><font color="#888888"><br><br clear="all"><div><br></div>-- <br>Giuliano Barberi
</font></span></div>
</blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
Mono-devel-list mailing list<br>
<a href="mailto:Mono-devel-list@lists.ximian.com">Mono-devel-list@lists.ximian.com</a><br>
<a href="http://lists.ximian.com/mailman/listinfo/mono-devel-list" target="_blank">http://lists.ximian.com/mailman/listinfo/mono-devel-list</a><br>
<br></blockquote></div><br></div>