Quality of Service in Memory
Intelligent reuse of virtual machine memory is provided, which depends on memory reserve ratio. By using memory reuse technology such as memory bubbles, physical memory is virtualized into more virtual memory for virtual machines to use. Each virtual machine can fully use the allocated virtual memory. This function can maximize the reuse of memory resources, improve resource utilization, and ensure that at least the reserved size of memory can be obtained when the virtual machine runs, to ensure the reliable operation of the business.
System administrators can set up virtual machine memory reserve according to the actual needs of users. The main principle of memory reuse is to give priority to physical memory.
Memory QoS includes two parameters: memory resource share
Memory share defines the allocation of memory resources proportionally when multiple virtual machines compete for memory resources.
When a virtual machine requests memory resources or the host releases free memory (virtual machine migration or shutdown), it is allocated proportionally according to the memory share of the virtual machine.
Unlike real-time scheduling of CPU resources, the scheduling of memory resources is a gentle process. The strategy of memory share will be continuously fine-tuned in the process of virtual machine running, so that the amount of memory acquisition of virtual machine will gradually become proportional.
Taking a 6G memory-size host as an example, suppose it runs three virtual machines with 4G memory-size, and their memory share is respectively
20480, 20480, 40960, then its memory allocation ratio is 1:1:2. When all three virtual machines are gradually pressurized, the strategy will be based on
The share of the three virtual machines is allocated to adjust the memory resources proportionally. Finally, the memory acquired by the three virtual machines is stable at 1.5G, 1.5G and 1.5G.
3G.
Memory share only plays a role when each virtual machine competes for memory resources. If no competition occurs, the required virtual machine can maximize the access to memory resources. For example, if VM B and C have no memory pressure and do not reach the reserved value, VM A can obtain memory resources from idle memory, VM B and C when the pressure of memory demand increases until VM A reaches the upper limit or the idle memory is exhausted and VM B and C reach the reserved value. In the above example, when a virtual machine with a share of 40960 does not have memory pressure (memory resources are reserved for 1G), the two virtual machines with a share of 20480 can theoretically achieve a maximum of 2.5G of memory each.


