Remix.run Logo
p_ing 3 days ago

Windows 10 introduced memory compression. Here's a discussion from 2015 [0]. And one on Linux by IBM from 2013 [1]. But the history goes way back [2].

I don't know why that '8GiB is great!' -- no, no it isn't. Your memory usage just spills over to swap faster. It isn't more efficient (not with those 16KiB pages).

[0] https://learn.microsoft.com/en-us/shows/Seth-Juarez/Memory-C...

[1] https://events.static.linuxfound.org/sites/events/files/slid...

[2] https://en.wikipedia.org/wiki/Virtual_memory_compression#Ori...

acdha 3 days ago | parent | next [-]

Yes, I'm aware that Windows has memory compression, so let's think about why it's less successful and Windows systems need more memory than Macs.

The Apple version has a very high-performance hardware implementation versus Microsoft's software implementation (not a slam on Microsoft, they just have to support more hardware).

The Apple designers can assume a higher performance baseline memory subsystem because, again, they're working with hardware designers at the same company who are equally committed to making the product succeed.

The core Mac frameworks are optimized to reduce VM pressure and more Mac apps use the system frameworks, which means that you're paying the overhead tax less.

Many Mac users use Safari instead of Chrome so they're saving multiple GB for an app which most people have open constantly as well as all of the apps which embed a WebKit view.

Again, this is not magic, it's aligned incentives. Microsoft doesn't control Intel, AMD, and Qualcomm's product design, they can't force Google to make Chrome better, and they can't force every PC vendor not to skimp on hardware. They can and do work with those companies but it takes longer and in some cases the cost incentives are wrong – e.g. a PC vendor knows 99% of their buyers will blame Windows if they use slower RAM to save a few bucks or get paid to preload of McAfee which keeps the memory subsystem busy constantly so they take the deal which adds to their bottom line now.

p_ing 3 days ago | parent [-]

Neither macOS nor Windows use a hardware-based accelerator for memory compression. It's all done in software. Linux zram uses Intel QAT but that's only available on a limited number of processors.

You seem to be under the mistaken impression that Microsoft cannot gear Windows to act differently based on the installed hardware (or processor). That's quite untrue.

acdha 3 days ago | parent | next [-]

It was software on Intel but they presumably added instructions with the intention of using them:

https://asahilinux.org/docs/hw/cpu/apple-instructions/

> You seem to be under the mistaken impression that Microsoft cannot gear Windows to act differently based on the installed hardware (or processor).

Definitely not - my point is simply that all of these things are harder and take longer if they have to support multiple implementations and get other companies to ship quality implementations.

p_ing 3 days ago | parent [-]

> Definitely not - my point is simply that all of these things are harder and take longer if they have to support multiple implementations and get other companies to ship quality implementations.

What's your source for it is "harder" or "takes longer"? #ifdef is a quite well known processor directive to developers and easy to use.

acdha 2 days ago | parent [-]

> What's your source for it is "harder" or "takes longer"?

Windows devices’ power management and battery life has been behind Apple since the previous century? If you think hardware support is a simple #ifdef, ask yourself how a compile-time flag can detect firmware updates, driver versions, or flakey hardware. It’s not that Apple’s hardware is perfect but that those are made by the same company so you don’t get Dell telling you to call Broadcom who are telling you to call Microsoft.

astrange 3 days ago | parent | prev [-]

> Neither macOS nor Windows use a hardware-based accelerator for memory compression.

Not true.

tguvot 3 days ago | parent | prev | next [-]

i think i had 20+ years ago servers with this https://www.eetimes.com/serverworks-rolls-out-chip-set-based...

achandlerwhite 3 days ago | parent | prev [-]

He didn’t say 8 gigs is great but that you can get by with about 8 gigs less than equivalent on Windows.