[Openstack] bw_uasge counters

Monsyne Dragon mdragon at RACKSPACE.COM
Wed Jul 11 17:14:12 UTC 2012


On Jul 11, 2012, at 11:18 AM, Day, Phil wrote:

Hi All,

I’m looking at the network bandwidth code with a view to how the current framework could be made to work with libvirt, and a I have a couple of questions that hopefully someone familiar with the Xen implementation can answer:

-          Do the Xen counters get reset after they are read, or are the values always cumulative ?   (I’m guessing the latter as they seem to be just overwritten by the periodic task).

Xenserver's data is... complex to deal with. it doesn't have counters.  Basically, we can ask "how much bw has been used between time X and now."  We ask that periodically for, with time X being the start of the current audit period, and update the bw cache table with that.




-          It looks as if the table is intended to provide a set of values per instance_uuid/mac combination (presumably to have counters per NIC), but the code which updates the entries looks like it always just updates the first entry it finds for a particular uuid:

        bwusage = model_query(context, models.BandwidthUsage,
                              session=session, read_deleted="yes").\
                              filter_by(start_period=start_period).\
                              filter_by(uuid=uuid).\
                             first()

Heh. that was a bug, which was recently fixed.  Yes, we update per instance/mac combo (now)


        if not bwusage:
            …

Thanks,
Phil
_______________________________________________
Mailing list: https://launchpad.net/~openstack
Post to     : openstack at lists.launchpad.net<mailto:openstack at lists.launchpad.net>
Unsubscribe : https://launchpad.net/~openstack
More help   : https://help.launchpad.net/ListHelp

--
Monsyne M. Dragon
OpenStack/Nova
cell 210-441-0965
work x 5014190

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20120711/5aa07a20/attachment.html>


More information about the Openstack mailing list