Live data from Hacker News

How much memory bandwidth do large Amazon instances offer?

lemire.me

31–40 of 50 posts

Re: How much memory bandwidth do large Amazon instances offer?

#31

7950x3d w/ 128GB at stock timings (~3200MT/s?). Showed a high base but no increase with threads, need to investigate what is happening. 1 54.7 2 50.6 3 49.6 4 48.2 5 47.9 6 47.4 7 47.1 8 46.6 9 46.5 10 46.2 11 46.1 12 45.9 13 45.8 14 45.7 15 45.7 16 45.7 17 45.7 18 45.8 19 45.9 20 45.8 21 45.8 22 45.6 23 45.6 24 45.5 25 45.5 26 45.5 27 45.5 28 45.4 29 45.4 30 45.4 31 45.4 32 45.4

7950x with 4x32GB @ 3800MHz here. Getting similar results except my single thread performance is the worst (around 40), otherwise it looks almost identical. I assume my poor single thread perf is due to having capped max CPU core clock at 4.5Ghz. Getting 4 sticks to boot was a pain, haven't really bothered to change anything once I finally got it running stable.

Re: How much memory bandwidth do large Amazon instances offer?

#32

I changed data_volume to 8GB and ran on my 4 year old laptop (Amd Ryzen 4800H + 2 x 8GB 3200MHz DDR4 running NixOS with Linux 6.1.71) I get around 36 GB/s 1 20.9 2 33.4 3 35.7 4 36.2 5 35.2 6 35.4 7 34.7 8 34.9 9 34.0 10 34.2 11 34.4 12 34.3 13 33.8 14 33.6 15 33.4 16 32.9 I expected 51.2 GB/s (2 x 3200 x 1e6 Transfers/s of 8 bytes each)

Either because it is a laptop CPU or (less likely) because it is an older Zen 2 might prevent it to reach the DRAM throughput.

Running the test on a desktop Zen 3 (5900X) with slower ECC DDR4-2666, i.e. with a maximum throughput of 42.7 GB/s, provides for 2 or more threads a throughput around 39 GB/s, with a maximum of 39.5 GB/s at 4 threads.

Re: How much memory bandwidth do large Amazon instances offer?

#34

Note that you can get a significant speedup by using "restrict" on the pointer in the "sum()" function to tell the compiler that there is no mutation or aliasing happening during the call's lifetime. On Godbolt, with a size of 100MB (due to limits), this improves the speed using LLVM 17 ( https://godbolt.org/z/6dW1h8aev ) from: 1 15.1 2 15.9 To ( https://godbolt.org/z/sh3489Mxv ) 1 12.8 2 13.7

Isn't higher better?

Re: How much memory bandwidth do large Amazon instances offer?

#35
> You can double this amount of bandwidth with NUMA-aware code, but it will require further engineering.

If you have non uniform memory, you may be shooting yourself in the foot. Author used a dual socket system. If you are not careful, and your code is not NUMA aware, you may end up with less memory bandwidth for your application, than a single-socket would have. Can be avoided by prefixing `numactl --cpubind=0` to your command

Re: How much memory bandwidth do large Amazon instances offer?

#36
post #23

For reference, this is an M1 Pro - the first run is consistently half speed so I’m guessing that’s some kind of scheduler adjustment: 1 59.9 2 109.1 3 108.4 4 109.1 5 108.0 6 109.3 7 109.4 8 110.5 9 119.3 10 123.9

This is why M series chips "feels" faster

Re: How much memory bandwidth do large Amazon instances offer?

#37

I changed data_volume to 8GB and ran on my desktop (Amd Ryzen5 7600X + 2x8GB DDR5-4800 running @ 5000 Mhz)(Win11) I get around 55 GB/s PS E:\> .\bandwidth.exe 1 54.0 2 56.7 3 56.1 4 55.3 5 54.6 6 54.3 7 53.9 8 53.1 9 53.4 10 53.1 11 52.3 12 52.8 55 is kinda low for DDR5 I guess.. On S23 Ultra (Snapdragon 8 Gen 2+, 12GB LPDDR5X @4200MHz) u0_a339@localhost ~> ./bandwidth 1 34.4 GB/s 2 38.7 GB/s 3 42.0 GB/s 4 42.3 GB/s…

[deleted]

Re: How much memory bandwidth do large Amazon instances offer?

#38

I changed data_volume to 8GB and ran on my desktop (Amd Ryzen5 7600X + 2x8GB DDR5-4800 running @ 5000 Mhz)(Win11) I get around 55 GB/s PS E:\> .\bandwidth.exe 1 54.0 2 56.7 3 56.1 4 55.3 5 54.6 6 54.3 7 53.9 8 53.1 9 53.4 10 53.1 11 52.3 12 52.8 55 is kinda low for DDR5 I guess.. On S23 Ultra (Snapdragon 8 Gen 2+, 12GB LPDDR5X @4200MHz) u0_a339@localhost ~> ./bandwidth 1 34.4 GB/s 2 38.7 GB/s 3 42.0 GB/s 4 42.3 GB/s…

[deleted]

Re: How much memory bandwidth do large Amazon instances offer?

#39
post #34

Note that you can get a significant speedup by using "restrict" on the pointer in the "sum()" function to tell the compiler that there is no mutation or aliasing happening during the call's lifetime. On Godbolt, with a size of 100MB (due to limits), this improves the speed using LLVM 17 ( https://godbolt.org/z/6dW1h8aev ) from: 1 15.1 2 15.9 To ( https://godbolt.org/z/sh3489Mxv ) 1 12.8 2 13.7

Isn't higher better?

yes. The result is max bandwidth in GB/s https://github.com/lemire/Code-used-on-Daniel-Lemire-s-blog/...

Re: How much memory bandwidth do large Amazon instances offer?

#40
post #23

For reference, this is an M1 Pro - the first run is consistently half speed so I’m guessing that’s some kind of scheduler adjustment: 1 59.9 2 109.1 3 108.4 4 109.1 5 108.0 6 109.3 7 109.4 8 110.5 9 119.3 10 123.9

This is why M series chips "feels" faster

No it's not.
Post reply on HN