Read memory sequentially
memory_read · compared across machine types · 64 Series on 8 machine types · AWS us-east-2
Build
CPU
Path
Threads
Order
| Compare | Machine | Variant | P50 | P99 | Rate | Unit cost | Runs |
|---|---|---|---|---|---|---|---|
| c8a.2xlarge | 23.25 ms | — | 46.18 GB/s | $0.00926 /GB/s·h | 89 | ||
| c8i.2xlarge | 53.89 ms | — | 19.93 GB/s | $0.0186 /GB/s·h | 89 | ||
| c6i.8xlarge | 77.03 ms | — | 13.94 GB/s | $0.0975 /GB/s·h | 91 | ||
| i4i.2xlarge | 78.47 ms | — | 13.68 GB/s | $0.0531 /GB/s·h | 89 | ||
| m6id.2xlarge | 80.77 ms | — | 13.29 GB/s | $0.0357 /GB/s·h | 1 | ||
| m5.large | 85.85 ms | — | 12.51 GB/s | $0.00767 /GB/s·h | 91 |
Compared:m5.largec8i.2xlargec8a.2xlarge
Run-to-run spread
time per 1 GiB pass across counted RunsOver time
newest counted Runs, time per 1 GiB pass(one request each to the data API)
What this measures
How fast a buffer of 64-bit words is read front to back and summed, on one unpinned thread or on one pinned thread per allowed CPU, with a hand-written x86 scalar loop or with AVX2 loads. Whether the buffer comes from memory or from cache depends on its size and the machine.
What it does not measure
- Whether the buffer is read from memory or from cache depends on
size_bytesand on the machine's caches. A size that fits in a cache gives a cache figure, not a memory figure. The Run's dump sectionslscpuandsys_cpurecord the cache sizes. threads1is one unpinned thread: it is not what the whole box can read.- The figure is of these two loops. A program that reads memory with other code is not measured here.
Code & config
Benchmark docsSeries JSONc8a.2xlarge · static · avx2 · 1 thread
60__attribute__((noinline, target("avx2")))61static uint64_t memory_read_avx2(const uint64_t *vec, size_t len) {// …66 size_t i = 0;67 for (; i + 16 <= len; i += 16) {68 acc0 = _mm256_add_epi64(acc0, _mm256_loadu_si256((const __m256i *)(const void *)(vec + i)));69 acc1 = _mm256_add_epi64(acc1, _mm256_loadu_si256((const __m256i *)(const void *)(vec + i + 4)));70 acc2 = _mm256_add_epi64(acc2, _mm256_loadu_si256((const __m256i *)(const void *)(vec + i + 8)));71 acc3 = _mm256_add_epi64(acc3, _mm256_loadu_si256((const __m256i *)(const void *)(vec + i + 12)));72 }// …141static uint64_t single_run(void *arg) {142 single_t *s = (single_t *)arg;143 return s->read(s->data, s->len);144}// …291 lm_measure(single_run, &single);
Configuration
- benchmarkmemory_read
- buildstatic
- instancec8a.2xlarge
- regionus-east-2
- azuse2-az3
- params.pathavx2
- params.size_bytes1073741824
- params.threads1