How to calculate the network percentage of virtual machines with its utilization metrics ? there will be different sizes of vms with different capacities so any formula to calculate it ?

Shiva Karthik Rallabandi 5 Reputation points
2023-06-07T09:45:12.7133333+00:00

So i am trying to calculate the network % of virtual machines as it is shown in advisory but could not able to crack the formula for it. Virtual machine are of different sizes and contains different metrics . So we need proper formula to get the network % of virtual machine. I was able to calculate memory percentage by the metric (Available Memory Bytes/ Memory In GiB for each Vm)*100.

Thank you.

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
8,056 questions
Azure AI Metrics Advisor
Azure AI Metrics Advisor
An Azure artificial intelligence analytics service that proactively monitors metrics and diagnoses issues.
83 questions
Azure Advisor
Azure Advisor
An Azure personalized recommendation engine that helps users follow best practices to optimize Azure deployments.
64 questions
0 comments No comments
{count} vote

2 answers

Sort by: Most helpful
  1. deherman-MSFT 37,501 Reputation points Microsoft Employee
    2023-06-08T16:15:59.3166667+00:00

    @Shiva Karthik Rallabandi

    Unfortunately there is not an easy way to accomplish this. You will need to find the limit for each VM based on your testing or the VM size.

    Keep in mind that the network bandwidth allocated to each virtual machine is metered on egress (outbound) traffic from the virtual machine. All network traffic leaving the virtual machine is counted toward the allocated limit, regardless of destination. For example, if a virtual machine has a 1,000-Mbps limit, that limit applies whether the outbound traffic is destined for another virtual machine in the same virtual network, or outside of Azure.

    Base don this you could use something like this to calculate the percentage:

    Network Utilization % = (Network Out Total in MB / Maximum Network Bandwidth in MB) * 100


    If you still have questions, please let us know in the "comments" and we would be happy to help you. Comment is the fastest way of notifying the experts.

    If the answer has been helpful, we appreciate hearing from you and would love to help others who may have the same question. Accepting answers helps increase visibility of this question for other members of the Microsoft Q&A community.

    Thank you for helping to improve Microsoft Q&A!

    User's image


  2. Patchfox 3,926 Reputation points
    2023-06-09T09:46:47.6066667+00:00

    Hi, since the expected and estimated network bandwidth is only a rough guideline given by Microsoft, these numbers are unfortunately difficult to retrieve via a query or request.

    If a comparison between actual usage and maximum possible usage is to be made, there is no way around a separate listing of the types with associated estimated bandwidth values.

    These are the measured values you will get from Azure Monitor out of the box:

    • Bytes Received: Number of bytes the Network Interface received
    • Bytes Sent: Number of bytes the Network Interface sent
    • Packets Received: Number of packets the Network Interface received
    • Packets Sent: Number of packets the Network Interface sent

    I found another thread here, which might help you.

    https://stackoverflow.com/questions/68749028/i-need-a-query-to-measure-network-bandwidth-utilization-in-azure-using-kql

    For the KQL query you would have to run the Log Analytics Agent on the VMs to store data in the perf table. (https://learn.microsoft.com/en-us/azure/azure-monitor/agents/data-sources-performance-counters)

    And here a blog article about VM monitoring/analytics, including network.

    https://azure.microsoft.com/en-us/blog/analysis-of-network-connection-data-with-azure-monitor-for-virtual-machines/

    In conclusion, without your own development or scripting activity, it's not possible to get this comparison as you want.


    If the reply was helpful, please don’t forget to upvote or accept it as an answer, thank you.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.