• Tweaking CPU Core Parking

    I’ve done a lot of Windows Server 2008 R2 and Hyper-V related presentations over the last two years and this topic always seems to generate a few questions.  It's a great feature, but a little obscure and reliable information can be hard to find.  One of the new features of Windows Server 2008 R2 is the ability to “park” CPU cores. For Hyper-V, the very deep processor idle sleep states that offer the most benefit with core parking are only supported with CPU features that were introduced with the Nehalem/Opteron CPU’s.  So, to be clear – core parking will work with all multi-core CPU types but when using Hyper-V you are going to see the most benefit when using the latest Xeon/Opteron processors.

    The following excerpt is from the R2 Performance Tuning Guide which can be found HERE:

    (Starting on page 27 of THIS whitepaper details ALL of the available options to tweak CPU core parking)

    Processor Performance Core Parking Maximum and Minimum Cores

    Core parking is a new feature in Windows Server 2008 R2. The processor power management (PPM) engine and the scheduler work together to dynamically adjust the number of cores that are running threads. The PPM engine chooses a minimum number of cores on which threads will be scheduled. Cores that are chosen to be “parked” do not have any threads scheduled on them and they can drop into a lower power state. The remaining set of “unparked” cores are responsible for the entirety of the workload (with the exception of affinitized work or directed interrupts). Core parking can increase power efficiency during lower usage periods on the server because parked cores can drop into a low-power state.

    For most servers, the default core-parking behavior provides the optimum balance of throughput and power efficiency. If your server has specific core-parking requirements, you can control the number of cores available to park by using either the Processor Performance Core Parking Maximum Cores parameter or the Processor Performance Core Parking Minimum Cores parameter in Windows Server 2008 R2.

    The values for these parameters are percentages in the range 0–100. The Maximum Cores parameter controls the maximum percentage of cores that can be unparked at any time, while the Minimum Cores parameter controls the minimum percentage of cores that can be unparked. To turn off core parking, set the minimum cores parked to 100 percent by using the following commands:

    Powercfg -setacvalueindex scheme_current sub_processor bc5038f7-23e0-4960-96da-33abaf5935ec 100

    Powercfg -setactive scheme_current

    To reduce the number of schedulable cores to 50 percent of the maximum count, set the Maximum Cores parameter to 50 as follows:

    Powercfg -setacvalueindex scheme_current sub_processor bc5038f7-23e0-4960-96da-33abaf5935ec 50

    Powercfg -setactive scheme_current

    Now check to see if it’s working – use Resource Monitor to see if any cores are parked:

  • Booting Hyper-V R2 From USB

    Didn’t think you could boot Hyper-V from a USB?  Well, you can.

    Yeah, kinda snuck up on me too – I knew this was a feature request but it fell off my radar as it’s not something that I’ve had a need for and quite frankly, no one has asked me about it in any of the dozens of sessions that I’ve done on virtualization to partners and customers since R2 was released.  But, after a conference call last week when this topic came up, I thought I better go do some due diligence to see where we were.  Sure enough, this is fully supported now.

    So, I grabbed my Kingston DataTraveler 16GB USB stick and set out to see if I could make this work.

    The cool thing about how this works is that you are actually booting from a VHD – the operating system isn’t ‘installed’ to the USB drive.  If you didn’t know, this ability to boot from a VHD is a new feature available in Windows 2008 R2 and Windows 7.  You could dual boot your Windows 7 to this VHD that is created during this process if you wanted to.  You could copy it to your hard drive, modify the boot manager to point to the VHD and you’re done.  More details on how to do that HERE.

    That said, first I’ll describe the ‘command line’ method, which is basically what this tool is doing for your behind the scenes, just so you know.  I actually tried running the tool but ended up with a .NET error but didn’t feel like troubleshooting. :)

    For the command-line junkies:

    Step 1: Get a USB-drive with at least 8 GB storage. This is minimum req’s for Hyper-V Server 2008 R2, but I’d recommend 16 GB. Shop the fastest one you can find, it’ll be worth it when you have to sit around and wait. You’ll also need the ISO for Hyper-V Server 2008 R2 and the Windows Automated Installation Kit (WAIK).

    Either burn your ISO or use a program to mount it as a virtual drive. You could also extract the files to a directory

    Step 2: Fire up CMD with admin-rights.

    diskpart (starts the disk management CMD-utility)
    create vdisk file=driveletter:\virtualharddisk.vhd maximum=6000 type=fixed (creates a VHD on driveletter: of the size 6000 Mb and it’s fixed size for better performance)
    select vdisk file=driveletter:\virtualharddisk.vhd (selects the created disk)
    attach vdisk (attaches it so Windows can see it)
    list disk (shows you all the disks in the system, note the number of your newly created VHD)

    select disk disknumber (selects the newly created VHD)
    create partition primary (creates a primary partition)
    select partition 1 (selects the primary partition)
    active (sets it to active)
    format fs=ntfs quick (format it with NTFS and do it quick)
    assign (assigns a driveletter, note with driveletter it gets!)

    Leave this window open and start a new CMD with administrative rights.

    Step 3: Download Windows AIK from Microsoft (1.7 GB) and install it. You need this to get ImageX which we’ll need soon and you could use the WAIK to customize your installation but that’s beyond the scope of this post.

    Step 4:
    imagex /info dvddrive:\sources\install.wim (this will show you all the entries (or versions) available in the WIM-file, Hyper-V Server 2008 R2 has only one entry, index 1)

    imagex /apply dvddrive:\sources\install.wim /check 1 vhddrive:\

    Step 5: Back to our diskpart-CMD
    diskpart
    select vdisk file=driveletter:\virtualharddisk.vhd
    attach vdisk
    list volume
    (note the drive letter for the newly mounted VHD.)

    Step 6:
    bcdboot vhddrive:\Windows /s usbdrive: /v (this copies the boot-files from your VHD’s Windows-directory to your USB-stick, which lets you boot later on)

    Step 7:
    When it’s finished, go back to the CMD with diskpart active and run

    detach vdisk
    exit

    Now for the “BootFromUSB” Method:

    But first, a few pre-requisites. 

    The tool is pretty prescriptive with hover-over help so you know what to stick in each box, but it’s pretty straightforward.  Here’s what it looks like for my setup:

    image

    Technorati Tags:

  • Microsoft VDI Reference Architecture Resources

    I’ve been getting a number of requests for these types of resources.  So, I thought I’d aggregate everything I know about in a single spot.  If you know of others, please let me know and I’ll include them in this list.

    RDS Architecture Summary:

    http://www.microsoft.com/downloads/en/details.aspx?displaylang=en&FamilyID=9bc943b7-07c5-4335-9df9-20e77ed5032e

    Virtualized RDSH guide (including costing):

    http://www.microsoft.com/downloads/en/details.aspx?displaylang=en&FamilyID=8d454921-72d6-45b4-b6ba-ac1c26d337bd

    Host Capacity planning  :

    http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=bd24503e-b8b7-4b5b-9a86-af03ac5332c8

    Another deployment guide (not the IPD) :

    http://www.microsoft.com/downloads/en/details.aspx?displaylang=en&FamilyID=1d95a910-72a5-44ec-96db-6853f6f9dc5b

    IDC Business Value of Client Virtualization:

    ftp://ftp.hp.com/pub/c-products/servers/vdi/Biz_ClientVirtualization_White_Paper.pdf

    VDI Reference Architecture Guides (HP/Dell):

    http://h20195.www2.hp.com/V2/GetPDF.aspx/4AA0-2391ENW.pdf

    http://h20195.www2.hp.com/V2/getdocument.aspx?docname=4AA2-7731ENW.pdf

    http://h20195.www2.hp.com/V2/GetPDF.aspx/4AA2-7731ENW.pdf

    Citrix:

    XenDesktop 4 on Windows 2008 R2 Hyper-V Scalability Report

    http://www.citrix.com/site/resources/dynamic/partnerDocs/XD_4_Hyper-V_Scalability_Final_v1.0.pdf

    http://www.citrixandmicrosoft.com/Docs/WhitePapers/DELL_MSFT_CTRX_VRD_RA_vFinal.pdf

    http://www.citrix.com/site/resources/dynamic/partnerDocs/XenDesktop-Xeon-HyperV_SolutionBrief_Jun2010.pdf

    Microsoft IPD Guides:

    http://www.microsoft.com/downloads/en/details.aspx?FamilyId=AD3921FB-8224-4681-9064-075FDF042B0C&displaylang=en

    10 VDI Resources for Microsoft + Citrix:

    http://blogs.technet.com/b/davidzi/archive/2010/08/01/10-vdi-resources-for-microsoft-citrix-implementations.aspx

  • Microsoft Partners – Check Out the New MPN Transition Tool

    With all the changes to the Microsoft Partner Network, the MPN team created the new “Transition Tool” to help you (our Partners) through this process.  This is the tool that you will want to use to better understand what you need to do to prepare for the MSPP to MPN transition.

    Partner Transition Tool (for Partner):  https://web.mpntools.com/signin.aspx

    Contact the MPN Experts to develop their customized transition plans.

    · Microsoft Partner Network Experts at 1-877-254-6825 or msppexp@microsoft.com

    Participate in the Back to School Promotion.

    Act now and get your certifications up-to-date. Just choose the Competency Exam Pack that works for you and enjoy the savings:

    3-pack—Save 20%, plus free retakes

    5-pack—Save 25%, plus free retakes

    8-pack—Save 30%, plus free retakes

  • ESX vs Hyper-V Footprint War…

    I attended a hypervisor compete session at VMWorld this week and saw this topic come up yet again.  Can we please put the ‘footprint war’ to rest already?

    VMware's claim was that since the ESX hypervisor is smaller than Hyper-V (it’s not), that means a smaller attack surface and fewer patches which equates to more “.9999’s”.  Of course, the gentlemen presenting the session called out every single Windows/Hyper-V update that causes a server reboot and conveniently neglected to show ANY similar information for ESX.  I was glad to see another attendee bring this up at the Q&A.  The presenter answered with, “That’s good feedback”.  Sure.

    Here’s more from VMware’s website:

    Microsoft attempted to follow VMware’s lead to reduce the attack surface of its virtualization platform by offering Windows Server Core (a subset of Windows Server 2008) as an alternative parent partition to a full Windows Server 2008 R2 install. However, the disk footprint of Server Core in its virtualization role is still approximately 3.6 gigabytes (GB). Until Microsoft changes its virtualization architecture to remove its dependency on Windows, it will remain large and vulnerable to Windows patches, updates, and security breaches.

    Alright, let’s put this thing to rest already…

    First of all – there’s this great feature called ‘clustering’.  Both Hyper-V and ESX have the ability to move virtual machines to other hosts in the cluster with no downtime (ie; vMotion or Live Migration).  That means hosts can come down for routine maintenance with little or no impact to the virtual workloads.

    REALITY:  Everyone has to patch.  Our friends at VMware are not the exception to this rule.  If you run VMware, you know this already.  If you don’t – check out this PAGE.

    I count 8 critical update packs since July of 2009 for ESX 4.0.  

    image

    Now, I don't claim to be an ESX guru so I don’t know if the VM shutdown part is completely accurate – but it’s possible that one or more of the updates in these ‘packs’ require the VM’s to restart (perhaps upgrades to the integration components?).  If that’s the case though, that’s even worse than I originally thought.  Either way, I’m just reading what THEY say. 

    Add them all up – it’s over 4GB of updates in a year.  Now, I don’t know how much of that 4GB is over writing older stuff or is adding new stuff.  Does it matter?  It’s bigger…a LOT bigger than 70MB footprint they claim…

    Back to VMWorld.  At the compete session, I see this slide again.

    image

    Seriously?  How can you have 4GB of updates for ESX in a year and then say that your disk footprint is 70MB? 

    Want more proof?  Here’s a picture I snapped when doing my own ESX 4.0 install.  If it’s hard to read (you can click on it to make it bigger) – here’s what it says:

    “ESX REQUIRES AT LEAST 1.25GB.  IF THE SERVICE CONSOLE IS INSTALLED ON THE SAME DEVICE AS ESX, AT LEAST 9.5GB IS REQUIRED.”

    image

    Here’s a comprehensive list of Hyper-V updates – going back to R1.  (I know of one other from a few weeks ago that’s not in this list.  It was last updated in May, so there may be others)

    The moral of the story is – whatever you are running - Hyper-V or ESX, you are going to have to deal with updates, service packs, patches and the like. 

    Ah, but you say…VMware is moving to ESXi now – no more ESX.  So, that will significantly decrease the number of patches, right?

    Doubt it.  I count 9 updates to ESXi since July 2009.  1.6GB worth to be exact – all require rebooting the host.

    Now, can we move on please?