PowerVM中的Processor Affinity功能介绍: 在Power服务器上使用微分区功能创建分区时,处理器资源采用了共享的方式,物理处理器(Physical Processor)被放到共享处理器池中(Physical Shared Processor Pool),服务器的物理处理器和操作系统所使用的虚拟处理器(Virtual Processor)之间没有了一一对应的关系。Power Hypervisor负责调度物理处理器的处理资源(Entitled Capacity)给操作系统中的虚拟处理器使用。由于物理和虚拟处理器之间没有绑定的关系,可能会导致虚拟处理器在不同的时钟周期得到来自不同物理处理器的处理资源,也就是说虚拟处理器上执行的程序在不同的时钟周期会在不同的物理处理器上执行,在这种情况下会造成对Cache,Memory的资源占用和Context switching。为了优化对Cache,Memory的使用和减少Context switching,Power Hypervisor将尝试调度以前虚拟处理器一直使用的物理处理器给该虚拟处理器使用。如果以前虚拟处理器一直使用的物理处理器不可用,Power Hypervisor将扩大寻找物理处理器的范围,具体寻找物理处理器的顺序为: 1. Chip: the other processor core on the POWER5 or POWER6 chip 2. Chip module: a processor core within the same chip module 3. Processor card/book (dependant on system type): a processor within the same processor card/book PowerVM中的Virtual Processor Folding功能介绍: 从AIX5.3 ML3开始,为了让Uncapped Micro-Partition能够更有效的利用Physical Shared-Processor Pool中未被使用的Processor Capacity,PowerVM增加了Virtual Processor Folding功能。Virtual Processor Folding将未被使用的Virtual Processor置为休眠状态,以避免消耗系统资源。这个功能的好处在于提高Processor Affinity,减少POWER Hypervisor的负载,增加Virtual Processor在Physical Processor上的平均执行时间。