简体   繁体   English

Asp.Net核心(Full .Net框架)与Asp.Net核心(.Net Core)性能

[英]Asp.Net core (Full .Net framework) vs Asp.Net core (.Net Core) Performance

I find that one of the key benefit of Asp.Net core is multi fold performance improvement (requests per second) compared to traditional Asp.Net. 我发现,与传统的Asp.Net相比,Asp.Net核心的一个主要优势是多重性能提升(每秒请求数)。 I find many bench mark sites talks about Asp.Net core performance, but I'm not sure if the performance is based on Asp.Net core with .Net core framework or the same performance benefit applies to asp.net core (full .Net framework). 我发现许多基准测试网站都在谈论Asp.Net核心性能,但我不确定性能是基于带有.Net核心框架的Asp.Net核心,还是同样的性能优势适用于asp.net核心(完整.Net)框架)。

Any idea/articles that explains/compares performance between asp.net core (.Net core) vs asp.net (full framework)? 任何解释/比较asp.net核心(.Net核心)与asp.net(完整框架)之间性能的想法/文章?

Thanks 谢谢

I recently develop using ASP.NET Core 2.0, and I have the same question regarding performance improvement beside its excellent cross platform support. 我最近开发使用ASP.NET Core 2.0,除了优秀的跨平台支持外,我还有与性能改进相同的问题。 There are many comparison from google search result, and the briefing idea is: 谷歌搜索结果有很多比较,简报的想法是:

ASP.NET Core 2.0 is about 6x-23x faster than ASP.NET 4.6 ASP.NET Core 2.0比ASP.NET 4.6快6到23倍

Here are two resources for your reference 以下是两个供您参考的资源

https://www.ageofascent.com/2016/02/18/asp-net-core-exeeds-1-15-million-requests-12-6-gbps/ https://github.com/aspnet/benchmarks https://www.ageofascent.com/2016/02/18/asp-net-core-exeeds-1-15-million-requests-12-6-gbps/ https://github.com/aspnet/benchmarks

ASP.Net Core 2.0 is nearly 2x faster than ASP.net 4.6 and also from ASP.Net 4.7 framework. ASP.Net Core 2.0比ASP.net 4.6和ASP.Net 4.7框架快近2倍。

When comparing full .Net framework vs .Net Core's performance, ASP.Net Core wins but .Net Framework also has some advantage because of some pre-built feature works with asp.net framework. 当比较完整的.Net框架与.Net Core的性能时,ASP.Net Core获胜,但.Net Framework也有一些优势,因为一些预构建的功能与asp.net框架一起使用。

But in terms of speed, ASP.Net Core(.Net Core) wins the game even from Node.js 但就速度而言,ASP.Net Core(.Net Core)甚至从Node.js赢得了游戏

We are checking the asp.net core 2.0 performance and found out this: 我们正在检查asp.net core 2.0的性能并发现了这个:


Asp.Net core application hosted/running under IIS using ASP.NET Core Module performance is worst in about 60% then Full frame work. 使用ASP.NET核心模块性能在IIS下托管/运行的Asp.Net核心应用程序在全帧工作时最差约60%。 Second case: same application self-hosted and using IIS as reverse proxy with URL rewrite module increase performance in about 20% better than Full FW. 第二种情况:相同的应用程序自托管并使用IIS作为反向代理,URL重写模块比Full FW提高了约20%的性能。 FW 4.6.1. FW 4.6.1。

Another aspect that have major impact on performance is logging. 另一个对性能有重大影响的方面是日志记录。 Insure that application under test doesn't write debug/info log to console (by default). 确保测试中的应用程序不会将调试/信息日志写入控制台(默认情况下)。 Log configuration under test should not log info and debug. 测试中的日志配置不应记录信息和调试。

Second problem that we deal with is: Asp.net core performance issue when consuming WCF service. 我们处理的第二个问题是:Asp.net在使用WCF服务时的核心性能问题。 We found out that in current version 2.0.5 the performance vs Asp.Net FW worse in about 70% and what is more important have a huge error rate (23%) of all test. 我们发现在当前版本2.0.5中,性能与Asp.Net FW的差别在70%左右,而更重要的是所有测试的错误率都很高(23%)。

The problem here is laying in port exhaustion. 这里的问题是端口耗尽。 MS recommend to increase the number of ephemeral ports. MS建议增加短暂端口的数量。 Increasing then number of ephemeral port improved the error rate, but not solved the problem. 然后增加短暂端口的数量提高了错误率,但没有解决问题。 Our test setup: Asp.Net core2.0 and Asp.Net FW apps with WEB Api controller that return some string Load test: start with 5 user increase by 5 every 30 seconds. 我们的测试设置:Asp.Net core2.0和Asp.Net FW应用程序,带有WEB Api控制器,返回一些字符串负载测试:5个用户每30秒开始增加5个。 Test is running for 8 minutes 测试运行8分钟

Read out the ASP.Net Core 2.1 RoadMap . 读出ASP.Net Core 2.1 RoadMap I think MS aware for those issues and they will fix major issues in 2.1 release. 我认为MS知道这些问题,他们将解决2.1版本中的主要问题。 We are waiting for it. 我们正在等待它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM