Re:Apple Silicon M1: Black Magic Fuckery
by sgerenser on Wednesday November 25, 2020 @12:24AM
(#25206247)
The only thing I can think of that would actually reduce memory usage on M1 vs the same version of MacOS on x86 would be if they were able to tune their compressed memory feature to run faster (with higher compression ratio) on the M1. That would serve to reduce effective memory usage or need to fall back to swap. I would not expect something like that to be responsible for more than, say, a 5-10% RAM usage decrease though.
[ Parent
| on HN ]
Re:Apple Silicon M1: Black Magic Fuckery
by danieldk on Wednesday November 25, 2020 @01:54AM
(#25206590)
That would serve to reduce effective memory usage or need to fall back to swap. I would not expect something like that to be responsible for more than, say, a 5-10% RAM usage decrease though.
I think you can reach a lot more than that. Presumably, on Intel they use something like LZO or LZ4, since it compresses/decompresses without too much CPU overhead. But if you have dedicated hardware for something like e.g. Brotli or zstd, one could reach much higher compression ratios.
Of course, this is assuming that memory can be compressed well, but I think this is true in many cases. E.g. when selecting one of the program/library files in the squash benchmarks:
https://quixdb.github.io/squash-benchmark/
you can observe higher compression ratios for e.g. Brotli/gzip/deflate than LZO/LZ4.
Re:Apple Silicon M1: Black Magic Fuckery
by sgerenser on Wednesday November 25, 2020 @07:35AM
(#25208542)
I suspect Apple is using their own LZFSE[0] compression, perhaps now with special tweaks for M1. The reason I only suspected a 5-10% increase though is even if it’s able to achieve a massive increase in compression ratio (compressing 3GB to 1GB instead of 2GB, say), that’s still only saving 1GB total. Which I guess isn’t nothing and is more than 10% on an 8GB machine.