Patent ID: 8477610

Claim:
One or more computer-storage memory having computer-executable instructions embodied thereon that, when executed, perform a method for metering various data flows of packets originating from a plurality of virtual machines (VMs) instantiated on a single physical node, the method comprising: inspecting one or more quality of service (QoS) policies written to a contract, wherein the contract governs allocation of network resources to a first client; depositing tokens into a first token-bucket queue based, in part, on the one or more QoS policies of the first-client contract, wherein the first token-bucket queue is assigned to a first VM instantiated on the physical node; detecting the first VM is in an active state based on a depletion of the deposited tokens from the first token-bucket queue, wherein a portion of the deposited tokens are withdrawn from the first token-bucket queue as a function of a rate of the data flow from the first VM; reloading tokens into the first token-bucket queue based, in part, on the one or more QoS policies and a portion of the deposited tokens remaining in the first token-bucket queue detecting the first VM is in an idle state based on a lack of usage of the deposited tokens from the first token-bucket queue, wherein the deposited tokens are not withdrawn from the first token-bucket queue when the first VM ceases transmitting packets therefrom; and abstaining from reloading tokens into the first token-bucket queue based, in part, on the idle state of the first VM, wherein inspecting one or more QoS policies written to a contract comprises determining a minimal amount of tokens to reserve for the first token-bucket queue when the first VM has assumed the idle state.