免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 3040 | 回复: 0
打印 上一主题 下一主题

[新手入门] AIX操作系统上的SMT技术 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-12-07 16:59 |只看该作者 |倒序浏览

SMT技术不仅需要AIX操作系统支持,更需要power芯片硬件的支持,这种技术允许在一颗物理
CPU(core)上并发的的执行两个线程,通过这种技术可以大大提高CPU处理单元的利用率,一般可以使系统(CPU成为瓶颈的系统)性能提高30%以
上,下面用图示做一下对比:
[color="#000000"]--SMT关闭的情况下,CPU在一个CPU Cycle情况下处理单元的利用率


[color="#000000"]--SMT开启的情况下,CPU在一个CPU Cycle情况下处理单元的利用率


[color="#000000"]--利用smtctl命令查看当前Simultaneous Multi-Threading状态
test_db>#smtctl
[color="#0000ff"]This system is SMT capable.
[color="#0000ff"]SMT is currently enabled.
[color="#000000"]SMT boot mode is not set.
SMT threads are bound to the same physical processor.
[color="#000000"]proc0 has 2 SMT threads.
Bind processor 0 is bound with proc0
Bind processor 1 is bound with proc0
[color="#000000"]proc2 has 2 SMT threads.
Bind processor 2 is bound with proc2
Bind processor 3 is bound with proc2
[color="#000000"]--查看所有logical processors
test_db>#bindprocessor -q
The available processors are:  0 1 2 3
[color="#000000"]--查看可用的物理CPU(core)
test_db>#lsdev -Cc processor
proc0 Available 00-00 Processor
proc2 Available 00-02 Processor
[color="#000000"]test_db>#lsattr -El proc0
frequency   1654344000     Processor Speed       False
smt_enabled true           Processor SMT enabled False
smt_threads 2              Processor SMT threads False
state       enable         Processor state       False
type        PowerPC_POWER5 Processor type        False
[color="#000000"]test_db>#lsattr -El proc2
frequency   1654344000     Processor Speed       False
smt_enabled true           Processor SMT enabled False
smt_threads 2              Processor SMT threads False
state       enable         Processor state       False
type        PowerPC_POWER5 Processor type        False
[color="#000000"]也可以通过topas -L命令查看所有的逻辑CPU
test_db>#topas -L
Interval:    2    Logical Partition:                   Sat Sep  1 13:44:37 2007
                           Dedicated SMT  ON           Online Memory:   9728.0
Partition CPU Utilization   Online Virtual CPUs: 2     Online Logical CPUs:  4
%user  %sys   %wait   %idle
   1      1       0      99
===============================================================================
LCPU  minpf majpf  intr    csw   icsw runq lpa  scalls usr sys _wt idl   pc
Cpu0   1134     0   261     76     45    0 100     801   2   2   0  96 0.52
Cpu1      0     0    14      0      0    0   0       0   0   0   0 100 0.48
Cpu2    230     0   107    125     65    0 100     198   0   1   0  99 0.52
Cpu3      0     0    15      0      0    0   0       0   0   0   0 100 0.48
[color="#000000"]--关闭SMT(重启后,系统仍然为SMT打开模式,要想永久关闭SMT,则可以用-w boot)
test_db>#smtctl -m off -w now
smtctl: SMT is now disabled.
test_db>#smtctl
[color="#000000"]This system is SMT capable.
[color="#0000ff"]SMT is currently disabled.
[color="#000000"]SMT boot mode is not set.
SMT threads are bound to the same physical processor.
[color="#000000"]proc0 has 1 SMT threads.
Bind processor 0 is bound with proc0
[color="#000000"]proc2 has 1 SMT threads.
Bind processor 1 is bound with proc2
[color="#000000"]test_db>#topas -L
Interval:    2    Logical Partition:                   Sat Sep  1 13:49:28 2007
                           Dedicated SMT  OFF          Online Memory:   9728.0
Partition CPU Utilization                              Online Logical CPUs:  2
%user  %sys   %wait   %idle
   0      0       0     100
===============================================================================
LCPU  minpf majpf  intr    csw   icsw runq lpa  scalls usr sys _wt idl
[color="#0000ff"]Cpu0      0     0   256    110     60    0 100      17   0   0   0 100
Cpu2      0     0   104    100     50    0 100      20   0   0   0 100
[color="#000000"]--开启SMT
test_db>#smtctl -m on -w now
smtctl: SMT is now enabled.
test_db>#
test_db>#smtctl
[color="#000000"]This system is SMT capable.
[color="#0000ff"]SMT is currently enabled.
[color="#000000"]SMT boot mode is not set.
SMT threads are bound to the same physical processor.
[color="#000000"]proc0 has 2 SMT threads.
Bind processor 0 is bound with proc0
Bind processor 2 is bound with proc0
[color="#000000"]proc2 has 2 SMT threads.
Bind processor 1 is bound with proc2
Bind processor 3 is bound with proc2
[color="#000000"]test_db>#topas -L
Interval:    2    Logical Partition:                   Sat Sep  1 13:51:37 2007
                           Dedicated SMT  ON           Online Memory:   9728.0
Partition CPU Utilization   Online Virtual CPUs: 2     Online Logical CPUs:  4
%user  %sys   %wait   %idle
   5      2       5      88
===============================================================================
LCPU  minpf majpf  intr    csw   icsw runq lpa  scalls usr sys _wt idl   pc
Cpu0      0     0   642    723    363    0  99     636   6   3   4  87 0.53
Cpu1      0     0   381      0      0    0   0       0   0   2   0  98 0.47
Cpu2      3     0   488   1374    688    0 100    1243  12   4  13  71 0.55
Cpu3      0     0   375      0      0    0   0       0   0   2   0  98 0.44
[color="#000000"]--可以通过smit smt图形化的引导界面操作SMT的打开与关闭
test_db>#smit smt
[color="#000000"]                                            Simultaneous Multi-Threading Processor Mode
[color="#000000"]Move cursor to desired item and press Enter.
[color="#000000"]  List SMT Mode Settings(查看当前的SMT模式,相当于执行smtctl命令)
  Change SMT Mode   
[color="#000000"]    AIX操作系统默认情况下都会把SMT打开的,如果大家想修改SMT的状态,可以通过上面介绍的命令修改SMT的状态。
               
               
               

本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/8912/showart_2113014.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP