
Memory Compression in Windows 10 RTM [video] - khellang
https://channel9.msdn.com/Blogs/Seth-Juarez/Memory-Compression-in-Windows-10-RTM?WT.mc_id=dx_MVP5000587
======
carlosrg
Watched the video the other day, enjoyed it. Note that this already exists in
OS X since Mavericks and in Linux since 3.11, although it's not enabled by
default on any distro AFAIK (more info:
[https://www.kernel.org/doc/Documentation/vm/zswap.txt](https://www.kernel.org/doc/Documentation/vm/zswap.txt)).

Related: I wish Apple did more things like this, videos explaining the
internals of the system. The OS X kernel source code is open but you need a
deep understanding of Mach and OS internals to understand what's going on. And
most processes and services running on the background are closed source and
who the hell knows what's going on.

~~~
imglorp
Apple has been very serious about not wanting you to know what's going on in
your machine since around 1984. The first Mac needed an extra-long hex wrench
to open, a very uncommon tool at the time. They want good developer
communities for good apps, yet they don't give them full control.

~~~
derefr
I don't know about "not wanting you to know what's going on in your machine."
It's more like they want you to treat their public OS API as "the machine": a
clean black-box abstraction layer you can build on.

What goes on underneath, while interesting, is _not guaranteed to be stable_.
They might, say, replace x86 with ARM one day, as they already replaced PPC
with x86. If you're targeting "the OSX platform", that doesn't affect you; you
just hit rebuild in XCode. If you're targeting _the underlying computer_ ,
you're screwed. Apple doesn't want you to be screwed (really, they don't!), so
they try to _disincentivize_ relying on anything below the public API.

Compare this to Microsoft, where the Windows team deals with cases like
these[1] by _inserting compatibility shims_ to keep the behavior of
applications using undocumented, non-public-APIs (or munging kernel-shared
opaque structs, even) stable between OS releases. While it's great for _end-
users_ —their apps don't break—it _incentivizes_ relying on private APIs,
because Microsoft will effectively keep your app running for you.

[1]
[http://blogs.msdn.com/b/oldnewthing/archive/2003/12/23/45481...](http://blogs.msdn.com/b/oldnewthing/archive/2003/12/23/45481.aspx)

~~~
tjoff
How is that relevant to a video like this? It's not something you can leverage
directly by tapping into a private API or something. It's just information
about how it works, which indirectly can benefit you as a programmer but the
technique itself is transparent and could be removed tomorrow without any
(other) consequences (unless I missed something, didn't watch the whole
thing).

------
Kenji
Is memory shortage really a problem these days? Frankly, if you have like
12-16GB of RAM, which is realistic even for notebooks, and you don't have 200
browser tabs open or work on very special tasks, you'll never fill that RAM.
In fact, I've been running Windows 7 with paging disabled (no pagefile to
lessen SSD wear. Turns out that was not necessary since you'd have to page
astronomic amounts to wear it noticeably) for years and never had a problem. I
mean, yeah, he mentioned 1GB Ram tablets, I see the point there.

Overall very informative and he's good at explaining. At first I thought the
concept was stupid but it's actually clever. Also: "If you have enough memory
[...] nothing is gonna get compressed either." So it's not like this slows you
down if you don't have to worry about memory size (like me).

~~~
tjoff
Yes, and it's becoming worse for each year. Ultrabooks has at best 8 GB but 4
GB is the norm (at least last time I looked). And if you look at Surface Pro
etc. 4 GB is the norm and 2 GB is mainstream. I might be 6 months out of date
or something but regardless the current state is quite appalling. I'm writing
this on a computer from 2008, and it has 8 GB of ram (and I've never updated
it, I would have done it if the motherboard supported more)...

~~~
yuhong
Win10's OEM licensing is forcing the restart of 2GB DDR3 module production:
[http://www.dramexchange.com/WeeklyResearch/Post/2/4118.html](http://www.dramexchange.com/WeeklyResearch/Post/2/4118.html)

------
johansch
My experience on an i4790k machine with 8 GB RAM after "upgrading" to Win 10:

Chrome tabs tend to get swapped out to SSD quite quickly. Re-opening those
tabs takes a few seconds now, compared to instantly before. Am pondering
adding another 8 GB for a total of 16 to see if it helps...

~~~
omgtehlion
Today 8GB of ram is a minimum for web browsing, unfortunately :(

~~~
rodgerd
Nonsense. I have a Windows 10 laptop with 2 GB of memory and it browses very
happily. Just don't use Chrome.

~~~
heywire
Ironically, my little C720 Chromebook running Chrome OS with 2GB of ram
browses pretty decently as well. But it also only has 1366x768 of screen real
estate to worry about...

------
jimrandomh
It's good that they're putting some work into the memory subsystem. My
experience on Windows 7 has been that it occasionally makes really bad memory
management decisions; in particular, if left overnight with a backup client
running (which will read the whole filesystem once through), I'll come back
and find everything has seemingly had its process memory paged out, so each
program and each tab will take some time to recover when I start using it
again.

------
acqq
If it just weren't "the one hand giveth the other hand taketh away."

I don't use Windows 10 but I read that the uncontrollable updates which take
long time are very annoying. Is it really that bad?

~~~
pmelendez
They aren't that annoying in my opinion since Win10 will ask you to schedule a
reboot in advance (within 3 days I think).

