在安装Ubuntu的POWER服务器上,开启SMT

来源:互联网 发布:ubuntu 打开u盘 编辑:程序博客网 时间:2024/06/02 05:31

1 SMT,Simultaneous Multithreading

同步多线程(SMT)是一种在一个CPU 的时钟周期内能够执行来自多个线程的指令的硬件多线程技术。本质上,同步多线程是一种将线程级并行处理(多CPU)转化为指令级并行处理(同一CPU)的方法。 

2 命令ppc64_cpu

<span style="font-size:14px;">NAME       ppc64_cpu - cpu settings utilitySYNOPSIS       ppc64_cpu [OPTION]DESCRIPTION       This utility allows users to view and set the cpu SMT, DSCR and smt-snooze-delay settings.OPTIONS       --smt  Get current SMT state.       --smt={on|off}              Set SMT state.       --cores-present              Get the number of cores present.       --cores-on              Get the number of cores currently online.       --cores-on=X              Put exactly X cores online.       --dscr [-p <pid>]              Get current DSCR system setting or, optionally, for <pid>.       --dscr=<val> [-p <pid>]              Change DSCR system setting or, optionally, for <pid>.       --smt-snooze-delay              Get current smt-snooze-delay setting.       --smt-snooze-delay=<val>              Change smt-snooze-delay setting.       --run-mode              Get current diagnostics run mode.       --run-mode=<val>              Set current diagnostics run mode.       --frequency [-t <time>]              Determine cpu frequency for <time> seconds, default is 1 second.       --subcores-per-core              Get number of subcores per core.       --subcores-per-core=X              Set subcores per core to X (1 or 4).       --threads-per-core              Get number of threads per core.       --info Display system state information.</span>

3开启及状态

3.1查看SMT状态

root@zhaippc64le:~# ppc64_cpu --smtSMT is off

此时用ppc64_cpu --info查看时,只有第一列带*号

root@zhaippc64le:~# ppc64_cpu --infoCore   0:    0*    1     2     3     4     5     6     7Core   1:    8*    9    10    11    12    13    14    15Core   2:   16*   17    18    19    20    21    22    23Core   3:   24*   25    26    27    28    29    30    31Core   4:   32*   33    34    35    36    37    38    39Core   5:   40    41    42    43    44    45    46    47Core   6:   48*   49    50    51    52    53    54    55Core   7:   56*   57    58    59    60    61    62    63Core   8:   64*   65    66    67    68    69    70    71Core   9:   72*   73    74    75    76    77    78    79

3.2开启

ppc64_cpu --smt=on

# ppc64_cpu --smtSMT is on
用ppc64_cpu --info查看时,只有所有列带*号

# ppc64_cpu --infoCore   0:    0*    1*    2*    3*    4*    5*    6*    7*Core   1:    8*    9*   10*   11*   12*   13*   14*   15*Core   2:   16*   17*   18*   19*   20*   21*   22*   23*Core   3:   24*   25*   26*   27*   28*   29*   30*   31*Core   4:   32*   33*   34*   35*   36*   37*   38*   39*Core   5:   40*   41*   42*   43*   44*   45*   46*   47*Core   6:   48*   49*   50*   51*   52*   53*   54*   55*Core   7:   56*   57*   58*   59*   60*   61*   62*   63*Core   8:   64*   65*   66*   67*   68*   69*   70*   71*Core   9:   72*   73*   74*   75*   76*   77*   78*   79*

4 lscpu及/proc/cpuinfo

# lscpuArchitecture:          ppc64leByte Order:            Little EndianCPU(s):                160On-line CPU(s) list:   0-159Thread(s) per core:    8Core(s) per socket:    5Socket(s):             2NUMA node(s):          2Model:                 8284-22ACPU max MHz:           3690.0000CPU min MHz:           2061.0000L1d cache:             64KL1i cache:             32KL2 cache:              512KL3 cache:              8192KNUMA node0 CPU(s):     0-39NUMA node1 CPU(s):     40-79

cat /proc/cpuinfo后查看processor,用ppc64_cpu --info查看到的带*号的cpu号都会在/proc/cpuinfo中显示。

参考:

1 处理器CPU概念及CPU多线程:http://blog.csdn.net/zhaihaifei/article/details/51015528

0 0