intel-speed-select.rst 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917
  1. .. SPDX-License-Identifier: GPL-2.0
  2. ============================================================
  3. Intel(R) Speed Select Technology User Guide
  4. ============================================================
  5. The Intel(R) Speed Select Technology (Intel(R) SST) provides a powerful new
  6. collection of features that give more granular control over CPU performance.
  7. With Intel(R) SST, one server can be configured for power and performance for a
  8. variety of diverse workload requirements.
  9. Refer to the links below for an overview of the technology:
  10. - https://www.intel.com/content/www/us/en/architecture-and-technology/speed-select-technology-article.html
  11. - https://builders.intel.com/docs/networkbuilders/intel-speed-select-technology-base-frequency-enhancing-performance.pdf
  12. These capabilities are further enhanced in some of the newer generations of
  13. server platforms where these features can be enumerated and controlled
  14. dynamically without pre-configuring via BIOS setup options. This dynamic
  15. configuration is done via mailbox commands to the hardware. One way to enumerate
  16. and configure these features is by using the Intel Speed Select utility.
  17. This document explains how to use the Intel Speed Select tool to enumerate and
  18. control Intel(R) SST features. This document gives example commands and explains
  19. how these commands change the power and performance profile of the system under
  20. test. Using this tool as an example, customers can replicate the messaging
  21. implemented in the tool in their production software.
  22. intel-speed-select configuration tool
  23. ======================================
  24. Most Linux distribution packages may include the "intel-speed-select" tool. If not,
  25. it can be built by downloading the Linux kernel tree from kernel.org. Once
  26. downloaded, the tool can be built without building the full kernel.
  27. From the kernel tree, run the following commands::
  28. # cd tools/power/x86/intel-speed-select/
  29. # make
  30. # make install
  31. Getting Help
  32. ------------
  33. To get help with the tool, execute the command below::
  34. # intel-speed-select --help
  35. The top-level help describes arguments and features. Notice that there is a
  36. multi-level help structure in the tool. For example, to get help for the feature "perf-profile"::
  37. # intel-speed-select perf-profile --help
  38. To get help on a command, another level of help is provided. For example for the command info "info"::
  39. # intel-speed-select perf-profile info --help
  40. Summary of platform capability
  41. ------------------------------
  42. To check the current platform and driver capaibilities, execute::
  43. #intel-speed-select --info
  44. For example on a test system::
  45. # intel-speed-select --info
  46. Intel(R) Speed Select Technology
  47. Executing on CPU model: X
  48. Platform: API version : 1
  49. Platform: Driver version : 1
  50. Platform: mbox supported : 1
  51. Platform: mmio supported : 1
  52. Intel(R) SST-PP (feature perf-profile) is supported
  53. TDP level change control is unlocked, max level: 4
  54. Intel(R) SST-TF (feature turbo-freq) is supported
  55. Intel(R) SST-BF (feature base-freq) is not supported
  56. Intel(R) SST-CP (feature core-power) is supported
  57. Intel(R) Speed Select Technology - Performance Profile (Intel(R) SST-PP)
  58. ------------------------------------------------------------------------
  59. This feature allows configuration of a server dynamically based on workload
  60. performance requirements. This helps users during deployment as they do not have
  61. to choose a specific server configuration statically. This Intel(R) Speed Select
  62. Technology - Performance Profile (Intel(R) SST-PP) feature introduces a mechanism
  63. that allows multiple optimized performance profiles per system. Each profile
  64. defines a set of CPUs that need to be online and rest offline to sustain a
  65. guaranteed base frequency. Once the user issues a command to use a specific
  66. performance profile and meet CPU online/offline requirement, the user can expect
  67. a change in the base frequency dynamically. This feature is called
  68. "perf-profile" when using the Intel Speed Select tool.
  69. Number or performance levels
  70. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  71. There can be multiple performance profiles on a system. To get the number of
  72. profiles, execute the command below::
  73. # intel-speed-select perf-profile get-config-levels
  74. Intel(R) Speed Select Technology
  75. Executing on CPU model: X
  76. package-0
  77. die-0
  78. cpu-0
  79. get-config-levels:4
  80. package-1
  81. die-0
  82. cpu-14
  83. get-config-levels:4
  84. On this system under test, there are 4 performance profiles in addition to the
  85. base performance profile (which is performance level 0).
  86. Lock/Unlock status
  87. ~~~~~~~~~~~~~~~~~~
  88. Even if there are multiple performance profiles, it is possible that they
  89. are locked. If they are locked, users cannot issue a command to change the
  90. performance state. It is possible that there is a BIOS setup to unlock or check
  91. with your system vendor.
  92. To check if the system is locked, execute the following command::
  93. # intel-speed-select perf-profile get-lock-status
  94. Intel(R) Speed Select Technology
  95. Executing on CPU model: X
  96. package-0
  97. die-0
  98. cpu-0
  99. get-lock-status:0
  100. package-1
  101. die-0
  102. cpu-14
  103. get-lock-status:0
  104. In this case, lock status is 0, which means that the system is unlocked.
  105. Properties of a performance level
  106. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  107. To get properties of a specific performance level (For example for the level 0, below), execute the command below::
  108. # intel-speed-select perf-profile info -l 0
  109. Intel(R) Speed Select Technology
  110. Executing on CPU model: X
  111. package-0
  112. die-0
  113. cpu-0
  114. perf-profile-level-0
  115. cpu-count:28
  116. enable-cpu-mask:000003ff,f0003fff
  117. enable-cpu-list:0,1,2,3,4,5,6,7,8,9,10,11,12,13,28,29,30,31,32,33,34,35,36,37,38,39,40,41
  118. thermal-design-power-ratio:26
  119. base-frequency(MHz):2600
  120. speed-select-turbo-freq:disabled
  121. speed-select-base-freq:disabled
  122. ...
  123. ...
  124. Here -l option is used to specify a performance level.
  125. If the option -l is omitted, then this command will print information about all
  126. the performance levels. The above command is printing properties of the
  127. performance level 0.
  128. For this performance profile, the list of CPUs displayed by the
  129. "enable-cpu-mask/enable-cpu-list" at the max can be "online." When that
  130. condition is met, then base frequency of 2600 MHz can be maintained. To
  131. understand more, execute "intel-speed-select perf-profile info" for performance
  132. level 4::
  133. # intel-speed-select perf-profile info -l 4
  134. Intel(R) Speed Select Technology
  135. Executing on CPU model: X
  136. package-0
  137. die-0
  138. cpu-0
  139. perf-profile-level-4
  140. cpu-count:28
  141. enable-cpu-mask:000000fa,f0000faf
  142. enable-cpu-list:0,1,2,3,5,7,8,9,10,11,28,29,30,31,33,35,36,37,38,39
  143. thermal-design-power-ratio:28
  144. base-frequency(MHz):2800
  145. speed-select-turbo-freq:disabled
  146. speed-select-base-freq:unsupported
  147. ...
  148. ...
  149. There are fewer CPUs in the "enable-cpu-mask/enable-cpu-list". Consequently, if
  150. the user only keeps these CPUs online and the rest "offline," then the base
  151. frequency is increased to 2.8 GHz compared to 2.6 GHz at performance level 0.
  152. Get current performance level
  153. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  154. To get the current performance level, execute::
  155. # intel-speed-select perf-profile get-config-current-level
  156. Intel(R) Speed Select Technology
  157. Executing on CPU model: X
  158. package-0
  159. die-0
  160. cpu-0
  161. get-config-current_level:0
  162. First verify that the base_frequency displayed by the cpufreq sysfs is correct::
  163. # cat /sys/devices/system/cpu/cpu0/cpufreq/base_frequency
  164. 2600000
  165. This matches the base-frequency (MHz) field value displayed from the
  166. "perf-profile info" command for performance level 0(cpufreq frequency is in
  167. KHz).
  168. To check if the average frequency is equal to the base frequency for a 100% busy
  169. workload, disable turbo::
  170. # echo 1 > /sys/devices/system/cpu/intel_pstate/no_turbo
  171. Then runs a busy workload on all CPUs, for example::
  172. #stress -c 64
  173. To verify the base frequency, run turbostat::
  174. #turbostat -c 0-13 --show Package,Core,CPU,Bzy_MHz -i 1
  175. Package Core CPU Bzy_MHz
  176. - - 2600
  177. 0 0 0 2600
  178. 0 1 1 2600
  179. 0 2 2 2600
  180. 0 3 3 2600
  181. 0 4 4 2600
  182. . . . .
  183. Changing performance level
  184. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  185. To the change the performance level to 4, execute::
  186. # intel-speed-select -d perf-profile set-config-level -l 4 -o
  187. Intel(R) Speed Select Technology
  188. Executing on CPU model: X
  189. package-0
  190. die-0
  191. cpu-0
  192. perf-profile
  193. set_tdp_level:success
  194. In the command above, "-o" is optional. If it is specified, then it will also
  195. offline CPUs which are not present in the enable_cpu_mask for this performance
  196. level.
  197. Now if the base_frequency is checked::
  198. #cat /sys/devices/system/cpu/cpu0/cpufreq/base_frequency
  199. 2800000
  200. Which shows that the base frequency now increased from 2600 MHz at performance
  201. level 0 to 2800 MHz at performance level 4. As a result, any workload, which can
  202. use fewer CPUs, can see a boost of 200 MHz compared to performance level 0.
  203. Check presence of other Intel(R) SST features
  204. ---------------------------------------------
  205. Each of the performance profiles also specifies weather there is support of
  206. other two Intel(R) SST features (Intel(R) Speed Select Technology - Base Frequency
  207. (Intel(R) SST-BF) and Intel(R) Speed Select Technology - Turbo Frequency (Intel
  208. SST-TF)).
  209. For example, from the output of "perf-profile info" above, for level 0 and level
  210. 4:
  211. For level 0::
  212. speed-select-turbo-freq:disabled
  213. speed-select-base-freq:disabled
  214. For level 4::
  215. speed-select-turbo-freq:disabled
  216. speed-select-base-freq:unsupported
  217. Given these results, the "speed-select-base-freq" (Intel(R) SST-BF) in level 4
  218. changed from "disabled" to "unsupported" compared to performance level 0.
  219. This means that at performance level 4, the "speed-select-base-freq" feature is
  220. not supported. However, at performance level 0, this feature is "supported", but
  221. currently "disabled", meaning the user has not activated this feature. Whereas
  222. "speed-select-turbo-freq" (Intel(R) SST-TF) is supported at both performance
  223. levels, but currently not activated by the user.
  224. The Intel(R) SST-BF and the Intel(R) SST-TF features are built on a foundation
  225. technology called Intel(R) Speed Select Technology - Core Power (Intel(R) SST-CP).
  226. The platform firmware enables this feature when Intel(R) SST-BF or Intel(R) SST-TF
  227. is supported on a platform.
  228. Intel(R) Speed Select Technology Core Power (Intel(R) SST-CP)
  229. ---------------------------------------------------------------
  230. Intel(R) Speed Select Technology Core Power (Intel(R) SST-CP) is an interface that
  231. allows users to define per core priority. This defines a mechanism to distribute
  232. power among cores when there is a power constrained scenario. This defines a
  233. class of service (CLOS) configuration.
  234. The user can configure up to 4 class of service configurations. Each CLOS group
  235. configuration allows definitions of parameters, which affects how the frequency
  236. can be limited and power is distributed. Each CPU core can be tied to a class of
  237. service and hence an associated priority. The granularity is at core level not
  238. at per CPU level.
  239. Enable CLOS based prioritization
  240. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  241. To use CLOS based prioritization feature, firmware must be informed to enable
  242. and use a priority type. There is a default per platform priority type, which
  243. can be changed with optional command line parameter.
  244. To enable and check the options, execute::
  245. # intel-speed-select core-power enable --help
  246. Intel(R) Speed Select Technology
  247. Executing on CPU model: X
  248. Enable core-power for a package/die
  249. Clos Enable: Specify priority type with [--priority|-p]
  250. 0: Proportional, 1: Ordered
  251. There are two types of priority types:
  252. - Ordered
  253. Priority for ordered throttling is defined based on the index of the assigned
  254. CLOS group. Where CLOS0 gets highest priority (throttled last).
  255. Priority order is:
  256. CLOS0 > CLOS1 > CLOS2 > CLOS3.
  257. - Proportional
  258. When proportional priority is used, there is an additional parameter called
  259. frequency_weight, which can be specified per CLOS group. The goal of
  260. proportional priority is to provide each core with the requested min., then
  261. distribute all remaining (excess/deficit) budgets in proportion to a defined
  262. weight. This proportional priority can be configured using "core-power config"
  263. command.
  264. To enable with the platform default priority type, execute::
  265. # intel-speed-select core-power enable
  266. Intel(R) Speed Select Technology
  267. Executing on CPU model: X
  268. package-0
  269. die-0
  270. cpu-0
  271. core-power
  272. enable:success
  273. package-1
  274. die-0
  275. cpu-6
  276. core-power
  277. enable:success
  278. The scope of this enable is per package or die scoped when a package contains
  279. multiple dies. To check if CLOS is enabled and get priority type, "core-power
  280. info" command can be used. For example to check the status of core-power feature
  281. on CPU 0, execute::
  282. # intel-speed-select -c 0 core-power info
  283. Intel(R) Speed Select Technology
  284. Executing on CPU model: X
  285. package-0
  286. die-0
  287. cpu-0
  288. core-power
  289. support-status:supported
  290. enable-status:enabled
  291. clos-enable-status:enabled
  292. priority-type:proportional
  293. package-1
  294. die-0
  295. cpu-24
  296. core-power
  297. support-status:supported
  298. enable-status:enabled
  299. clos-enable-status:enabled
  300. priority-type:proportional
  301. Configuring CLOS groups
  302. ~~~~~~~~~~~~~~~~~~~~~~~
  303. Each CLOS group has its own attributes including min, max, freq_weight and
  304. desired. These parameters can be configured with "core-power config" command.
  305. Defaults will be used if user skips setting a parameter except clos id, which is
  306. mandatory. To check core-power config options, execute::
  307. # intel-speed-select core-power config --help
  308. Intel(R) Speed Select Technology
  309. Executing on CPU model: X
  310. Set core-power configuration for one of the four clos ids
  311. Specify targeted clos id with [--clos|-c]
  312. Specify clos Proportional Priority [--weight|-w]
  313. Specify clos min in MHz with [--min|-n]
  314. Specify clos max in MHz with [--max|-m]
  315. For example::
  316. # intel-speed-select core-power config -c 0
  317. Intel(R) Speed Select Technology
  318. Executing on CPU model: X
  319. clos epp is not specified, default: 0
  320. clos frequency weight is not specified, default: 0
  321. clos min is not specified, default: 0 MHz
  322. clos max is not specified, default: 25500 MHz
  323. clos desired is not specified, default: 0
  324. package-0
  325. die-0
  326. cpu-0
  327. core-power
  328. config:success
  329. package-1
  330. die-0
  331. cpu-6
  332. core-power
  333. config:success
  334. The user has the option to change defaults. For example, the user can change the
  335. "min" and set the base frequency to always get guaranteed base frequency.
  336. Get the current CLOS configuration
  337. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  338. To check the current configuration, "core-power get-config" can be used. For
  339. example, to get the configuration of CLOS 0::
  340. # intel-speed-select core-power get-config -c 0
  341. Intel(R) Speed Select Technology
  342. Executing on CPU model: X
  343. package-0
  344. die-0
  345. cpu-0
  346. core-power
  347. clos:0
  348. epp:0
  349. clos-proportional-priority:0
  350. clos-min:0 MHz
  351. clos-max:Max Turbo frequency
  352. clos-desired:0 MHz
  353. package-1
  354. die-0
  355. cpu-24
  356. core-power
  357. clos:0
  358. epp:0
  359. clos-proportional-priority:0
  360. clos-min:0 MHz
  361. clos-max:Max Turbo frequency
  362. clos-desired:0 MHz
  363. Associating a CPU with a CLOS group
  364. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  365. To associate a CPU to a CLOS group "core-power assoc" command can be used::
  366. # intel-speed-select core-power assoc --help
  367. Intel(R) Speed Select Technology
  368. Executing on CPU model: X
  369. Associate a clos id to a CPU
  370. Specify targeted clos id with [--clos|-c]
  371. For example to associate CPU 10 to CLOS group 3, execute::
  372. # intel-speed-select -c 10 core-power assoc -c 3
  373. Intel(R) Speed Select Technology
  374. Executing on CPU model: X
  375. package-0
  376. die-0
  377. cpu-10
  378. core-power
  379. assoc:success
  380. Once a CPU is associated, its sibling CPUs are also associated to a CLOS group.
  381. Once associated, avoid changing Linux "cpufreq" subsystem scaling frequency
  382. limits.
  383. To check the existing association for a CPU, "core-power get-assoc" command can
  384. be used. For example, to get association of CPU 10, execute::
  385. # intel-speed-select -c 10 core-power get-assoc
  386. Intel(R) Speed Select Technology
  387. Executing on CPU model: X
  388. package-1
  389. die-0
  390. cpu-10
  391. get-assoc
  392. clos:3
  393. This shows that CPU 10 is part of a CLOS group 3.
  394. Disable CLOS based prioritization
  395. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  396. To disable, execute::
  397. # intel-speed-select core-power disable
  398. Some features like Intel(R) SST-TF can only be enabled when CLOS based prioritization
  399. is enabled. For this reason, disabling while Intel(R) SST-TF is enabled can cause
  400. Intel(R) SST-TF to fail. This will cause the "disable" command to display an error
  401. if Intel(R) SST-TF is already enabled. In turn, to disable, the Intel(R) SST-TF
  402. feature must be disabled first.
  403. Intel(R) Speed Select Technology - Base Frequency (Intel(R) SST-BF)
  404. -------------------------------------------------------------------
  405. The Intel(R) Speed Select Technology - Base Frequency (Intel(R) SST-BF) feature lets
  406. the user control base frequency. If some critical workload threads demand
  407. constant high guaranteed performance, then this feature can be used to execute
  408. the thread at higher base frequency on specific sets of CPUs (high priority
  409. CPUs) at the cost of lower base frequency (low priority CPUs) on other CPUs.
  410. This feature does not require offline of the low priority CPUs.
  411. The support of Intel(R) SST-BF depends on the Intel(R) Speed Select Technology -
  412. Performance Profile (Intel(R) SST-PP) performance level configuration. It is
  413. possible that only certain performance levels support Intel(R) SST-BF. It is also
  414. possible that only base performance level (level = 0) has support of Intel
  415. SST-BF. Consequently, first select the desired performance level to enable this
  416. feature.
  417. In the system under test here, Intel(R) SST-BF is supported at the base
  418. performance level 0, but currently disabled. For example for the level 0::
  419. # intel-speed-select -c 0 perf-profile info -l 0
  420. Intel(R) Speed Select Technology
  421. Executing on CPU model: X
  422. package-0
  423. die-0
  424. cpu-0
  425. perf-profile-level-0
  426. ...
  427. speed-select-base-freq:disabled
  428. ...
  429. Before enabling Intel(R) SST-BF and measuring its impact on a workload
  430. performance, execute some workload and measure performance and get a baseline
  431. performance to compare against.
  432. Here the user wants more guaranteed performance. For this reason, it is likely
  433. that turbo is disabled. To disable turbo, execute::
  434. #echo 1 > /sys/devices/system/cpu/intel_pstate/no_turbo
  435. Based on the output of the "intel-speed-select perf-profile info -l 0" base
  436. frequency of guaranteed frequency 2600 MHz.
  437. Measure baseline performance for comparison
  438. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  439. To compare, pick a multi-threaded workload where each thread can be scheduled on
  440. separate CPUs. "Hackbench pipe" test is a good example on how to improve
  441. performance using Intel(R) SST-BF.
  442. Below, the workload is measuring average scheduler wakeup latency, so a lower
  443. number means better performance::
  444. # taskset -c 3,4 perf bench -r 100 sched pipe
  445. # Running 'sched/pipe' benchmark:
  446. # Executed 1000000 pipe operations between two processes
  447. Total time: 6.102 [sec]
  448. 6.102445 usecs/op
  449. 163868 ops/sec
  450. While running the above test, if we take turbostat output, it will show us that
  451. 2 of the CPUs are busy and reaching max. frequency (which would be the base
  452. frequency as the turbo is disabled). The turbostat output::
  453. #turbostat -c 0-13 --show Package,Core,CPU,Bzy_MHz -i 1
  454. Package Core CPU Bzy_MHz
  455. 0 0 0 1000
  456. 0 1 1 1005
  457. 0 2 2 1000
  458. 0 3 3 2600
  459. 0 4 4 2600
  460. 0 5 5 1000
  461. 0 6 6 1000
  462. 0 7 7 1005
  463. 0 8 8 1005
  464. 0 9 9 1000
  465. 0 10 10 1000
  466. 0 11 11 995
  467. 0 12 12 1000
  468. 0 13 13 1000
  469. From the above turbostat output, both CPU 3 and 4 are very busy and reaching
  470. full guaranteed frequency of 2600 MHz.
  471. Intel(R) SST-BF Capabilities
  472. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  473. To get capabilities of Intel(R) SST-BF for the current performance level 0,
  474. execute::
  475. # intel-speed-select base-freq info -l 0
  476. Intel(R) Speed Select Technology
  477. Executing on CPU model: X
  478. package-0
  479. die-0
  480. cpu-0
  481. speed-select-base-freq
  482. high-priority-base-frequency(MHz):3000
  483. high-priority-cpu-mask:00000216,00002160
  484. high-priority-cpu-list:5,6,8,13,33,34,36,41
  485. low-priority-base-frequency(MHz):2400
  486. tjunction-temperature(C):125
  487. thermal-design-power(W):205
  488. The above capabilities show that there are some CPUs on this system that can
  489. offer base frequency of 3000 MHz compared to the standard base frequency at this
  490. performance levels. Nevertheless, these CPUs are fixed, and they are presented
  491. via high-priority-cpu-list/high-priority-cpu-mask. But if this Intel(R) SST-BF
  492. feature is selected, the low priorities CPUs (which are not in
  493. high-priority-cpu-list) can only offer up to 2400 MHz. As a result, if this
  494. clipping of low priority CPUs is acceptable, then the user can enable Intel
  495. SST-BF feature particularly for the above "sched pipe" workload since only two
  496. CPUs are used, they can be scheduled on high priority CPUs and can get boost of
  497. 400 MHz.
  498. Enable Intel(R) SST-BF
  499. ~~~~~~~~~~~~~~~~~~~~~~
  500. To enable Intel(R) SST-BF feature, execute::
  501. # intel-speed-select base-freq enable -a
  502. Intel(R) Speed Select Technology
  503. Executing on CPU model: X
  504. package-0
  505. die-0
  506. cpu-0
  507. base-freq
  508. enable:success
  509. package-1
  510. die-0
  511. cpu-14
  512. base-freq
  513. enable:success
  514. In this case, -a option is optional. This not only enables Intel(R) SST-BF, but it
  515. also adjusts the priority of cores using Intel(R) Speed Select Technology Core
  516. Power (Intel(R) SST-CP) features. This option sets the minimum performance of each
  517. Intel(R) Speed Select Technology - Performance Profile (Intel(R) SST-PP) class to
  518. maximum performance so that the hardware will give maximum performance possible
  519. for each CPU.
  520. If -a option is not used, then the following steps are required before enabling
  521. Intel(R) SST-BF:
  522. - Discover Intel(R) SST-BF and note low and high priority base frequency
  523. - Note the high prioity CPU list
  524. - Enable CLOS using core-power feature set
  525. - Configure CLOS parameters. Use CLOS.min to set to minimum performance
  526. - Subscribe desired CPUs to CLOS groups
  527. With this configuration, if the same workload is executed by pinning the
  528. workload to high priority CPUs (CPU 5 and 6 in this case)::
  529. #taskset -c 5,6 perf bench -r 100 sched pipe
  530. # Running 'sched/pipe' benchmark:
  531. # Executed 1000000 pipe operations between two processes
  532. Total time: 5.627 [sec]
  533. 5.627922 usecs/op
  534. 177685 ops/sec
  535. This way, by enabling Intel(R) SST-BF, the performance of this benchmark is
  536. improved (latency reduced) by 7.79%. From the turbostat output, it can be
  537. observed that the high priority CPUs reached 3000 MHz compared to 2600 MHz.
  538. The turbostat output::
  539. #turbostat -c 0-13 --show Package,Core,CPU,Bzy_MHz -i 1
  540. Package Core CPU Bzy_MHz
  541. 0 0 0 2151
  542. 0 1 1 2166
  543. 0 2 2 2175
  544. 0 3 3 2175
  545. 0 4 4 2175
  546. 0 5 5 3000
  547. 0 6 6 3000
  548. 0 7 7 2180
  549. 0 8 8 2662
  550. 0 9 9 2176
  551. 0 10 10 2175
  552. 0 11 11 2176
  553. 0 12 12 2176
  554. 0 13 13 2661
  555. Disable Intel(R) SST-BF
  556. ~~~~~~~~~~~~~~~~~~~~~~~
  557. To disable the Intel(R) SST-BF feature, execute::
  558. # intel-speed-select base-freq disable -a
  559. Intel(R) Speed Select Technology - Turbo Frequency (Intel(R) SST-TF)
  560. --------------------------------------------------------------------
  561. This feature enables the ability to set different "All core turbo ratio limits"
  562. to cores based on the priority. By using this feature, some cores can be
  563. configured to get higher turbo frequency by designating them as high priority at
  564. the cost of lower or no turbo frequency on the low priority cores.
  565. For this reason, this feature is only useful when system is busy utilizing all
  566. CPUs, but the user wants some configurable option to get high performance on
  567. some CPUs.
  568. The support of Intel(R) Speed Select Technology - Turbo Frequency (Intel(R) SST-TF)
  569. depends on the Intel(R) Speed Select Technology - Performance Profile (Intel
  570. SST-PP) performance level configuration. It is possible that only a certain
  571. performance level supports Intel(R) SST-TF. It is also possible that only the base
  572. performance level (level = 0) has the support of Intel(R) SST-TF. Hence, first
  573. select the desired performance level to enable this feature.
  574. In the system under test here, Intel(R) SST-TF is supported at the base
  575. performance level 0, but currently disabled::
  576. # intel-speed-select -c 0 perf-profile info -l 0
  577. Intel(R) Speed Select Technology
  578. package-0
  579. die-0
  580. cpu-0
  581. perf-profile-level-0
  582. ...
  583. ...
  584. speed-select-turbo-freq:disabled
  585. ...
  586. ...
  587. To check if performance can be improved using Intel(R) SST-TF feature, get the turbo
  588. frequency properties with Intel(R) SST-TF enabled and compare to the base turbo
  589. capability of this system.
  590. Get Base turbo capability
  591. ~~~~~~~~~~~~~~~~~~~~~~~~~
  592. To get the base turbo capability of performance level 0, execute::
  593. # intel-speed-select perf-profile info -l 0
  594. Intel(R) Speed Select Technology
  595. Executing on CPU model: X
  596. package-0
  597. die-0
  598. cpu-0
  599. perf-profile-level-0
  600. ...
  601. ...
  602. turbo-ratio-limits-sse
  603. bucket-0
  604. core-count:2
  605. max-turbo-frequency(MHz):3200
  606. bucket-1
  607. core-count:4
  608. max-turbo-frequency(MHz):3100
  609. bucket-2
  610. core-count:6
  611. max-turbo-frequency(MHz):3100
  612. bucket-3
  613. core-count:8
  614. max-turbo-frequency(MHz):3100
  615. bucket-4
  616. core-count:10
  617. max-turbo-frequency(MHz):3100
  618. bucket-5
  619. core-count:12
  620. max-turbo-frequency(MHz):3100
  621. bucket-6
  622. core-count:14
  623. max-turbo-frequency(MHz):3100
  624. bucket-7
  625. core-count:16
  626. max-turbo-frequency(MHz):3100
  627. Based on the data above, when all the CPUS are busy, the max. frequency of 3100
  628. MHz can be achieved. If there is some busy workload on cpu 0 - 11 (e.g. stress)
  629. and on CPU 12 and 13, execute "hackbench pipe" workload::
  630. # taskset -c 12,13 perf bench -r 100 sched pipe
  631. # Running 'sched/pipe' benchmark:
  632. # Executed 1000000 pipe operations between two processes
  633. Total time: 5.705 [sec]
  634. 5.705488 usecs/op
  635. 175269 ops/sec
  636. The turbostat output::
  637. #turbostat -c 0-13 --show Package,Core,CPU,Bzy_MHz -i 1
  638. Package Core CPU Bzy_MHz
  639. 0 0 0 3000
  640. 0 1 1 3000
  641. 0 2 2 3000
  642. 0 3 3 3000
  643. 0 4 4 3000
  644. 0 5 5 3100
  645. 0 6 6 3100
  646. 0 7 7 3000
  647. 0 8 8 3100
  648. 0 9 9 3000
  649. 0 10 10 3000
  650. 0 11 11 3000
  651. 0 12 12 3100
  652. 0 13 13 3100
  653. Based on turbostat output, the performance is limited by frequency cap of 3100
  654. MHz. To check if the hackbench performance can be improved for CPU 12 and CPU
  655. 13, first check the capability of the Intel(R) SST-TF feature for this performance
  656. level.
  657. Get Intel(R) SST-TF Capability
  658. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  659. To get the capability, the "turbo-freq info" command can be used::
  660. # intel-speed-select turbo-freq info -l 0
  661. Intel(R) Speed Select Technology
  662. Executing on CPU model: X
  663. package-0
  664. die-0
  665. cpu-0
  666. speed-select-turbo-freq
  667. bucket-0
  668. high-priority-cores-count:2
  669. high-priority-max-frequency(MHz):3200
  670. high-priority-max-avx2-frequency(MHz):3200
  671. high-priority-max-avx512-frequency(MHz):3100
  672. bucket-1
  673. high-priority-cores-count:4
  674. high-priority-max-frequency(MHz):3100
  675. high-priority-max-avx2-frequency(MHz):3000
  676. high-priority-max-avx512-frequency(MHz):2900
  677. bucket-2
  678. high-priority-cores-count:6
  679. high-priority-max-frequency(MHz):3100
  680. high-priority-max-avx2-frequency(MHz):3000
  681. high-priority-max-avx512-frequency(MHz):2900
  682. speed-select-turbo-freq-clip-frequencies
  683. low-priority-max-frequency(MHz):2600
  684. low-priority-max-avx2-frequency(MHz):2400
  685. low-priority-max-avx512-frequency(MHz):2100
  686. Based on the output above, there is an Intel(R) SST-TF bucket for which there are
  687. two high priority cores. If only two high priority cores are set, then max.
  688. turbo frequency on those cores can be increased to 3200 MHz. This is 100 MHz
  689. more than the base turbo capability for all cores.
  690. In turn, for the hackbench workload, two CPUs can be set as high priority and
  691. rest as low priority. One side effect is that once enabled, the low priority
  692. cores will be clipped to a lower frequency of 2600 MHz.
  693. Enable Intel(R) SST-TF
  694. ~~~~~~~~~~~~~~~~~~~~~~
  695. To enable Intel(R) SST-TF, execute::
  696. # intel-speed-select -c 12,13 turbo-freq enable -a
  697. Intel(R) Speed Select Technology
  698. Executing on CPU model: X
  699. package-0
  700. die-0
  701. cpu-12
  702. turbo-freq
  703. enable:success
  704. package-0
  705. die-0
  706. cpu-13
  707. turbo-freq
  708. enable:success
  709. package--1
  710. die-0
  711. cpu-63
  712. turbo-freq --auto
  713. enable:success
  714. In this case, the option "-a" is optional. If set, it enables Intel(R) SST-TF
  715. feature and also sets the CPUs to high and low priority using Intel Speed
  716. Select Technology Core Power (Intel(R) SST-CP) features. The CPU numbers passed
  717. with "-c" arguments are marked as high priority, including its siblings.
  718. If -a option is not used, then the following steps are required before enabling
  719. Intel(R) SST-TF:
  720. - Discover Intel(R) SST-TF and note buckets of high priority cores and maximum frequency
  721. - Enable CLOS using core-power feature set - Configure CLOS parameters
  722. - Subscribe desired CPUs to CLOS groups making sure that high priority cores are set to the maximum frequency
  723. If the same hackbench workload is executed, schedule hackbench threads on high
  724. priority CPUs::
  725. #taskset -c 12,13 perf bench -r 100 sched pipe
  726. # Running 'sched/pipe' benchmark:
  727. # Executed 1000000 pipe operations between two processes
  728. Total time: 5.510 [sec]
  729. 5.510165 usecs/op
  730. 180826 ops/sec
  731. This improved performance by around 3.3% improvement on a busy system. Here the
  732. turbostat output will show that the CPU 12 and CPU 13 are getting 100 MHz boost.
  733. The turbostat output::
  734. #turbostat -c 0-13 --show Package,Core,CPU,Bzy_MHz -i 1
  735. Package Core CPU Bzy_MHz
  736. ...
  737. 0 12 12 3200
  738. 0 13 13 3200