Automation

 View Only
  • 1.  Latency Sensitivity Reporting to CSV

    Posted Sep 18, 2023 01:48 PM

    Hi All

    Starting off on a few scripts with Latency Sensitivity.

    Looking for some code which will scan through all VMs in a Cluster and identify any with the "latency Sensitivity" flag set.

    Where set, Will write out the VM Name and LS configuration level to different labelled columns in a CSV.

    Also if set to vCPU limit applied to the VM.

    Eventually to make modifications to the vCPU limits set

    Cheers

    P



  • 2.  RE: Latency Sensitivity Reporting to CSV

    Posted Sep 18, 2023 03:45 PM

    Which latency sensitivity flag are you talking about?
    Is that something shown in the Web Client?



  • 3.  RE: Latency Sensitivity Reporting to CSV

    Posted Sep 18, 2023 04:49 PM

    Hi there !

     

    Yes here.. (altho its out of date)

    Latency Sensitivity in VMware vSphere 5.5: Overview (petri.com)

    P



  • 4.  RE: Latency Sensitivity Reporting to CSV

    Posted Sep 18, 2023 06:10 PM

    You mean something like this?



  • 5.  RE: Latency Sensitivity Reporting to CSV

    Posted Sep 18, 2023 07:07 PM

    I dont know but it looks cool.....

    Will try it out in a couple of days...

    Then have a really tricky set of mods to apply based on the output 



  • 6.  RE: Latency Sensitivity Reporting to CSV

    Posted Sep 22, 2023 08:04 AM

    Hi Luc

    Works a charm many thanks modded slightly as below.

    -

    Get-VM | where {$_.ExtensionData.Config.LatencySensitivity.Level -eq 'high'} | `
    Select Name, `
    @{N='LatencySensitivity';E={$_.ExtensionData.Config.LatencySensitivity.Level}},`
    @{N='CPUReserve';E={$_.ExtensionData.ResourceConfig.CPUAllocation.reservation}},`
    @{N='CPULimit';E={$_.ExtensionData.ResourceConfig.CPUAllocation.limit}},`

    -

    Now the "interesting" bit.....

    For every VM where LatencySensitivity and a CPU Allocation reservation is set

    Increase the CPU Allocation reservation assigned by x1 CPU core.

    -

     So something like this to start with (We have multiple clusters with different host configurations in them)

    Identify how fast one core runs on the host where the VM is located (Which i think is as below).

    (get-vmhost)[0].extensiondata.Hardware.CPUinfo.Hz / 1000000

    #Returns  2593.905771  (then round this up to the nearest number (I.E 2594)

    -

    Then

    Add this value to the CPU Allocation reservation previously set against the VM..

    -

    Am I making any sense.....

    Kr 

     

     

     



  • 7.  RE: Latency Sensitivity Reporting to CSV

    Posted Sep 22, 2023 09:09 AM

    Try something like this



  • 8.  RE: Latency Sensitivity Reporting to CSV

    Posted Sep 22, 2023 10:42 AM

    Looks good will work it when i get chance. !

    -

    Just in case (and I probably will) can you advise on a slightly different way of doing the same.

    -

    Get VM, where LatencySensitivity and a CPU Allocation reservation is set

    Get vCPU count assigned to the VM

    Divide CPU allocation reservation by vCPUs assigned (= Reservation assignment for x1 vCPU)

    Increase the current CPU Allocation reservation set by the reservation for x1 vCPU

     



  • 9.  RE: Latency Sensitivity Reporting to CSV

    Posted Sep 25, 2023 07:20 AM

    Hi Luc

    As suspected ... indeed they wanted to slice the pie this way too.

    .

    Any thoughts on what it may look like

    Kr

    P



  • 10.  RE: Latency Sensitivity Reporting to CSV

    Posted Sep 25, 2023 09:35 AM

    Something like this?



  • 11.  RE: Latency Sensitivity Reporting to CSV

    Posted Sep 26, 2023 08:41 AM

    Ah Thats Super Luc good sir.

     

    I think i can make sense of your code ..... so hopefully will be able to adjust as may be required.

    Super many thanx

    kr