-
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
aspnet-async first implementation #762
Conversation
There already exists a test with the name 'aspnet'. Could this be changed to 'aspnet-async'? |
Sure, I just committed the change! I did not realize that the framework property referred to the benchmark name. |
Maybe not the best place to ask, but would it be ok to tweak machine level ASP.NET configuration via the benchmark script ? There are some threading properties that can only be set machine-wide and have a big impact on IIS performance under heavy load. http://msdn.microsoft.com/en-us/library/ee377050.aspx lists some of them. |
I don't think there is anything wrong with tweaking the IIS settings to be more performant so long as they are production-quality changes (read: not just hax that would make the results look better but not something that would be used on a production machine in practice). |
Previous async implementations/discussions: |
According to DevART, their dotConnect provider for PostgreSQL does implement async operations (http://www.devart.com/dotconnect/postgresql/features.html), so I am curious to see how it fares under load. Testing with SQL Server database would still be nice thought as I suspect that is the most common db used with asp.net. As for MySQL, the official provider also supports async since 6.8.0 (https://blogs.oracle.com/MySqlOnWindows/entry/mysql_connector_net_6_8). |
I just had a quick look at the MySQL connector source code and the "async support" is just wrapping existing synchronous methods with I'm not an expert on asynchrony, but I believe this all new code is still blocking and does not use I/O completion ports which means all these new asynchronous methods will actually be a little slower because of all the overhead. Correct me if I'm wrong. |
Well, sadly you are right. I should have known better and not assumed the calls were truly asynchronous. I checked the code of both the MySQL and dotConnect providers and they are both simply wrapping synchronous calls. So besides the new JSON serializer and unless a SQL Server database is added as a possible database to the benchmark, this code would basically serve as testing how performance is affected by using the async MVC controllers, combined with the overhead of wrapping database operations. DevART also claims that their provider is faster than npgsql, so it would also let us see how that claim holds in the specific benchmark scenarios. |
@slorion If you rebase this onto master, and update the EDIT: Just realized this is windows-only. The Travis system can't verify it unless you add a linux-only test option, using something like mono+xsp |
Hello, sorry for the delay in answering. Before going ahead, I would like to know if SQL Server will be used as a database in a future benchmark, because as far as I know, it is the only database that supports truly asynchronous calls in the .NET world. In Java/Scala, there is pgjdbc-ng or postgresql-async, but no such driver exists for .NET. |
@slorion I don't know the answer directly, but I do know this directory exists, which seems to indicate interest in making sqlserver available. I have no idea if these setup scripts 1) work or 2) are using during a round |
Ok, thank you! Beyond that, I think there may be licensing issues and also, SQL Server (and other major vendors) have pretty strict rules regarding benchmarks. If you could have a definite answer, that would be great. |
If not, what I could do is make another pull request based on an existing aspnet benchmark, with the changes that may improve it. |
One of the TE guys will have to give a definite answer About this bit:
that's fascinating. What kind of rules? Where could I see a quick summary? I'm guessing they prohibit stuff like publishing benchmark results without approval,
Oh man I would love that, but let me tell you why: The project is suffering from having a number of open PRs that If that's not your cup of tea, there is an open issue #1038 to add continuous integration support |
About publishing benchmark results issue, yes it is indeed a gray area and I am far from an expert on the subject. I can point you to this SO question though: http://stackoverflow.com/questions/12115397/is-it-against-license-to-publish-oracle-and-sql-server-performance-test As for giving a hand, I must admit my time is very limited at the moment and I was more thinking about doing small improvements to the stripped down version of aspnet benchmark to improve their performance. That said, if you point to specific projects that are not compiling on Mono, I can take a look. It may have to do with new .NET/C# features. Are you using the very latest Mono version ? I would venture a guess that the people working with the Microsoft stack would be more interested in seeing how .NET works with Microsoft CLR integrated with SQL Server since it is usually what is happening in production (Stack Overflow being one very visible example of that). Not that Mono is not great, it is often underestimated I think, but its use is quite limited compared to Windows/IIS. |
Very understandable, just wanted to point out that while a small PR for aspnet would help, it might be months before it could be merged because there's no one to test it (see #587, #762, #803, #804, #968, #833 for a small sample of the open windows (or mono) PRs) A very significant contribution would be helping us get at least one of the .NET projects running under mono properly, because then at least we could test these PRs and verify that the code changes compile, run, and pass verification. While I know that "results under mono" sounds a drab when compared to setting it as it would be in production, that is a huge step towards making windows deployment and continuous integration a lot more realistic for our team of linux-scripters. Basically, figuring out powershell isn't too far fetched, but figuring out .NET if you only work with/in linux 100% of the time is a large challenge (when we already have ~15 other languages to learn :-P)
|
I took a look at the log and all I see are 404 errors when trying to execute the tests. The app source code seems fine, including the routing, so the issue seems to be about registering the web site properly in nginx or XSP. Unfortunately, I am not familiar in how to setup that part. |
Good to know, thanks |
Regarding licensing terms, some quick notes:
|
SQL Server is licensed under another document which contains a clause similar to "You must obtain Microsoft's prior written approval to disclose to a third party the results of any benchmark test of the software." See http://www.microsoft.com/en-us/download/details.aspx?id=2803 for the 2008 R2 version (newer version on MSDN do not seem to contain Standard/Enterprise license terms). I think your best course of action would be to contact Microsoft and ask them directly. You may also ask them if they would grant you an Enterprise license because the Standard edition performance is often quite below Enterprise (caused by limitations on hardware and features). To which extent with the kind of processing and hardware you test, I do not know, but it should be non trivial. See http://msdn.microsoft.com/en-us/library/cc645993.aspx |
I tend to agree with @bhauer on this one -- we are not benchmarking database performance as much as a stack's ability to communicate with any database in a trivial-but-realistic way. We want to include MSSQL for anyone who wants to use it, but if it is a source of licensing pain then I would not have any qualms with quietly removing it. |
Given the time budget we have, the easy option of simply not including SQL Server for now is my preference. We can highlight this discussion in the Round 10 announcement notes, and we might be able to catch the eye of people who would like to see SQL Server included, and that in turn may get some Microsoft people to weigh in. In other words, I'd rather invite them to voluntarily grant permission rather than ask them for special concessions. |
I do agree with @msmith-techempower and @bhauer that there should not be any issue with publishing benchmark results, I just cannot give a definite answer on that legal aspect. Maybe you can publish the results and in the very worst case, Microsoft will ask to remove them ? There is still the issue of having either a Standard or Enterprise license. I don't think a MSDN development license is allowed in this case. |
Closing this pull request due to inactivity - please rebase off master and make the appropriate updates and issue a new PR. |
This benchmark suite is using the new asynchronous features of .NET 4.0 and MVC4, and also a little known JSON serializer (Jil).