Further discuss Hyper-V dynamic memory management and excessive memory usage

Source: Internet
Author: User

In practice, the growing experience will become a kind of Jinyu that can meet and cannot be obtained. A few years ago, I firmly believed that virtualization would make it o & M arbitrary. Now I have discovered that the management of this brand-new business often makes new mistakes. Due to some trivial matters in my family, I withdrew from the MVP re-election application (although I have enjoyed this honor for 3 + 1 years in a row), but I found that this is the same as the old party's letter: "This does not mean to leave. I will be back at any time ". I wrote an article "Start your Hyper-v virtualization journey with a PPT" long ago. I think we should continue the discussion.

Excessive memory and dynamic memory are both pursuing the maximization of Virtual Machine density.

We know that in a virtualized server environment, the lack of enough physical memory will directly affect the design density of virtual machines, at the design stage, we will precise the physical memory technology used for migration to MB. Of course, this will certainly affect the ROI of the entire system, and the memory has become a short board of virtualization. Later, I found that vSphere began to provide the technology of excessive memory usage, which allowed the vmwarevm to use more memory than the actual memory capacity of the physical host, and the location of the virtual machine can be different according to the service period, eat and drink in different parent partitions. But slowly, I began to pay attention to this unprecedented virtual feature, because the rate of mechanical disks in comparison is really low. When too much virtual memory is used, the performance of the Virtual Machine decreases linearly, this is exactly a wrong design that we should avoid before introducing virtualization.

I still remember the first time I heard the term "excessive memory usage", some people put forward a few ideas, but those may lead to today's difficulties. The term "excessive memory usage" is a misunderstanding for people who are not familiar with virtualization. Is it "memory overflow "? Because excessive use seems to mean excessive use of resources. In fact, the idea is that even if there is no physical memory to support the resources configured for the system, you can create multiple virtual machines that usually require a certain amount of memory. Basically, the amount of memory allocated to multiple virtual machines on the physical host can exceed the amount of physical memory on the host by using the memory overuse technology, this allows the physical host to have a higher virtual machine density.

Dynamic Memory (Dynamic Memory) is a new feature of Microsoft Hyper-V R2 SP1, which improves the virtual Memory allocation mechanism, this can also increase the ratio between virtual machines and hosts, that is, the virtual machine density. However, there is no doubt that there is a lack of support strategies from software vendors. For example, some blackhearted applications will still expand their memory requirements and sell them by bundling hardware, which may limit the use of this advantage.

Some nagging and Suggestions

I strongly agree with Brien Posey (MVP): "Hyper-V memory management is an art !"

Dynamic memory should be a pioneering initiative, but it must comply with Microsoft's Hyper-V best practices guidelines to avoid the art of memory management for virtual machines. After reading the kb and lib documents and conducting targeted tests, I hope the following can help you:

When Hyper-V is enabled on a virtual machine, the virtual machine can determine the memory size required immediately. Then, the host allocates the required quantity to the virtual machine and some additional capacity to serve as the buffer. The "memory buffer" in the slice ". If multiple virtual machines are running on a host, the host will automatically balance the memory allocation among all virtual machines, as shown in the figure "memory weight ".

It should be said that dynamic memory is sometimes not always the best choice. It is important to disable dynamic memory for some virtual machines and enable dynamic memory for these resources based on the virtual machines that can really benefit from application features. Unless you are very good at analyzing operational performance indicators, it is extremely difficult to assign these values correctly. It can demonstrate software or use load testing tools to determine actual memory requirements, but there are still some unknown events because they are not in the production environment, so you need to explore for a long time to use dynamic memory capacity planning.

For example, if you configure the NAP solution used by the windows server 2008 TS gateway, TS Server and NPS may need a lot of memory at night, this is the opposite peak business time (there are still a lot of people working overtime at home, alas), and the memory demand rapidly declines.

For example, if a virtual DNS or AD host only needs MB of memory, but is allocated 2 GB of memory, you are wasting valuable host resources. However, if this is a student status management server that I mentioned in my DELL interview (how to start your virtualization path), because it is only during enrollment and departure hours, dynamic Memory is definitely the best design option.

For example, some SQL databases use dynamic memory, which speeds up the processing of a large amount of query information and is feasible in the world of static allocation. However, for dynamic memory allocation, excessive use and dynamic memory will definitely encounter a problem: Comparison of the disk speed and memory speed mentioned above. These programs may see a decrease in memory level during off-peak hours, but there is very little possibility of a decrease in memory. Therefore, for some programs that call large SQL databases, you can use the maximum memory settings of Hyper-V dynamic memory to limit the memory of virtual machines. You can also limit the memory consumption in the SQL database. Of course, the best practice is to improve the program calling mechanism, or use "application-level" to control them, rather than dynamic memory technology.

Related Article

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.