17 ms·
Bing.com now runs on .NET Core
- icey 8y agoWow, they got an eye-popping performance improvement from this change.
- Analemma_ 8y agoI get the feeling that there has been a lot of low-hanging optimization fruit in .NET that went unaddressed because a) the original compiler was too complicated to change and b) there was no pressure to improve it because it only ran on Windows and there were no real competitors. a) was addressed by Roslyn, which is apparently much more manageable, and now that .NET is supposed to run everywhere, it has to have competitive performance. Hence the big gains.
- christophilus 8y agoI think there's also c) .NET Core is OSS, and has had a lot of contributions from the community for things that MS themselves didn't prioritize.
- Analemma_ 8y agoYes, this is an excellent point I forgot. With closed-source, you only get to make perf improvements if your manager decides there's not a more important feature you should be working on instead.
- cpeterso 8y agoFor example, .NET doesn't do escape analysis, though I've read this is less of an issue for .NET than Java because .NET has struct value types instead of everything being a heap-allocated object. https://news.ycombinator.com/item?id=16225696 https://news.ycombinator.com/item?id=16225696
- matthewwarren 8y agoJust a small thing, the Roslyn compiler (or any C# compiler) does very few optimisations, see https://blogs.msdn.microsoft.com/ericlippert/2009/06/11/what-does-the-optimize-switch-do/ https://blogs.msdn.microsoft.com/ericlippert/2009/06/11/what... for some details. Almost all of the 'compiler' optimisations are done by the JIT at run-time when it converts the IL code into machine/assembly code
- neilsimp1 8y agoIt is, but I wonder what they're measuring on Y-axis. I just says `(actual values omitted)`.
- pmalynin 8y agoIts latency
- Twirrim 8y agoIn what? Bananas per second? No value on the axis means we don't know what _exactly_ is being measured, or have an idea about the overall state. They say 37% improvement but that's largely meaningless. 37% improvement of what? If latency is 1 minute and they've shaved 22 seconds off (37%), neat. But it's still bad. If anything, the deliberate omission of scale on that Y axis is really disturbing.
- mjsabby 8y agoIt's in milliseconds. I'm going to update the post and add that note, but omitting values was a business decision, sorry.
- sandyarmstrong 8y agoIt says "The Y axis is the latency (actual values omitted)". I, too, wish they had shared the actual values, though.
- Groxx 8y agoSeems like it's also offset (e.g. Y starts above zero). >... the final precipitous drop (on June 2) is the deployment of .NET Core 2.1! That is a 34% improvement ... If so, that graph seems to be deliberately misleading.
- davidgl 8y agoThey've added the concept of immutable views into managed or unmanaged data, aka Spans. This allows huge reduction in allocations in the framework: https://msdn.microsoft.com/en-us/magazine/mt814808.aspx https://msdn.microsoft.com/en-us/magazine/mt814808.aspx
- daxfohl 8y agoI wonder if it's running on windows or linux. And whether they're using ASP.NET core or rolled their own framework.
- Bhilai 8y agoHTTP Response header say the server is running IIS 10.0 so its most likely Windows Server 2016.
- daxfohl 8y agoInteresting, I thought kestrel was supposed to be way faster than IIS. Wonder why they stuck with IIS after going through all this.
- ohitsdom 8y agoI'm sure they are using Kestrel behind IIS. https://docs.microsoft.com/en-us/aspnet/core/fundamentals/servers/kestrel?view=aspnetcore-2.1&tabs=aspnetcore2x#when-to-use-kestrel-with-a-reverse-proxy https://docs.microsoft.com/en-us/aspnet/core/fundamentals/se...
- thomasz 8y agoYou are not supposed to expose kestrel to the open internet. It should always run behind a reverse proxy like nginx or, in this case, IIS.
- scarface74 8y agoMicrosoft has changed thier guidance. Check out the different verbiage between the 1.x tab and the 2.x tab. https://docs.microsoft.com/en-us/aspnet/core/fundamentals/servers/kestrel https://docs.microsoft.com/en-us/aspnet/core/fundamentals/se...
- davidgl 8y agoKestrel needs a reverse proxy in front of it for SSL termination etc. https://docs.microsoft.com/en-us/aspnet/core/fundamentals/servers/?view=aspnetcore-2.1&tabs=aspnetcore2x https://docs.microsoft.com/en-us/aspnet/core/fundamentals/se...
- pestkranker 8y agoAre there resources that describes Bing web stack/infrastructure? Something à la http://highscalability.com/ http://highscalability.com/.
- paulborza 8y agoMost of the stack is custom.
- yawgmoth 8y agohttps://github.com/dotnet-architecture/eShopOnContainers https://github.com/dotnet-architecture/eShopOnContainers While it's not Bing, this is the canonical example I have seen in response to a lot of "What is at least a very good way to do x in .NET Core?"
- mjsabby 8y agoBing is huge both in codesize and technologies used, but most of it is a flavor of Windows Server 2016 (soon 2019) + http.sys + C# + Razor + TypeScript for Frontend. C#/C++ for middle and lower tiers.
- kuwze 8y agoI thought this was a really good post[0] on the networking performance potential of .NET. [0]: https://dzone.com/articles/how-raygun-increased-throughput-by-2000-with-net-c https://dzone.com/articles/how-raygun-increased-throughput-b...
- kjeetgill 8y agoSort of? It's interesting work but I don't know if I'd frame it as "networking performance potential of .NET". The title is "How Raygun Increased Throughput by 2,000% With .NET Core (Over Node.js)". From the article: > In terms of EC2, we utilized c3.large nodes for both the Node.js deployment and then for the .NET Core deployment. Both sit as backends behind an NGINX instance and are managed using scaling groups in EC2 sitting behind a standard AWS load balancer (ELB). They're comparing their Node.js vs C# versions behind ELB and NGINX. It's barely touching the networking part of the stack directly. They gains are almost definitely all from a stronger compiler story and a concurrency story. They say themselves: > Node is a productive environment and has a huge ecosystem around it, but frankly, it hasn’t been designed for performance.
- deleted 8y ago[deleted]
- ericcholis 8y agoI like the fact that they are highlighting the individual Pull Requests. It's a good reminder that .NET Core is indeed open to community changes.
- Someone1234 8y agoIndeed. But it is worth noting that most of those individual pull requests were from Microsoft employees. It is still awesome that the community can comment, and Microsoft does take community changes regularly for .Net Core, VS Code, etc.
- matthewwarren 8y agoI tried to figure some actual numbers related to this, see http://mattwarren.org/2017/12/19/Open-Source-.Net-3-years-later http://mattwarren.org/2017/12/19/Open-Source-.Net-3-years-la... for a write-up
- tracker1 8y agoDefinitely interesting... I think this speaks mostly to having a direct compile option for .Net Core that works well more so than the platform as a whole. Personally, my first past at most things these days would be with Node.js simply because of productivity, but it's nice to see more options for performance growth as needed.
- lcfcjs 8y agoNo wonder it never works.
- some_account 8y ago". NET is applying an update, please return to Bing after reboot"
- paulcarroty 8y agoBing is completely mess as a search engine. I tried it 3 or 4 times and every-time the context of results was long away from desired. I heard Bing good for porn, it's probably the one strong side, LOL.
- magnat 8y ago> That is a 34% improvement That graph is completely misleading then. I can understand why they don't want to show actual y-axis values, but at least put relative values on that axis. Even "60%" and "100%" would do.
- mjsabby 8y agoThanks for the suggestion, I've modified the graphic.
- stanislavb 8y agoIt's still misleading unless you look for the specific numbers...
- kevindqc 8y agoThe first commit says "Vectorization of string.Equals". It now uses SpanHelpers.SequenceEqual. How is that vectorized when it's just an unrolled loop from what I see? Does vectorization not mean using SIMD instructions? It also means improving data dependencies? https://github.com/dotnet/coreclr/blob/48cb3fa29a63219a9669ae012eefca0bf5ce0091/src/System.Private.CoreLib/shared/System/SpanHelpers.T.cs#L608 https://github.com/dotnet/coreclr/blob/48cb3fa29a63219a9669a...
- wolf550e 8y agoMaybe there is an autovectorizer in the compiler that recognizes the shape of that loop and uses SSE to do it 16 bytes at a time instead of 8 at a time?
- Kirth 8y agoThe CLR/runtime to optimizes that code into SIMD instructions, if the hardware allows for it.
- benaadams 8y agochar ref (managed pointer) is cast to byte ref https://github.com/dotnet/coreclr/blob/04d9b557ef8b7c60a1194d062c7c2ee6e41fd8c1/src/System.Private.CoreLib/shared/System/String.Comparison.cs#L27-L37 https://github.com/dotnet/coreclr/blob/04d9b557ef8b7c60a1194... Then it uses SpanHelpers.SequenceEqual for byte which is vectorized https://github.com/dotnet/coreclr/blob/04d9b557ef8b7c60a1194d062c7c2ee6e41fd8c1/src/System.Private.CoreLib/shared/System/SpanHelpers.Byte.cs#L862-L916 https://github.com/dotnet/coreclr/blob/04d9b557ef8b7c60a1194...
- dasanman 8y agoI know nobody who uses Bing to be honest. Am I wrong in thinking this?
- Kagerjay 8y agoI use bing all the time for TV shows, its way better than google in this regard
- bovermyer 8y agoAnecdotal, but I alternate between Bing and Google, with a general preference for Google.
- ghrifter 8y agoI use Bing and prefer it to Google tbh I did it as "hm just try it out" to use it every day. I get better SO snippets or MSDN API/articles when I search for C# or .NET related questions Or maybe thats just my bias, idk.
- cbHXBY1D 8y agoDuckDuckGo, Alexa, and Cortana use it. It gets about 21% of the search market.
- foepys 8y agoWindows 10 is using it in the start menu. Every time somebody types something into it, Bing gets a request for autocomplete.
- 8y ago
- merb 8y agoSomehow I actually fell in love with .NET Core 2.0. While their naming is still confusing and it's hard to know what will come next. I found myself amazingly productive with Razor Pages. It's really cool if you don't need an SPA and you could do everything pretty damn fast. It's like WebForms, but without the Microsoft specifics and instead relies on the good old html5 part to make an app great.
- sreyaNotfilc 8y agoI was talking with a friend yesterday. He got a position as a manager for a group of Java/Oracle devs. We started talking about how being a manager wasn't all its cracked up to be. We are coders and we are really good at what we do. What makes coding more "fun" is the .NET framework. It had its headaches, but its a really nice and polished framework for getting things up and running. Especially with web building. .NET 4+, C#, and Core are Microsoft's message to the development world that they hear us. Here's hoping they continue with this trend.
- Yhippa 8y agoThat is one thing I always admired about .NET from afar: there was generally one fairly polished framework that you could reasonably trust. In Javaland I feel like I sometimes I have to second-guess everything to make sure I'm using the "best" implementation of something. That and C# is an ISO standard which is pretty cool.
- jmartrican 8y agoAs a non-apologetic Java-fanboy I can attest to "I have to second-guess everything to make sure I'm using the "best" implementation of something." This is true. The Spring Boot libraries helps to alleviate that a bit.
- dionian 8y agoIt's a good and a bad thing. It's good beacuse there is a lot of competition.
- 8y ago
- sevensor 8y agoNot a .NET developer, so apologies for the dumb question, but why did MS release a second open source .NET implementation around the same time as they acquired Xamarin? Do .NET core and Mono compete with one another? Do they serve complementary roles? Why would I choose one over the other?
- dep_b 8y ago.Net core replaces Mono.
- nbevans 8y agoNot according to Miguel it doesn't.
- philliphaydon 8y agoDon’t know what his opinion is but I think .net core 3 would be closer to replacing mono than 2.X
- mythz 8y ago.NET Core is superior than Mono for Server Software like ASP.NET Web Apps but Mono is more suitable for embedded environments like iOS/Android/PlayStation/Xbox,etc and is also what's used in Microsoft's new Blazor project for running C# Apps in Web Assembly (https://github.com/aspnet/Blazor https://github.com/aspnet/Blazor).
- sremani 8y agoFrom what I remember reading a post or listening to podcast is .net core is "server-centric" and mono is "client-centric" also relative "foot-print" in size.
- mrblah 8y agoMy understanding is that Mono is being billed as a client framework (Monogame, Xamarin, Unity, Blazor) while Core is more for the server/systems target. To add to the confusion, ".Net Standard" is a library compilation target that should work everywhere (even the legacy Windows-only .Net Framework). Interestingly, the newly MIT-licensed Xenko game engine compiles to .Net Standard libraries which is how it supports so many platforms (via barebones launcher/shim projects for whichever framework implementation is desired). Edited for clarity, thx.
- polskibus 8y agoIt would be great if they compare running bing on Linux vs Windows! Is there a hidden gem somewhere?
- mjsabby 8y agoBarring any bugs, the hope is that the code generated on Windows and Linux for the same architecture will be very similar, modulo calling conventions and ABI. Then you come down to issues like Linux networking vs. Windows networking, Disk I/O differences which are interesting but from a .NET perspective less so in my opinion.
- polskibus 8y agoIt is very interesting to know if running .net core on Linux gives you better performance than on Windows. If you don't get any perf. penalty then moving to Linux saves you a lot in Windows Server licenses! And if Linux is faster then there is really no reason to stay with Windows Server anymore.
- manigandham 8y agoBing is Microsoft, they likely do not pay for Windows licensing, and would also rather work with the Windows team than switch to Linux.
- polskibus 8y agoOf course Microsoft won't. THE outcome of the performance comparison is important for all the other companies using .NET.
- wpdev_63 8y agoThey should have renamed .net to something else. Now we have to deal with the same issues as the python 2/3 but maybe even worst as it's harder to tell which apis are available looking at sample code.
- yread 8y agojust switch to. net core. "* core" is pretty googlable
- deleted 8y ago[deleted]
- h4b4n3r0 8y agoBing folks, are you running this on Linux? Common problem a few years ago was that perf of the Linux version of Core sucked compared to Windows. The only way to fix that is through serious dogfooding. I’m wondering to what extent Microsoft is committed to such dogfood on Linux.
- benaadams 8y agoTechempower Benchmarks all run on Linux and they are quite focused on the performance of them https://www.techempower.com/benchmarks/#section=test&runid=9d3b8d36-c4a8-499f-bd0a-0fe33cf820cf&hw=ph&test=plaintext&p=zik0zj-zik0zj-zijocf-2t4v&w=4-0 https://www.techempower.com/benchmarks/#section=test&runid=9... 7+ million requests per second on linux for a single server (maxing out a 10GBps network) isn't to shabby ;) Also they run continuous benchmarks for all platforms in a wider range of tests https://github.com/aspnet/Benchmarks https://github.com/aspnet/Benchmarks With the results being public at https://aka.ms/aspnet/benchmarks https://aka.ms/aspnet/benchmarks
- h4b4n3r0 8y agoNarrow benchmarks aren't interesting. Use in large scale production, however, more or less guarantees stuff will eventually work well.
- bpicolo 8y agoA few years ago is a long time for .NET core, it was in it's infancy then. It's a mature product these days. I've never been a MSFT-platform dev, but I enjoyed fiddling with .NET core for a while. The only annoyance big then was they were caught between two package manager formats
- h4b4n3r0 8y agoThat also hamstrings the ecosystem.
- 8y ago
- martinald 8y agoI'm a huge fan of C# and ASP.net, but this transition hasn't went as smoothly as I hoped. I tried .NET core a lot pre-1.0 and it seemed really fragile (especially on Mac and Linux, which was my main excitement around it). As I was a bit nervous about that, I started a new project in 'classic' .NET w/ MVC5. It however seems a lot of projects are migrating rapidly to .NET Core and leaving support for legacy projects recently. It does seem to be a giant pain to migrate a legacy asp.net app to asp.net core (very manual). Anyone have any tools/advice on this process?
- sebazzz 8y ago.NET core has several compatibility packages you can use. However, once you have Web Forms in your project there is no way forward but to rewrite the Web Forms pages.
- swalsh 8y agoI was an early adopter of .net core. It definitely had its quirks in the beginning. Recently I gave it another go, it's really improved a lot. Like it's production ready now. I'd say pick it up again.
- martinald 8y agoYeah, I'll definitely use it from day 1 for new greenfield projects, but quite a lot of concepts have changed to make migration trivial.
- jorgec 8y agoMicrosoft is fooling us. Where is the information about concurrency? I tested Net Core the last year and I compared with .net framework. The performance was horrible (concurrent test).
- funwie 8y ago.Net Framework is windows only Mono is open source port of .Net Framework to non-windows platforms (linux, mac os) .Net Core is cross platform (like Java but without GUI features for now) .Net Standard for libraries shared by all 3 above.
- markbnj 8y agoYears ago I spent a lot of time trying to convince some of our large bank customers that we could run their stuff on Windows NT instead of SunOS or AUX or whatever by noting that microsoft.com ran on NT. I'm not even sure if it was actually true at the time, now that I think about it.