Bing.com running on. NET Core 2.1!

Source: Internet
Author: User
Tags windows x64 cpu usage
bing.com running on. NET Core 2.1!

For related knowledge, please refer to. Netcore Development Team Blog (blogs.msdn.microsoft.com/dotnet/)


Bing.com is a cloud service that runs on thousands of servers in many data centers around the world. The Bing server processes thousands of user queries per second from global consumers, through their browsers, using The Microsoft Cognitive Services API Partner and personal digital assistant Cortana to search. Our users demand that these results have relevance and speed, so performance and reliability are key components of successful cloud services such as Bing. The front-end stack of Bing is primarily written in managed code layered in MVC mode. Most business logic code is a data model written in C #, and the view logic is Razor written by. This layer is responsible for the search result data (encoded as Microsoft Bond ) into HTML, and then compress and send it to the browser. As the gatekeeper for Bing's front-end platform, we see developer productivity and functional agility as additional critical components in our success definition. Hundreds of developers rely on the platform to put their functionality into production, and they want it to work like clockwork. from the beginning, Bing.com ran on the. NET Framework, but it has recently been converted to run on. NET Core. The main reasons for driving bing.com adoption of. NET core are performance (i.e., service latency), support for parallel and application local installation, machine-wide installation (or lack of installation), and Readytorun image Independent . To achieve these improvements, we began to work to make the code in the. NET implementation, rather than relying on libraries that are available only on Windows and that are used only with the. NET Framework. The team started using. NET Standard 1.x, but the reduced API surface poses a very significant complication for our code migration. Use . NET Standard 2.0 returning more than 20,000 APIs, everything changed and we were able to quickly move from code modification to testing. After compressing some bugs, we are ready to deploy. NET core into a production environment. Readytorun Image managed applications can often have poor startup performance because the JIT must first be compiled into machine code. The. NET framework has pre-compiled technology NGEN . However, NGEN you need to perform the precompilation steps on the computer where the code will be executed. For Bing, this means ngening thousands of machines. As the application is precompiled on the Web services machine, this combined with an aggressive deployment cycle will result in a significant reduction in service capacity. In addition, running NGEN administrative permissions are required, which are typically not available in data center settings or are subject to rigorous scrutiny. On the. NET Core, CrossGen tools allow you to precompile code into pre-deployment steps, such as in the Build lab, and the images deployed to production are ready to run! Performance . NET Core 2.1 has made significant performance improvements in almost all areas of runtime and libraries; Blog A good paper was provided in the previous article. Our production data resonates with significant performance improvements in. NET core 2.1, compared to. NET core 2.0 and. NET Framework 4.7.2. Tracked the latency of internal servers over the past few months. The y-axis is the delay (omitting the actual value), and the Last sharp drop (June 2) is the deployment of. NET Core 2.1! It's all Improve the 34% , thanks to it. NET community of hard work! The following changes in. NET Core 2.1 are the highlight of our workload's significant improvement. They are presented in a reduced order of influence.
  1. vectorization string. Equals(@jkotas) and string. IndexOf/LastIndexOf(@eerhardt)
regardless of the way you slice, HTML rendering and manipulation are strings of heavy workloads. String comparisons and index operations are the main components. Vectorization of these operations is the largest contributor to the performance improvements we measure.
    1. Equalitycomparer<t>. Virtualization Support for Default (@AndyAyersMS)
one of our main software components is the heavy user Dictionary<int/long, v> , indirectly benefiting from the JIT in order to dictionary<k, v> Optimized and the internal identification work carried out (@benaadams)
    1. Software Write monitoring concurrent GC (@ Maoni0 and @kouvel)
This leads to a decrease in CPU usage in our applications. Prior to. NET Core 2.1, write monitoring on Windows x64 (and the. NET Framework) was implemented using Windows APIs with different performance tradeoffs. This new implementation relies on the JIT write barrier, which intuitively increases the cost of the reference store, but the cost is amortized and not noticed in our workload. This improvement can now also be done by May 2018 Safety and quality Rollup get on the. NET Framework
    1. methods that use calli can now be inline (@AndyAyersMS and @mjsabby)
we use it in the Performance critical section of the Code ldftn + calli instead of a delegate (which results in object allocation), you need to call the managed method indirectly. This change allows a calli the method body of the instruction has an inline condition. Our dependency injection framework generates such a method
    1. raise the string. IndexOfAny 2&3 Char Search performance (@bbowyersmyth)
A common operation in the front-end stack is to search for ":", "/", "/" in a string to separate parts of the URL. This particular shell improvement is useful throughout the code base. In addition to the run-time changes,. NET Core 2.1 is also a. NET Library ecosystem has brought Brotli support. Bing.com uses this feature to dynamically compress content and provide it to a supported browser. run-time agility Finally, the ability to have the Xcopy version of the runtime in our application means that we are able to adopt a newer version of the runtime at a faster rate. In fact, if you look at the chart above, we will be on June 2 (i.e. post-release two days) the. NET Core 2.1 Updates worldwide in a regular application deployment. This is possible because we run our continuous integration (CI) pipeline throughout the full version of the. NET Core's Daily CI build testing capabilities and performance. We're excited about the future, and with. NET team to help them determine future updates eligibility the!.net core team is excited because we offer a number of functional tests and additional large code libraries to measure actual performance improvements, And we are committed to providing fast results for bing.com users as well as using the latest software and tools from our own developers.

This article was original: Bing.com runs on. NET Core 2.1!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.