
以前在 Linux 上想跑类似的测试一直找不到比较方便直观的,自己用 intel 的 mlc 工具弄了个类似的写了个脚本。 大家需要测服务器内存带宽的时候可以用用。同时支持 Linux 和 Win ( powershell )。方便各位做 DevOps 之类的排障测试用。
https://github.com/Purestreams/linux-mlc-bench
Cache & Memory Benchmark (Intel MLC) By @Purestreams ━━━ System Information ━━━ Hostname epyc-pve OS Debian GNU/Linux 12 (bookworm) Kernel 6.8.12-15-pve Architecture x86_64 Virtualization none Uptime up 5 weeks, 6 days, 19 hours, 29 minutes NUMA Nodes 1 Root Disk 94G total, 59G used, 31G avail CPU Freq Governor performance ━━━ CPU Information ━━━ CPU Model AMD EPYC 7532 32-Core Processor Physical Cores 32 Logical CPUs 64 Max Frequency 2400.0 MHz CPU Family / Model / Stepping 23 / 49 / 0 L2 Cache 16 MiB (32 instances) L3 Cache 256 MiB (16 instances) ━━━ Memory Information ━━━ Memory Total 125.6 GiB Memory Type DDR4 (Synchronous Registered (Buffered)) Configured Speed 2667 MT/s Rated Speed 2133 MT/s DIMMs Installed 8 x 16 GB (8 slots total) Manufacturer Micron Part Number 36ASF2G72PZ-2G1A2 ECC Multi-bit ECC Channels In Use 8 Locator Size Bank Manufacturer ──────────────────────────────────────────────────────────────────── DIMMA1 16 GB P0_Node0_Channel0_Dimm0 Micron DIMMB1 16 GB P0_Node0_Channel1_Dimm0 Micron DIMMC1 16 GB P0_Node0_Channel2_Dimm0 Micron DIMMD1 16 GB P0_Node0_Channel3_Dimm0 Micron DIMME1 16 GB P0_Node0_Channel4_Dimm0 Micron DIMMF1 16 GB P0_Node0_Channel5_Dimm0 Micron DIMMG1 16 GB P0_Node0_Channel6_Dimm0 Micron DIMMH1 16 GB P0_Node0_Channel7_Dimm0 Micron ━━━ Setting Up Intel MLC ━━━ Downloading MLC from Intel... MLC ready: /tmp/mlc_bench_2447652/Linux/mlc ━━━ Memory & Cache Bandwidth ━━━ Level Read Write Copy ────────────────────────────────────────────────────────────────────── Memory (DRAM) 133.3 GB/s 127.0 GB/s 128.6 GB/s L1 Cache 2800.7 GB/s 114.6 GB/s 385.4 GB/s L2 Cache 1814.4 GB/s 124.2 GB/s 371.2 GB/s L3 Cache 132.6 GB/s 127.2 GB/s 128.5 GB/s ━━━ Memory & Cache Latency ━━━ Level Latency ────────────────────────────────────────────── L1 Cache 1.2 ns L2 Cache 7.4 ns L3 Cache 13.4 ns Memory (DRAM) 130.7 ns ━━━ Full Idle Latency Sweep (Buffer Size → Latency) ━━━ 16K 1.2 ns 64K 3.7 ns 256K 4.4 ns 1M 12.3 ns 4M 13.3 ns 16M 67.5 ns 64M 129.8 ns 256M 131.8 ns ━━━ Done ━━━ Elapsed time: 3m 14s Benchmark complete.