Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What does processor folding mean?

2025-01-15 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

In this issue, the editor will bring you about what processor folding means. The article is rich in content and analyzes and narrates it from a professional point of view. I hope you can get something after reading this article.

Introduction to 1.CPU folding function

Virtual processor Management (VirtualProcessorManagement), also known as processor folding Technology (CPUFolding), is a Power virtualization feature that controls the amount of VP (VirtualProcessor) used by a LPAR processing. According to the current AIX settings, processor folding is enabled by default for micro-partitions (that is, shared processor partitions), while proprietary processor partitions (dedicatedLPAR) are turned off by default.

The function of processor folding technology is mainly reflected in two aspects:

1) Energy saving. If all VP corresponding to a physical core are folded, PowerVMhypervisor can put the core in a state of low energy consumption.

2) improve the overall processing efficiency, especially in environments with low EC:VP configuration, such as 1:10 or above (in the new generation power resource pool, EC:VP=1:2), if more than 10 times of the VP is directly scheduled to each physical core (PhysicalProcessor,PP), it will cause certain scheduling overhead; therefore, by folding unnecessary VP, you can effectively reduce the unnecessary overhead of hypervisor and improve the overall efficiency.

This feature is helpful in both scenarios: 1) LPARCPU utilization is low and most VP are idle; by reducing the number of VP, you can effectively increase the physical core share of each VP (i.e. physc, you can view the pc/ core value of each core through mpstat/sar-PALL, etc.); thus, you can effectively reduce the scheduling overhead of hypervisor and the operating system. For example, if the partition can only actually consume 16 physical cores (lparstat shows physc=16), but the number of VP is set to 64, and if the system can use only 16 VP to schedule jobs, then the way at 1:1 when VP is scheduled to the physical core (close to Dedicated mode), hypervisor scheduling efficiency is higher, and affinity is generally better. In contrast, if the system directly uses 64 VP to schedule jobs, the VP is scheduled to the physical core at 4:1, and the efficiency and affinity are generally slightly lower.

2) due to the shortage of processor resources in the processor pool (processorpool), LPAR begins to compete for CPU resources; the number of VP actually defines the upper limit of physical cores that LPAR can compete for; however, not every partition can always get the upper limit, especially in the environment with low EC:VP. When the competition for processor resources is fierce, the total processor resources available to partitions may be limited, and reducing the number of VP of partitions also has the benefit of overall scheduling. For example, if a partition of a 8VP can only get 2.0 physical cores (physc=2.0), then if the number of activated VP is reduced to 4 (equivalent to the average 0.5physicalcore per VP), the performance is generally better than that when the VP is 8 (equivalent to the average 0.25physicalcore per VP).

2.AIXCPU folding algorithm and experiment

Every second, the AIX operating system monitors the overall VP utilization of this partition. If the overall VP utilization is lower than vpm_fold_threshold (the default for AIX6.1TL6 is 49% later; it can be confirmed by the schedo command), AIX will enable the folding feature and start to fold down the VP so that the load runs on less VP. Note that the collapsed VP still exists in the system, but the system no longer schedules job threads to these collapsed VP. If the total utilization exceeds the vpm_fold_threshold, AIX will begin to expand the VP to use more VP to schedule the load. Users can choose whether to turn on the folding policy by controlling the parameters, and you can also set the number of VP activated through the vpm_xvcpus option of schedo.

Description of 2.1VPM control parameters

The Folding policy switch is controlled by the vpm_fold_policy option of schedo.

1) vpm_fold_policy=0 turns off folding function in scenarios other than static energy saving mode

2) vpm_fold_policy=1 only turns on folding function in micro-partitioned environment (default setting)

3) vpm_fold_policy=2 only turns on folding function in proprietary processor partition environment

4) vpm_fold_policy=3 turns on folding function in both micro-partition and proprietary processor partition environment.

5) vpm_fold_policy=4 completely shuts down the folding function

There is also a parameter vpm_xvcpus that affects the Folding policy switch, which controls the number of micropartitions that the system can start automatically when the micropartition CPU is insufficient.

1) if you set vpm_xvcpus =-1, vpm_fold_policy will be automatically set to 0, which will disable the folding feature. However, if static energy saving mode (StaticPowerSaving) is enabled in the partition at this time, the system will automatically set vpm_fold_policy to 3 to turn on the folding function.

2) set vpm_xvcpus = 0, indicating that CPU folding (ProcessorFolding) is enabled, and the virtual processor is being managed

3) set vpm_xvcpus greater than 1 to enable the CPU folding function, and the number of virtual CPUs enabled is the sum of physical CPU usage and vpm_xvcpus parameters. That is:

Number=ceiling (p_util+vpm_xvcpus)

Where number is the number of virtual processors required and p_util is the physical processor usage. If the number is less than the number of virtual processors currently enabled, a virtual processor is disabled. If the number is greater than the number of virtual processors currently enabled, the disabled virtual processors are enabled. When the vpm_xvcpus is greater than 1, it also indicates the number of CPU activated by the guarantee. Threads connected to disabled virtual processors can still run on disabled virtual processors

Description:

1) StaticPowerSaverMode: the static energy saving mode is that when the system CPU workload is low, the system reduces the physical CPU main frequency and voltage to a fixed value, in order to achieve the purpose of energy saving. This setting is not recommended for systems that generally focus on performance.

2) DynamicPowerSaverMode: the dynamic energy saving mode is that the system adjusts the physical CPU main frequency and voltage (not a fixed value) in real time according to the CPU load, in order to achieve the purpose of energy saving.

3) the above two energy-saving modes are turned off by default and can be set through HMC/ASMI.

2.2AIXCPU folding experiment

Start a ncpu task to increase the CPU load on the system and start 16 processes, each busy 50% of the time, which requires about 8 physical core.

The folding phenomenon of VP can also be seen through the kdb command. The logical CPU that identifies "DIS" in the following figure is the folding state.

1) as you can see from lparstat, whether folding is turned on or off, the physc is about 8.00.

2) as can be seen from the output of mpstat-s, in the same scenario (8 tasks are 50% busy), when starting cpu folding, only 9 VCPU; are needed and when cpu folding is closed, all 16 VCPU are started.

The influence of 3.CPU folding function on the system

3.1 impact of shutting down CPUfolding:

Turn off the automatic scheduling optimization of the micro-partition environment in the system; all VP will be scheduled to hypervisor, regardless of whether there is an actual load on these VP; higher hypervisor delay, physical resource affinity may also be affected.

3.2 benefits of shutting down CPU folding:

When the partition sizing is perfect, such as when the EC:VP is always controlled at no less than 1:2 and the processor pool resources are never limited, turning off folding may gain some performance benefits (mainly by reducing VPM management overhead and avoiding unfold deployment CPU latency)

The above is the meaning of the processor folding shared by the editor. If you happen to have similar doubts, you might as well refer to the above analysis to understand. If you want to know more about it, you are welcome to follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report