Hacker News new | ask | show | jobs
by ungamedplayer 1469 days ago
There are many people that say that OSX doesn't have memory pressure and that Linux vm suffers so horribly in comparison. I have seen the same behavior as you describe.

I find that almost any system fails under memory pressure, they just fail differnetly.

5 comments

There's this hivemind on Reddit that believes M1 chips use memory 'more efficiently' and an '8GB machine is like a 16GB machine'

Having run Linux side by side with Mac OS since 2010, I'm not sure if it amazes me how much more memory the Mac uses or how efficient Linux is.

Nope that first line is not true. 8gb does not feel the same as 16gb

I had the 8gb for work, and i was routinely using about 10gb. Switching apps or desktops meant changing chunks of memory in and out of swap. it was noticeable most when switching 'spaces', since video memory is shared with that 8gb and was also swapped.

Honestly it was ms teams that was the worst offender for ram, even running all my dev environment stuff and other electron apps.

The M* chips have a very fast connection to the SSD so swap is less noticeable if you're basically running two memory heavy programs but only using one at a time (the other will swap out and can swap back in very fast).
Don't M1 chips just have some advantage with using hardware dedicated to constantly compress & decompress memory based on whether it's relevant or not to what the user is doing? Obviously this isn't unique to apple, I just read it was something the m1 chips could do quickly.
It’s not a hive mind, I had my intel MacBook Pro and M1 MacBook Pro side by side with the same apps open.

One was using 10GB, the M1 was using a little over 5GB of memory.

On macos, whenever I have a high memory pressure, coupled to a large swap usage, I find that the system becomes really sensitive to I/O intensive tasks.

If I start an IO intensive task (eg a recursive grep or a backup), any task that involves pulling data from the swap (eg switching desktops) gets significantly slower, and I often see the dreaded beach ball

For Linux zswap (lz4+z3fold) works quite well as a tier between RAM and direct swapping to disk. When RAM use hits a threshold it compresses pages and stores them back in memory (as opposed to writing them to disk). I've had pretty good performance with it provided there is enough CPU capacity for the compression and decompression. At the very least the slowdown when you begin swapping is much more gradual, especially on low memory machines.
I think it is mostly people comparing iOS with android and assuming the same situation applies to desktop operating systems as well.
"Fail different"