延續上一篇博文,本文主要講述具體測試的一個過程,主要利用上述博文中的
四、測試準備以及基準值測試
1 、運行腳本
運行腳本放在SPECCPU2006安裝目錄下/cpu2006.
. ./shrc
#設置環境變量,shrc即爲設置腳本
. ./numa-detection.sh
#numa檢測代碼,確認是否爲numa架構以及cpu、內存信息
ulimit -s unlimited
#設置線程棧大小沒有限制
a=`cat /proc/cpuinfo | grep processor |wc -l`
#查看邏輯核數
rm -rf topo.txt
specperl nhmtopology.pl #執行nhmtopology.pl腳本,返回結果physcialfirst或者physicallogical,分別表示是否開啓超線程,一般現在返回的均爲physicalfirst
b=`cat topo.txt`
c=`expr $a / 2`
#物理核數量
echo"****************************************************************"
echo Running rate with $a copies on anAVX2 system with a topology of $b
echo"****************************************************************"
echo 1 > /proc/sys/vm/drop_caches
#清空cache緩存內容,
numactl --interleave=all runspec --define invoke_with_interleave--define default-platform-flags --rate $a -c cpu2006-1.2-ic16.0u2-lin64-ws-avx2-rate-20160328.cfg --define smt--define cores=$c --define $b --define invoke_with_interleave --define drop_caches--define THP_enabled -T all -o all fp
#運行浮點測試,這個runspec進程使用interleav=all的內存分配策略,可以在所有的內存和cpu上進行負載均衡策略。--rate 表示運行copy的數量爲192;-T all表示測試所有的集合(base和peak),同時-o all表示測試集的大小爲(test、ref)。
numactl --interleave=all runspec --define invoke_with_interleave--define default-platform-flags --rate $a -c cpu2006-1.2-ic16.0u2-lin64-ws-avx2-rate-20160328.cfg --define smt--define cores=$c --define $b --define invoke_with_interleave --definedrop_caches --define THP_enabled -T all-o all int
#同fp一樣的測試腳本
2、BIOS準備工作
上述準備工作完成後,需要配置BIOS相關內容。必須設置的幾項,如下圖所示
Energy Performance Tuning | BIOS |
Energy Performance BIAS | Performance |
Workload Configuration | Balanced |
Hyper-Threading | Enable |
Intel Virtualization Technology | Disable |
Power Technology | Custom |
Package C Sstate limit | C0/C1 state |
CPU C3 report | Disable |
CPU C6 report | Enable |
Enhanced Halt State(C1E) | Disable |
EIST(P-State) | Enable |
ACPI T-State | Disable |
VMSE Lockstep mode | 2:1 mode |
Memory Interleaving | 2-way Node Interleave |
Channel /Rank Interleaving | Auto |
COD Enable | Enable |
BIOS是十分重要的一個環節,它對於最終結果的影響十分大,因此合理的BIOS設置十分重要。上表中列出常用的幾個選項,更加深入的可以研究memory interleave和channel/rank interleaving相關選項,這些選項和numa架構相關,影響重大。
基準測試
問題:選擇最小化安裝的操作系統,(一般首先使用redhat進行測試得到一個基準值,用來和Neokylin進行比較,作爲後續基準值)
本次測試直接利用Neokylin作爲測試系統,進行基準測試。
出現問題:最初利用GUI測試,但是具體的細節不能記憶很清楚,沒有記錄下來checklist,導致不可重複性。
後續利用最小化安裝(具體如安裝操作系統準備處),關閉有些服務。安裝完成編譯器和SPECPU2006,並利用運行腳本開始測試。測試中base結果爲測試的重點目標,而且測試腳本中我們會將iterations設置爲1,來減少測試時間。
測試結果:
SPECfp(R)_rate_base2006 2270
SPECint(R)_rate_base2006 3410