Live data from Hacker News

Windows Server 2025 Runs Better on ARM

jasoneckert.github.io

81–90 of 156 posts

Re: Windows Server 2025 Runs Better on ARM

#81
post #37

Windows developer here. After reading this post, my gut instinct is that this is due to something called 'segment heap'. A bit of backstory: there are two, totally independent implementations behind the Windows heap allocation APIs (i.e. the implementation code behind RtlHeapAlloc and RtlHeapFree, which are called by malloc/free). The older of the two, developed uring the Dave Cutler era, is known as the "NT heap". T…

This feels like it deserves to live somewhere on a blog, not as a comment on some forum. This is really interesting thanks for sharing.

Agreed! Looks like it can be enabled with a manifest at build time too: https://learn.microsoft.com/en-us/windows/win32/sbscs/applic...

Re: Windows Server 2025 Runs Better on ARM

#82
post #42
post #8

Cant believe somebody is still using windows server? What’s the use case?

Many companies only have legacy software/server/services running on windows.

Yeah, I worked at a company with a Windows application dating from the early 1990s - I suspect it was a case of them needing to move off some ancient hardware and software and Linux was in its infancy and Unix was probably still quite expensive.

Re: Windows Server 2025 Runs Better on ARM

#83
post #76

Earlier quoted context omitted.

For others unfamiliar with Windows, according to https://learn.microsoft.com/en-us/windows-server/administrat... "High Performance" entails: > Processors are always locked at the highest performance state (including "turbo" frequencies). All cores are unparked. Thermal output may be significant.

This isn’t specific to windows. This is also basically the same terminology Linux uses.

There's no mode spelled the same ("High Performance") - and I don't think Linuxes universally do this:

> Processors are always locked at the highest performance state (including "turbo" frequencies).

Unless performance state means something idiosyncratic in MS terminology.

Normally you'd want to let idle apply power saving measures including downclocking to donate some unused power envelope to busy cores, increasing overall performance.

But this varies across various Linux based platforms. For example on RHEL (https://docs.redhat.com/en/documentation/red_hat_enterprise_...):

"throughput-performance:

    A server profile optimized for high throughput that disables power savings mechanisms. It also enables sysctl settings to improve the throughput performance of the disk and network IO. 
accelerator-performance:

    A profile that contains the same tuning as the throughput-performance profile. Additionally, it locks the CPU to low C states so that the latency is less than 100us. This improves the performance of certain accelerators, such as GPUs. 
latency-performance:

    A server profile optimized for low latency and disables power savings mechanisms and enables sysctl settings that improve latency. CPU governor is set to performance and the CPU is locked to the low C states (by PM QoS). "
Here the latency-performance profile sounds most like the Windows Server mode (but differnet from throughput-performance).

Re: Windows Server 2025 Runs Better on ARM

#84

Earlier quoted context omitted.

You likely tripped over a difference in power management profiles (and capabilities) between Intel and ARM. You're testing "variability" and latency, and you even mention that "modern Intel CPUs tend to ramp frequency..." but entirely neglect to mention which specific Windows Power Profile you were using. Fundamentally, you're benchmarking a server operating system on laptops and/or desktop-class hardware, and not th…

Both Windows 11 systems are configured with the “High performance” power plan, as are the two Windows Server VMs. In hindsight, I should have included this detail explicitly in the original post instead of only alluding to it.

Even if you do that, there are firmware-level overrides that most laptops won't allow you to override. If you did, the laptop would melt.

You might be benchmarking the chassis fans more than the CPUs!

Re: Windows Server 2025 Runs Better on ARM

#85
post #37

Windows developer here. After reading this post, my gut instinct is that this is due to something called 'segment heap'. A bit of backstory: there are two, totally independent implementations behind the Windows heap allocation APIs (i.e. the implementation code behind RtlHeapAlloc and RtlHeapFree, which are called by malloc/free). The older of the two, developed uring the Dave Cutler era, is known as the "NT heap". T…

> You can turn it on globally for all processes by creating a DWORD value named "Enabled" under HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Segment Heap, and giving it a value of 3 I had previously seen this described as 0 vs non-zero. Since you have some inside experience :), anything special about 3 instead? What about 2? How would I find these value meanings out on my own (if that's even possible)? Thank…

It's a combinination of bit flags. The lowest bit controls whether segment heap is on or off. The 2nd lowest bit bit controls some additional optimizations that go along with it, something about multithreading. A value of 3 (both flags set) gives you identical behavior to what specifying SegmentHeap in your application manifest does.

Using the application manifest approach is the right way to ship software that opts into segment heap. The registry thing is just a convenience for local testing.

Re: Windows Server 2025 Runs Better on ARM

#86
post #32
post #13

Earlier quoted context omitted.

Why did they port it to Linux? Knowing nothing about this, I wonder if they're getting ready to retire Windows Server, and wanted to get their server products off it? Edit: How they did it is also quite fascinating: https://www.microsoft.com/en-us/sql-server/blog/2016/12/16/s... https://www.microsoft.com/en-us/research/project/drawbridge/ >a key contribution of Drawbridge is a version of Windows that has been enlight…

Wait until you read about the version they released for ARM, briefly! It had a dynamic recompiler which would produced ARM64 ELF libraries from Windows PE executables, allowing x86_64 MSSQL to run on ARM Linux! They ditched that once Rosetta support on ARM Macs was good enough to run x86_64 VMs, as apparently all they cared about was supporting Docker on Macs... I think it is essentially "complete drawbridge", too. I…

> They ditched that once Rosetta support on ARM Macs was good enough to run x86_64 VMs, as apparently all they cared about was supporting Docker on Macs...

Was a research project gone out of hand, arm64 macOS wasn't on the radar and the IoT product it was released for didn't succeed.

> I think it is essentially "complete drawbridge", too. I haven't played around with it in a while, but from memory, you can coerce it to run arbitrary Windows executables, basically anything without graphics (which are missing from the PAL they ship).

sbtrans (for arm64) was static binary translation only. No JIT fallback whatsoever.

> It's quite impressive, though also necessary if you think about it. SQL Server requires the legacy dot net stack,

The arm64 sbtrans-based version had that gone too, and it didn't have a nice engineering path towards supporting those. It'll come back later though I'm pretty sure, with using a more native arm64 version (or arm64EC which exists nowadays)

> AND it also ships with a full copy of the msvc compiler/linker! Not sure if that's ever used by the Linux port, but it is installed. MSSQL kind of exercises every inch of the Windows API surface.

Yes that's used for dynamic query optimisation. It was disabled in Azure SQL Edge for arm64 as that was a JIT-less translated version.

Re: Windows Server 2025 Runs Better on ARM

#87

I mean we were suspecting for some time that smartphone processors have reached parity with laptop class ones. MacBook Neo proved it. Not clear how both Amd and Intel not only lost the smartphone fight but also lost in their own field (aka servers, laptops, desktops) 15 years ago if I told you that windows would be running better on ARM you would call me crazy.

According to CPU bench, the Neo CPU is about the same speed as a mid range intel laptop CPU from 4 years ago.

Apple A18 Pro (Q1 2026): Multithread 11977, Single Thread 4043

Intel Core i5-1235U (Q1 2022): Multithread 12605, Single Thread 3084

--

On the high-end we got i9-13900KS at about 60k, M5 Max 18 scores about the same. But when you move on to server CPUs like Threadripper and EPYC things are about 3x faster.

Lets see if the brand new Arm AGI changes this situation in a few months.

Re: Windows Server 2025 Runs Better on ARM

#88
Does Windows on ARM use VBS/Virtualization Based Security, and does ARM support nested virtualization to do so in a VM, too? Does it employ costly CPU vulnerability mitigation techniques that might hit two times in a VM (unless the Hypervisor is adequately set up, which I'd hope is the default for Hyper-V)? Those two things account for most of the common performance problems observed when putting modern Windows in a VM. I'd love to know more about it, but the article does not seem to mention either.

Re: Windows Server 2025 Runs Better on ARM

#89
post #13

Earlier quoted context omitted.

It's "legacy" because it's essentially tied to Windows. Yes, technically it works on Linux, and no doubt that was an amazing feat, but no serious company is running MSSQL on Linux when all the documentation, all the best practices are all based on running that on Windows.

Why did they port it to Linux? Knowing nothing about this, I wonder if they're getting ready to retire Windows Server, and wanted to get their server products off it? Edit: How they did it is also quite fascinating: https://www.microsoft.com/en-us/sql-server/blog/2016/12/16/s... https://www.microsoft.com/en-us/research/project/drawbridge/ >a key contribution of Drawbridge is a version of Windows that has been enlight…

Isn't that basically a heavier version of a unikernel?

Re: Windows Server 2025 Runs Better on ARM

#90
post #67
post #34

Earlier quoted context omitted.

I know of a couple of rather fancy, proprietary 2-way radio trunking systems products that use local MS SQL on the back end, to keep track of configs for individual subscriber radios and system configurations for the radio repeaters. (What's that? Well, if you ever walk into a place like a gigantic oil refinery, you'll see a bunch of people working there. If you look long enough, you'll notice that each of them have…

Yup, thanks big M for making things fun as usual. I deal with the same thing on the P25 side.

An ASTRO Core is a terrifying thing to see.
Post reply on HN