Resource index of performance Index-cpu-affinity-Adjustment optimization
Source: Internet
Author: User
The method of adjusting affinity
This section describes how to improve process-to-CPU affinity, CPU and memory affinity, and the affinity of virtual CPUs to physical CPUs.
1. Binding process
For dedicated CPU mode, the binding process can be applied to the specified CPU.
2. Adjust CPU parameters
For sharing CPU mode, do not set the CPU entitlement value too small when planning lpars. Minimize hypervisor dynamically adjust the amplitude of CPU resources, so that hypervisor when scheduling CPU resources, you can allocate the same core CPU time slice, while reducing CPU scheduling occurs when the context switch operation. The desired Processor unit value of the LPAR is set to meet the CPU requirements for the partition to work properly.
Do not set the virtual CPU (VP) value too large, too many VP will not only affect the affinity of the VP and the physical CPU, but also affect the affinity between the process and VP.
In short, if the ratio of VP to EC is too large, it is recommended to reduce the ratio of the two, reducing VP or raising the EC. The ratio of the two can be up to 10, and the minimum for the 1,IBM Official document gives the virtualization platform best practice is 1.5. However, practice has shown that as long as the ratio exceeds 1, there will be varying degrees of performance impact (response time), if the response time is very demanding system, the recommended ratio is smaller the better, or you can consider changing the sharing mode to dedicated mode.
3. Dynamic Platform Optimizer (DPO)
When a server has just completed power on and sequentially activates each LPAR, Hypervisor automatically guarantees the best affinity state between the CPU and the memory.
After the server has been running for a long time, the allocation of memory is not immutable. If a lot of dynamic LPAR resource adjustments occur, modify the profile configuration of the Lpar, delete the Lpar, create a new lpar, LPM partition migration operation, or partition because the workload is large through the micro The partitioning method obtains a large amount of additional CPU time slices, which can cause the affinity state to deviate from its initial optimal state.
In the power7+ product platform (9117-MMD/9179-MHD), the 760 microcode version introduces a new feature, dynamic Platform Optimizer (DPO), which improves memory affinity status efficiently and online.
Use the HMC command "Lsmemopt–m <system_name>-o Currscore" To view the current affinity score. The affinity score represents the worst affinity state from 0~100,0, and 100 represents the best affinity state.
Use the HMC command "Lsmemopt-m <system_name> o Calcscore" to estimate the affinity score that can be achieved by DPO function optimization.
Use the HMC command "Optmem-m <system_name>-o start–t affinity" to affinity optimize the entire server.
Use the HMC command "Lsmemopt-m <system_name>" to display the progress of the current DPO optimization operation.
Use the HMC command "Optmem-m <system_name> o Stop" to prematurely interrupt an in-progress DPO optimization operation. This can cause some partitions to be in a very bad affinity state.
The Optmem command also has a-XID parameter indicating that an LPAR does not need optimization, and the-id parameter indicates that an LPAR is optimized first. For example, the meaning of the "optmem–m myserver–o start–t affinity–xid 4–id 2" command is that for server myserver to start DPO optimization operation, the Lpar ID 4 is not optimized, first the Lpar ID 2 is optimized, and then the installation Important to optimize other lpars that are not explicitly described in turn.
Note: Dlpar and LPM operations are not allowed at the same time when performing DPO operations.
AIX 7.1 TL2 (or later), AIX 6.1 TL8 (or later), VIOS 2.2.2.0,IBM I 7.1 PTF MF56058 the operating system can correctly identify DPO completion reports and dynamically identify the real state of physical resources.
However, for a lower operating system version, the DPO completion report will not be recognized, and there is no way to know the underlying physical resource changes. Therefore, it is recommended that you do not perform an online DPO optimization operation on a partition running a low-version operating system.
4. Restart the physical machine
In the case where the DPO feature is not supported, the most efficient way to increase the memory affinity is Power Off, power on the entire server, because after the server Power on, the partition is allocated CPU and memory as the optimal affinity is achieved.
The steps are as follows: (1) Modify the partition profile configuration file (2) as required, and then deactivate the partition with the new profile reactivate to the SMS menu (3) and wait for all partitions to obtain the desired hardware resources , will all partitions deactivate (4) Power off server (5) power on server (6) and then activate partition (no order required)
5. Lpar optimization
If the DPO feature is not currently supported, just want to restart some lpars and do not want to restart the entire server, you can improve the memory affinity through the HMC command chhwres.
The steps are as follows: (1) Deactivate all partitions (2) Use the HMC command chhwres to free all CPU, memory resources that have been allocated to the partition
1) chhwres–r mem–m <system name> o r–q <number of mbtyes>--id <lpar id> #从指定的LPAR移除内存资源 2) chhwre S–r proc–m <system name>-o r--procunits <number>--id <lpar id> # Remove CPU resources from the specified Lpar 3) View all from the HMC GUI The amount of CPU and memory allocated by the partition has changed to 0 (3) Create a full partition and activate the full partition to the SMS menu
(4) Close the full partition and then delete the full partition
(5) According to the importance of the partition, activate each partition in turn, first activate the cpu/memory resource, the most important partition, and then activate the sub-important partition.
This method can also be used for the affinity adjustment of a single lpar, but the degree of improvement is limited and the degree of improvement depends on many factors: CPU idle on the server, memory idle, CPU and memory resource configuration of other lpars.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.