News for hackers. Stuff that matters.
Re:Apple Silicon M1: Black Magic Fuckery by nojito on Tuesday November 24, 2020 @07:00PM (#25204461)
The quote right after explains your concerns.

>The memory bandwidth on the new Macs is impressive. Benchmarks peg it at around 60GB/sec–about 3x faster than a 16” MBP. Since the M1 CPU only has 16GB of RAM, it can replace the entire contents of RAM 4 times every second. Think about that…

Re:Apple Silicon M1: Black Magic Fuckery by darren_ on Tuesday November 24, 2020 @07:28PM (#25204640)
Yes, reading some more of the discussions it seems like the answer is that (roughly) the same amount of memory is used, but hitting swap is no longer a major problem, at least for user-facing apps. Seems like the original quote is reading too much into the retain/release thing.
Re:Apple Silicon M1: Black Magic Fuckery by jml7c5 on Tuesday November 24, 2020 @07:38PM (#25204704)
If the same amount of memory is used, then wouldn't swap usage be the same?
Re:Apple Silicon M1: Black Magic Fuckery by garretraziel on Wednesday November 25, 2020 @05:59AM (#25207947)
Yeah, but swapping suddenly isn't as big problem as before (probably). You had to be very careful not to hit trashing on x86_64, now you don't have to worry so much.

Or that's how I understand this, I don't actually own M1 Mac.

Re:Apple Silicon M1: Black Magic Fuckery by gameswithgo on Tuesday November 24, 2020 @07:38PM (#25204706)
first there is no sensible reason why ram bandwidth would be different by 3x, its lpddr4x either way, and you can’t replace it from an ssd that fast, the ssd would limit swap speed
Re:Apple Silicon M1: Black Magic Fuckery by nojito on Tuesday November 24, 2020 @08:09PM (#25204890)
What?

https://www.anandtech.com/show/16252/mac-mini-apple-m1-teste...

> Besides the additional cores on the part of the CPUs and GPU, one main performance factor of the M1 that differs from the A14 is the fact that’s it’s running on a 128-bit memory bus rather than the mobile 64-bit bus. Across 8x 16-bit memory channels and at LPDDR4X-4266-class memory, this means the M1 hits a peak of 68.25GB/s memory bandwidth.

The point of the memory bandwidth is so that it never has to swap to disk in the first place.

Re:Apple Silicon M1: Black Magic Fuckery by ericpauley on Tuesday November 24, 2020 @08:50PM (#25205134)
> The point of the memory bandwidth is so that it never has to swap to disk in the first place.

What? How does memory bandwidth obviate the need for disk swapping?

Re:Apple Silicon M1: Black Magic Fuckery by ubercow13 on Tuesday November 24, 2020 @08:46PM (#25205112)
How does memory bandwidth prevent it needing to swap to disk?
Re:Apple Silicon M1: Black Magic Fuckery by Izikiel43 on Tuesday November 24, 2020 @09:31PM (#25205377)
By swap speed I think he meant that the bottle neck is the time that it takes to move data from the SSD to the RAM, not how fast can the RAM be read from the processor.
Re:Apple Silicon M1: Black Magic Fuckery by nottorp on Tuesday November 24, 2020 @07:10PM (#25204535)
Sounds like some form of GDDR instead of plain DDR. Not only faster, but I bet simultaneously accessible from both the CPU and GPU.
Re:Apple Silicon M1: Black Magic Fuckery by MBCook on Tuesday November 24, 2020 @07:29PM (#25204650)
> Not only faster, but I bet simultaneously accessible from both the CPU and GPU.

It is. We know they're using a unified memory architecture, they pointed it out in the presentation.

Re:Apple Silicon M1: Black Magic Fuckery by nottorp on Tuesday November 24, 2020 @07:51PM (#25204786)
Unified doesn't necessarily mean dual ported.
Re:Apple Silicon M1: Black Magic Fuckery by dfox on Tuesday November 24, 2020 @09:52PM (#25205520)
Due to how DRAM works the array itself cannot have more than one port and almost certainly even the DRAM chip as a whole is still some variation of single ported SDRAM (long time ago there were various pseudo-dual-ported DRAM chips, but these were only really useful for framebuffer-like applications). But given that there are multiple levels of cache in the SoC it is somewhat moot point.
Re:Apple Silicon M1: Black Magic Fuckery by sliken on Wednesday November 25, 2020 @12:40AM (#25206302)
LPDDR4x (the ram chips in the m1) comes in dual port flavors.
Re:Apple Silicon M1: Black Magic Fuckery by formerly_proven on Wednesday November 25, 2020 @04:45AM (#25207495)
I suspect you mean they come with two channels on a single chip, which is not the same as two ports. Channels access separate bits of memory. Ports access the same bits of memory.
Re:Apple Silicon M1: Black Magic Fuckery by mehrdada on Wednesday November 25, 2020 @01:50AM (#25206572)
Nope. Nothing too magical, I suspect. It says LPDDR4 right there in System Profiler, although it does not indicate the frequency.
Re:Apple Silicon M1: Black Magic Fuckery by ytch on Tuesday November 24, 2020 @08:15PM (#25204918)
This reminds me that Xbox series X/PS5 use Unified GDDR for higher memory bandwidth, I'm curious if such design can help x86 catch up M1?
Re:Apple Silicon M1: Black Magic Fuckery by kllrnohj on Tuesday November 24, 2020 @08:43PM (#25205098)
x86 has been doing unified memory for integrated GPUs since at least 2015. It's not a new thing, see for example https://bit-tech.net/news/tech/cpus/amd-huma-heterogeneous-u...

The reason GDDR isn't typically used for system RAM is it's higher latency & more power hungry. Like, the GDDR6 memory on a typical discreet card uses more power than the an entire M1-powered Mac Mini power hungry.

Re:Apple Silicon M1: Black Magic Fuckery by ytch on Tuesday November 24, 2020 @08:48PM (#25205121)
Thanks, I haven't noticed the latency/power difference of GDDR memory.
Re:Apple Silicon M1: Black Magic Fuckery by gameswithgo on Tuesday November 24, 2020 @07:39PM (#25204710)
no its normal mobile ram
Re:Apple Silicon M1: Black Magic Fuckery by sliken on Wednesday November 25, 2020 @12:41AM (#25206311)
The M1 has 4 LPDDR4x chips inside the the CPU package running at 4266 Mhz and showing some of the best latencies I've seen.

What "normal" laptop has that?

Re:Apple Silicon M1: Black Magic Fuckery by MobiusHorizons on Wednesday November 25, 2020 @02:26AM (#25206748)
I believe the poster meant "normal" in the sense that it's a conventional memory technology for laptops. (ie LPDDR4 not GDDR like had been suggested above).
Re:Apple Silicon M1: Black Magic Fuckery by gameswithgo on Wednesday November 25, 2020 @07:36AM (#25208545)
being inside the cpu package should allow for less than a 1% improvement in latency by my napkin math. its got good latency because it is a top of the line mobile ram setup but that isn’t unique to m1
Re:Apple Silicon M1: Black Magic Fuckery by sliken on Wednesday November 25, 2020 @11:02AM (#25210610)
I 100% agree, but I've audited my code, and on other platforms my code closely agrees with LMbench's lat_mem_rd, which seems pretty well regarded for accuracy.

The latency appears real to me.