Hacker News new | ask | show | jobs
by pxmpxm 1252 days ago
How is that possible? Or by "never run into any issues" you mean the machine wasn't completely unusable while it continuously was swapping everything everything to disk?

As I sit here and type with one citrix session and two chrome tabs open, I'm using 16.91gb of heap.

2 comments

I've seen quite a few YouTube videos of people seeing how much they can do on minimally configured Apple silicon Macs, and it is insane.

My guess is that what is going on is that the internal storage is so fast that if it has to swap when switching tasks it doesn't really cause much slowdown, so that as long as each individual task can fit in memory during its time slice you are fine.

(Well...fine in the sense that it is almost as fast as a system with much more memory. But if I'm right it is also increasing the write load on the SSD and so lowering its lifetime, which those who want to use their computers for a long time might want to take into account).

I'd guess the same would happen on other operating systems and architectures if the SSD was fast enough.

Internal storage will still be an order of magnitude slower than ram, right?

Apple silicone memory bandwidth is like 100-200Gb/sec versus maybe 10Gb/sec for the ssd on a good day. Anyone can run on like a gig of heap, but nothing will be "fast", including apple silicone.

At 10 GB/sec it would take ~800 ms if you were trying to resume a process that needs 8 GB and was entirely swapped out, assuming that all 8 GB have to be present for it to run. (Add another 800 ms if it has to entirely swap out 8 GB of the previous process to make room, unless the SSD can overlap reads and writes).

But most big processes don't need everything to be present in memory to resume. You just need to bring in the code and data that will be used in the short term.

10 GB in a second is 1 GB in 100 ms or 100 MB in 10 ms or 1 MB in 100 µs.

For many programs, especially GUI programs, you can maybe swap in enough for the main event loop and whatever is being actively worked on in a couple ms. Then as the user continues working you might have to spend another ms or so when they do something that needs code or data that wasn't already brought in.

Yes, my machine does swap quite generously. I have never noticed any slowdowns except when working with large video projects. However, I'm coming from an entry level 2015 MacBook Pro, so maybe I just don't know what's fast anymore. I am a little concerned about the SSD lifespan but that's something I'm still looking into.