-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nancy: What is Nancy.Hosting.Event2.dll? + Add discussion summary to README #877
Comments
Your second question appears to be the same as #879, which in turn I believe is related to #325. However, the Event2.dll is not something I have any knowledge of. Let me see if I can loop in past contributors @kppullin and @MalcolmEvershed for their opinions. |
Event2.dllI believe this is based on https://github.com/kekekeks/evhttp-sharp . @kekekeks should be able to fill in the details. IIRC either the pull request or the evhttp repo had sample results showing the net effect. Global.asax thread configurationI based much of the There are two issues with the default values (which also vary by framework version, but a test against 4.5 just showed 1 MinOn the Let's consider that the 256 concurrent request benchmark. Based on the default settings it will take 64 seconds to allocate 256 threads on the server side (256 requests / 2 cores * .5 seconds). This is certainly non-optimal for the worse case latency metric (whether we should optimize for this aspect is a separate topic). It affects the other metrics as well, but to a lesser extent as the average settles out over time. MaxOn the ConclusionAfter a bit of testing the values in the config provided the "best" overall result. However, this was on a couple medium EC2 nodes. Other settings are likely more optimal for other configurations, which is difficult to determine without having access to such configurations. Such is the crux of performance tuning : )! Perhaps it makes sense to revert to the defaults due to this setting being 'non-standard' (though I'd argue should be a best practice). For more details check the links referenced here: https://github.com/TechEmpower/FrameworkBenchmarks/blob/master/aspnet/src/Application.cs#L67 With all that, I'd love to see some more love put in to all of the .NET tests, both on Windows and Linux, and also with the new ASP.NET vNext bits! I had a baby 5 months ago and am just starting to find time to breathe, but not enough yet to help contribute at the moment :) Let me know if you have further questions and I'll help the best I'm able. |
The main problems with .NET serverside running on Mono are:
While to trying to get Nancy up and running, I found out that self-hosting of it works way faster than hosting it using mono-xsp. Then I've created a wrapper around libevent2's built-in HTTP-server that can handle twice more requests per second. ASP.NET vNext will eliminate only the second problem. For Mono they use NOwin, which is still limited by Mono's network subsystem. It can be eliminated by creating Mono.Sockets on top of libuv or something like that (See http://lists.ximian.com/pipermail/mono-devel-list/2014-May/041484.html ) |
Right now none of the Nancy tests run. The Windows one has such bad results despite testing I did last year which (without async) is twice as fast as MVC/WebAPI, and ServiceStack is faster again. Yet the results from this Framework Benchmark show super poor results. While the results shown for Mono pale in comparison to tests I did with fastcgi-mono-server4 and nginx. However I was unable to get async working with this method. |
AFAIK, Mono ASP.NET stack implementation doesn't support async/await pattern yet. |
So I'm told, but it does work if you push the requests from nginx to a self host which I think is described on the Nancy wiki. |
Self host uses HttpListener and own request management code, so async/await works fine. It also works fine with evhttp-sharp for the same reason. However, its useless for benchmarks on Mono, since neither Mysql.Data.dll and Npgsql.dll support *Async methods. Such functionality is scheduled for Npgsql, but isn't done yet. |
True, but EF 6 supports async and MySQL. So can async not be done with that? Also you could just wrap the call yourself for the purpose of the benchmark test, even if it's run as a separate test. I have no Mono benchmarks to know if there is any gain but it would be interesting to see if there is. |
DbCommand has default implementations of *Async methods that run synchronously, for example https://github.com/mono/mono/blob/master/mcs/class/System.Data/System.Data.Common/DbCommand.cs#L172 |
So thats a mono issue? FYI : Dapper supports async which is what is being used in these tests but until mono make them truely async then i guess theres no gain |
It's MySql/Npgsql issue, Mono just provides default implementation. |
Ah I see because MySql/Npgsql need to inherit that abstract class |
@phillip-haydon Can we close this? For everyone else involved here ( @jchannon , @kekekeks @kppullin ) -- I would to see a pull request that moves a summary of this discussion into the README for the affected frameworks so it's easy to find for anyone interested |
What is this host?
https://github.com/TechEmpower/FrameworkBenchmarks/blob/master/nancy/lib/Nancy.Hosting.Event2.dll
The benchmarks for any .NET stuff are pretty terrible so I'm trying to figure out what this junk is and see if we can get some better benchmarks in.
Is there any source code?
Also why does this exist? https://github.com/TechEmpower/FrameworkBenchmarks/blob/master/nancy/src/Global.asax.cs
The text was updated successfully, but these errors were encountered: