sh DIMM内存测试
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sh DIMM内存测试相关的知识,希望对你有一定的参考价值。
# L1 32K
# L2 256K
# L3 256M
# cache line 64 bytes
rm -rf mem_lat_case* mem_bw.txt linpak.txt
CPU_CNT=`grep -c processor /proc/cpuinfo`
DIMM_CNT=`sudo lshw -c memory | grep -e 'description' | grep -e 'DIMM' | grep -c -v -e empty`
# 1
# stride size less than cache line size
# total malloc is lesser than L3 cache
sudo /usr/bin/chrt -r 10 taskset -c 1 numactl --localalloc /opt/blah-vidops-infratools/bin/lat_mem_rd 128 64 2>&1 | tee mem_lat_case_1.txt
# 2
# stride size more than cache line size
# total malloc is more than L3 cache
# numa local bind - same as above
sudo /usr/bin/chrt -r 10 numactl --physcpubind=1 --membind=0 /opt/blah-vidops-infratools/bin/lat_mem_rd 4096 128 2>&1 | tee mem_lat_case_2.txt
# 3
# stride size more than cache line size
# total malloc is more than L3 cache
# numa distatnt bind
sudo /usr/bin/chrt -r 10 numactl --physcpubind=1 --membind=1 /opt/blah-vidops-infratools/bin/lat_mem_rd 4096 128 2>&1 | tee mem_lat_case_3.txt
# 4
# stride size more than cache line size
# total malloc is more than L3 cache
# numa distatnt bind
sudo /usr/bin/chrt -r 10 numactl --physcpubind=1 --interleave=all /opt/blah-vidops-infratools/bin/lat_mem_rd 4096 128 2>&1 | tee mem_lat_case_4.txt
# 5
# simulate TLB shootdown
sudo /usr/bin/chrt -r 10 numactl --physcpubind=1 --localalloc /opt/blah-vidops-infratools/bin/lat_mem_rd 51200 10240 2>&1 | tee mem_lat_case_5.txt
# sudo perf stat -e dTLB-loads,dTLB-load-misses,iTLB-loads,iTLB-load-misses /usr/bin/chrt -r 10 taskset -c 1 numactl --localalloc /usr/lib/lmbench/bin/x86_64-linux-gnu/lat_mem_rd 128 64
sudo KMP_AFFINITY=granularity=core,compact OMP_NUM_THREADS=${CPU_CNT} numactl --localalloc /opt/blah-vidops-infratools/bin/stream_omp_intel | tee mem_bw.txt
cat > blah_linkpak <<-"EOF"
Twitch specific linpak
Maximum memory footprint will stay just below 64G with problem size below
7 # number of tests
20000 50000 65000 70000 80000 85000 90000 # problem sizes
20016 50000 65000 70000 80000 85008 90000 # leading dimensions
3 3 3 3 3 3 3 # times to run a test
4 1 1 1 1 1 1 # alignment values (in KBytes)
EOF
sudo KMP_AFFINITY=granularity=core,scatter /usr/bin/chrt -r 10 numactl --interleave=all /opt/blah-vidops-infratools/bin/xlinpack_xeon64 blah_linkpak | tee linpak.txt
tar czpvf perf_dimm_${DIMM_CNT}.tar.gz mem_lat_case* mem_bw.txt linpak.txt
以上是关于sh DIMM内存测试的主要内容,如果未能解决你的问题,请参考以下文章