{"id":96,"date":"2006-10-03T20:29:25","date_gmt":"2006-10-04T06:29:25","guid":{"rendered":"https:\/\/anildesai.net\/?p=96"},"modified":"2009-09-03T20:09:39","modified_gmt":"2009-09-04T01:09:39","slug":"optimizing-microsoft-virtual-server-part-2-managing-cpu-resource-allocation","status":"publish","type":"post","link":"https:\/\/anildesai.net\/index.php\/2006\/10\/optimizing-microsoft-virtual-server-part-2-managing-cpu-resource-allocation\/","title":{"rendered":"Optimizing Microsoft Virtual Server, Part 2: Managing CPU Resource Allocation"},"content":{"rendered":"<p><em>This article was first published on <\/em><a href=\"http:\/\/searchservervirtualization.techtarget.com\/\"><em>SearchServerVirtualization.TechTarget.com<\/em><\/a><em>.<\/em><\/p>\n<p>By default, Virtual Server will treat all VMs with equal priority. In production environments, however, it\u2019s common to have some VMs that are more important than others. Accordingly, you\u2019ll want to let Virtual Server know which VMs should get preference. Virtual Server offers two main methods for managing CPU utilization per VM. To access the settings, click on \u201cResource Allocation\u201d in the Virtual Server section of the Administration Web Site. Figure 1 provides a view of the default resource allocations for VMs.<\/p>\n<p><a href=\"https:\/\/anildesai.net\/wp-content\/uploads\/2007\/10\/image10.png\"><img loading=\"lazy\" decoding=\"async\" style=\"border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px\" src=\"https:\/\/anildesai.net\/wp-content\/uploads\/2007\/10\/image-thumb10.png\" border=\"0\" alt=\"image\" width=\"473\" height=\"336\" \/><\/a><\/p>\n<p><strong>Figure 1: Configuring CPU settings in the Virtual Server Administration Web Site.<\/strong><\/p>\n<p>The initial display might seem simple enough, but there\u2019s a lot of potential power here. Let\u2019s look at the two main ways in which you can configure CPU settings.<\/p>\n<h2>Weight-Based Resource Allocation<\/h2>\n<p>The simplest way to assign priorities to your VMs is to assign \u201cweights\u201d to them. When doling out CPU resources, Virtual Server will give preference to each VM based on its <em>relative<\/em> weight setting. The values can range from 1 (the lowest priority) to 10,000 (highest priority). By default, all VMs will have a relative weight setting of 100. Since the values are relative, you can setup your own conventions, such as using only values in the range of 1to 10 or 1 to 100. For example, if you want an important VM to have twice the priority of the others, you can set it to a weight of 200 (assuming that the other VMs are using the default weight of 100).<\/p>\n<p>The preferences will kick in whenever CPU resources are limited. Weight-based resource allocation is the quickest and easiest way prioritize your workloads while ensuring that all CPU resources are still available for use.<\/p>\n<h2>Constraint-Based Resource Allocation<\/h2>\n<p>In some cases, you\u2019ll want more granular control over how CPU resources are managed. That\u2019s where constraint-based resource allocation comes in. This method is a bit more complicated (and you can make CPU resources unavailable if you don\u2019t understand the settings). But, it can be very useful in production environments. You can specify two constraint types as percentages:<\/p>\n<ul>\n<li><strong>Reserved Capacity<\/strong>: This setting tells Virtual Server to reserve a certain amount of CPU time for a VM, whether or not it is actually using it. Since it\u2019s difficult to predict when an important VM will need resources, you can use this setting to ensure that one or more VMs will never be left waiting for CPU time. Just keep in mind that you can adversely impact other VMs running on the same machine, since the reserved capacity won\u2019t be available to other VMs.<\/li>\n<\/ul>\n<ul>\n<li><strong>Maximum Capacity<\/strong>: A potential problem when running multiple VMs is that one VM could monopolize CPU time and adversely affect all of the other VMs on the system. The maximum capacity setting specifics an upper limit to the amount of CPU time that a VM may use. Again, keep in mind that there\u2019s a potential for wasted cycles: Even if there are no other VMs competing for resources, the amount of CPU power that can be accessed by the VM will be limited. This option is also helpful if you have other applications or services running on the host system, and you want to ensure that Virtual Server doesn\u2019t dominate the machine.<\/li>\n<\/ul>\n<p>By default, the reserved capacity is set to 0%, and the maximum capacity at 100% for all VMs. This effectively disables constraint-based resource allocation. Both settings can be defined as either a percentage of one CPU, or a percentage of all CPU resources on the system. The Administration Web Site automatically calculates the amount of resources left to allocate and shows the current CPU utilization per VM. Figure 2 shows an example of configured values.<\/p>\n<p><a href=\"https:\/\/anildesai.net\/wp-content\/uploads\/2007\/10\/image11.png\"><img loading=\"lazy\" decoding=\"async\" style=\"border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px\" src=\"https:\/\/anildesai.net\/wp-content\/uploads\/2007\/10\/image-thumb11.png\" border=\"0\" alt=\"image\" width=\"452\" height=\"323\" \/><\/a><\/p>\n<p><strong>Figure 2: Enabling Constraint-Based Resource Allocation<\/strong><\/p>\n<p>One other helpful feature: Resource allocation settings can be change dynamically while VMs are running. That can help troubleshoot problems with, for example, a VM that is hanging and trying to use all of the available CPU time.<\/p>\n<h3>Controlling Virtualization Mindshare<\/h3>\n<p>As you can see, there are several ways in which you can tune Virtual Server\u2019s CPU resource referee. By letting Virtual Server know the relative importance of your VMs, you can help the virtualization layer make better decisions about how to ration resources. OK, that covers managing CPU resources: Next on our hit-list for performance optimization will be managing virtual hard disks.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This article was first published on SearchServerVirtualization.TechTarget.com. By default, Virtual Server will treat all VMs with equal priority. In production environments, however, it\u2019s common to have some VMs that are more important than others. Accordingly, you\u2019ll want to let Virtual Server know which VMs should get preference. Virtual Server offers two main methods for managing [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[23,12],"tags":[],"class_list":["post-96","post","type-post","status-publish","format-standard","hentry","category-microsoft-virtual-server","category-virtualization"],"_links":{"self":[{"href":"https:\/\/anildesai.net\/index.php\/wp-json\/wp\/v2\/posts\/96","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/anildesai.net\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/anildesai.net\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/anildesai.net\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/anildesai.net\/index.php\/wp-json\/wp\/v2\/comments?post=96"}],"version-history":[{"count":1,"href":"https:\/\/anildesai.net\/index.php\/wp-json\/wp\/v2\/posts\/96\/revisions"}],"predecessor-version":[{"id":386,"href":"https:\/\/anildesai.net\/index.php\/wp-json\/wp\/v2\/posts\/96\/revisions\/386"}],"wp:attachment":[{"href":"https:\/\/anildesai.net\/index.php\/wp-json\/wp\/v2\/media?parent=96"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/anildesai.net\/index.php\/wp-json\/wp\/v2\/categories?post=96"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/anildesai.net\/index.php\/wp-json\/wp\/v2\/tags?post=96"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}