Forum

Bildirimler
Hepsini Temizle

Hyper-V'de 4 Core Sınırlamasının Aşılması

2 Yazılar
2 Üyeler
0 Reactions
515 Görüntüleme
(@cozumpark)
Gönderiler: 16307
Illustrious Member Yönetici
Konu başlatıcı
 

Tam da Microsoft'tan beklediğim gibi bir adım. Kulağıma gelen fısıltılar sonucunda ben de "neden olmasın" dedim ve hemen Google'da aramaya koyuldum. Yaklaşık 15 dk.lık bir aramanın ardından tam da aklımdaki gibi bir ayara ulaştım. Ayarlarla oynayarak Hyper-V'nin 4 adet işlemci sınırlamasını aşabiliyoruz. Ancak hiçbir şekilde desteği olmayan bu işlemin sonuçlarından sadece siz sorumlu olacaksınız:

 


How to hack extra processors in Hyper-V


Good Afternoon folks.

I was playing around with some windows 2k8R2 servers this week.  I have a net goal of setting up a Hyper-V fail over cluster, but ran into a quandary when I wanted to bump the virtual processor count up.  I have 12 cores on the servers why can’t I use half of them on a single virtual server?  In fact, my initial plan was one primary virtual server taking up 90% of the resources on either of its physical nodes.  However out of the box it doesn’t seem to be the case, So… I started poking around.

I knew Hyper-V was based off of Xen, the open source virtualization engine so to me it was obvious that if Xen could do it Hyper-V should be able to.   After poking around with the file paths, I came across one – the snapshot file location, while it wasn’t what I was looking for; its default location did live in an area I had not explored much.

C:\ProgramData\

Or in this case…

C:\ProgramData\Microsoft\Windows\Hyper-V\

In this folder holds a few directories, a pair for Snapshots and another pair for Virtual Machine config files.

Inside the Virtual Machines directory are a file and directory combo named after the GUID of the virtual machines hosted.  The file is an XML file, the directory I don’t encourage you browsing into.  I suspect these are the files which makes things like live migration possible.

For those of you who are running Hyper-V in fail over mode this folder location will probably be on your shared storage.

Any how.  If you have configured a lot of virtual machines the virtual machines directory may be quite full and you’ll have to build a look up table to determine which GUID goes to which virtual machine.  You can do so by opening each xml file and scrolling down to <controller0> which should tell you which virtual hard drive is selected for this VM; if your organized this should be quite clear on which VM it’s being used for.   You can also do a search for “name” and eventually find the VM name in the last quarter of the file.

Once you know you are editing the correct VM, then make sure you back up the config file.  Turn off the virtual machine if you have not done so.  It doesn’t work too well to edit the physical processor count on a live machine – probably best to use the same advice with the virtual machine.  Plus those pesky File Locks can get in the way.

Ok, So you’ve shut down the virtual machine and made a backup of the config…  It’s time to edit the config.

Scroll down to the bottom of the file; the lower 30 lines or so hold a “Settings” section.

<settings>
<global>
<logical_id type=”string”>7E7FE56E-81F6-4E53-B8A2-C4973DCC870C</logical_id>
</global>
<memory>
<bank>
<size type=”integer”>6000</size>
</bank>
</memory>
<processors>
<count type=”integer”>2</count><features>
<limit type=”bool”>False</limit>
</features>
<limit type=”integer”>100000</limit>
<limit_cpuid type=”bool”>False</limit_cpuid>
<reservation type=”integer”>0</reservation>
<weight type=”integer”>100</weight>
</processors>
<stopped_at_host_shutdown type=”bool”>False</stopped_at_host_shutdown>
</settings>

Look for the <processors> section, and in it has the count in the case of above a count of 2.  Change the processor count to the number you’re looking for.  Stay under the # of cores on your machine; in fact good advice says to stay under the # of physical cores – 1.

For example:

If you have 4 quad core processors with 16 cores all together don’t allocate more than 15 processors.

or

If you have 2 six-core processors with 12 cores all together don’t allocate more than 11 processors.

The last core is left open to be dedicated to Dom-0.  Dom-0 being the hardware’s operating system.  This is done so that if your virtual machine gets locked up with run away processes; Dom-0 can still execute the virtual node.

To verify my results I ran NuclearMC on a VM with 1 core, 4 cores, and 8 cores dedicated to the virtual machine.

1 core      4 cores       8 cores
Fibonachi              5875       23392         46075
Factorial                4177       19714         37091
Ferma                     4132        16791         34300
Sort                          2582       12277         25434
Hyperbolic           3533        12081         16405
Digit e                     3896        10147         14348
Picture Morph    3305        8653            12508
Prime                      3583        13896          28276

So the algorithms ramped up with the processor count, a more than half where mostly liner.

Some of the algorithms started showing that with additional processors lowered the # of results per processor; however the net result was higher.

Long story short.  It worked for me.

 
Gönderildi : 11/05/2011 14:40

(@tayfundeger)
Gönderiler: 1943
VMware Guru
 

Gülzel bir bilgi, ancak bunun nekadar sağlıklı çalışacağını araştırmak lazım.

İyi çalışmalar.

Tayfun DEĞER
Cisco Champions, vExpert, VCP4/5/6, VCP5-DT, VCP-Cloud
https://www.tayfundeger.com
Mail: [email protected]

 
Gönderildi : 12/05/2011 12:41

Paylaş: