3 ms·
This is interesting: > https://en.wikipedia.org/wiki/Virtual_memory_compression#History https://en.wikipedia.org/wiki/Virtual_memory_compression#His... When I
by asveikau 8y ago
This is interesting:
> https://en.wikipedia.org/wiki/Virtual_memory_compression#History https://en.wikipedia.org/wiki/Virtual_memory_compression#His...
When I worked at MS I heard some chatter about people doing it with NT circa 2010 (I guess per this wikipedia article it didn't ship until five years later). Then after I left I heard there were Linux patches from before that (wikipedia cites 2008, with it being in the mainline tree in 2013). And then later, that Apple had also done it.
It's interesting that a bunch of major operating systems decided to do this roughly the same time.
- dfox 8y agoThere was various adhoc hackish support for compressed RAM and swapping to various RAM-like things (eg. VRAM) in Linux since at least 2004. But around the 2010 doing such stuff started to be somewhat worthwhile for somewhat normal use cases and not only neat trick that had some questionable benefit for live-CDs and nothing much else.
- bhouston 8y agoIt is available in win 10: https://www.howtogeek.com/319933/what-is-memory-compression-in-windows-10/ https://www.howtogeek.com/319933/what-is-memory-compression-...
- jrockway 8y ago> It's interesting that a bunch of major operating systems decided to do this roughly the same time. I'm guessing it's due to the popularity of 64-bit address space. There are lots of pointers in RAM, and while they use a lot of bits, they don't have much entropy. So they probably compress extremely well, and with compression, give one less reason to stick to 32-bit architecture. (I don't fully understand why, but I hear that people run 32-bit OSes on 64-bit machines to save memory. As long as one process uses less than 4G of RAM, maybe it's the right optimization. But memory compression certainly changes that calculus and gives the OS vendors one less use case to have to support a 32-bit OS for.)
- Steltek 8y agoOr it's the latency chasm between RAM and disk. A cursory googling to refresh my own memory, SSD is at least 100x slower than peeking at RAM and possibly much more, depending on who's numbers you trust. It seems at least plausible to save time by compressing pages in memory rather than going to disk. Certainly for low end or consumer systems not blessed with gobs of RAM.
- willglynn 8y agoOne alternative would be to define an ABI for using the x86-64 processor with 32-bit pointers. This would let everyone leave the processor in the more modern 64-bit mode without increasing pressure on the memory subsystem. Such a thing exists: https://en.wikipedia.org/wiki/X32_ABI https://en.wikipedia.org/wiki/X32_ABI It's been available in the mainline Linux kernel and in glibc for ages. It also breaks any code which assumes #ifdef __x86_64__ means 64-bit pointers, and the concept doesn't seem to attract a lot of excitement: https://www.phoronix.com/scan.php?page=news_item&px=MTU1MjE https://www.phoronix.com/scan.php?page=news_item&px=MTU1MjE