<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Oct 7, 2014 at 10:56 AM, Vishvananda Ishaya <span dir="ltr"><<a href="mailto:vishvananda@gmail.com" target="_blank">vishvananda@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5"><br>
On Oct 7, 2014, at 6:21 AM, Daniel P. Berrange <<a href="mailto:berrange@redhat.com">berrange@redhat.com</a>> wrote:<br>
<br>
> On Mon, Oct 06, 2014 at 02:55:20PM -0700, Joe Gordon wrote:<br>
>> On Mon, Oct 6, 2014 at 6:03 AM, Gary Kotton <<a href="mailto:gkotton@vmware.com">gkotton@vmware.com</a>> wrote:<br>
>><br>
>>> Hi,<br>
>>> At the moment the resource tracker in Nova ignores that statistics that<br>
>>> are returned by the hypervisor and it calculates the values on its own. Not<br>
>>> only is this highly error prone but it is also very costly – all of the<br>
>>> resources on the host are read from the database. Not only the fact that we<br>
>>> are doing something very costly is troubling, the fact that we are over<br>
>>> calculating resources used by the hypervisor is also an issue. In my<br>
>>> opinion this leads us to not fully utilize hosts at our disposal. I have a<br>
>>> number of concerns with this approach and would like to know why we are not<br>
>>> using the actual resource reported by the hypervisor.<br>
>>> The reason for asking this is that I have added a patch which uses the<br>
>>> actual hypervisor resources returned and it lead to a discussion on the<br>
>>> particular review (<a href="https://review.openstack.org/126237" target="_blank">https://review.openstack.org/126237</a>).<br>
>>><br>
>><br>
>> So it sounds like you have mentioned two concerns here:<br>
>><br>
>> 1. The current method to calculate hypervisor usage is expensive in terms<br>
>> of database access.<br>
>> 2. Nova ignores that statistics that are returned by the hypervisor and<br>
>> uses its own calculations.<br>
>><br>
>><br>
>> To #1, maybe we can doing something better, optimize the query, cache the<br>
>> result etc. As for #2 nova intentionally doesn't use the hypervisor<br>
>> statistics for a few reasons:<br>
>><br>
>> * Make scheduling more deterministic, make it easier to reproduce issues<br>
>> etc.<br>
>> * Things like memory ballooning and thin provisioning in general, mean that<br>
>> the hypervisor is not reporting how much of the resources can be allocated<br>
>> but rather how much are currently in use (This behavior can vary from<br>
>> hypervisor to hypervisor today AFAIK -- which makes things confusing). So<br>
>> if I don't want to over subscribe RAM, and the hypervisor is using memory<br>
>> ballooning, the hypervisor statistics are mostly useless. I am sure there<br>
>> are more complex schemes that we can come up with that allow us to factor<br>
>> in the properties of thin provisioning, but is the extra complexity worth<br>
>> it?<br>
><br>
> That is just an example of problems with the way Nova virt drivers<br>
> /currently/ report usage to the schedular. It is easily within the<br>
> realm of possibility for the virt drivers to be changed so that they<br>
> report stats which take into account things like ballooning and thin<br>
> provisioning so that we don't oversubscribe. Ignoring the hypervisor<br>
> stats entirely and re-doing the calculations in the resource tracker<br>
> code is just a crude workaround really. It is just swapping one set<br>
> of problems for a new set of problems.<br></div></div></blockquote><div><br></div><div>I agree, lets make reported hypervisor stats actually useful for scheduling. This would mean we can have fewer config options (currently the operator has to set aside resources for the underlying OS via a config option).</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">
<br>
</div></div>+1 lets make the hypervisors report detailed enough information that we<br>
can do it without having to recalculate.<br></blockquote><div><br></div><div>Do we have any idea of how expensive recalculating this information is?</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Vish<br>
<div class="HOEnZb"><div class="h5"><br>
><br>
>> That being said I am fine with discussing in a spec the idea of adding an<br>
>> option to use the hypervisor reported statistics, as long as it is off by<br>
>> default.<br>
><br>
> I'm against the idea of adding config options to switch between multiple<br>
> codepaths because it is just punting the problem to the admins who are<br>
> in an even worse position to decide what is best. It is saying would you<br>
> rather your cloud have bug A or have bug B. We should be fixing the data<br>
> the hypervisors report so that the resource tracker doesn't have to ignore<br>
> them, and give the admins something which just works and avoid having to<br>
> choose between 2 differently broken options.</div></div></blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">
><br>
><br>
> Regards,<br>
> Daniel<br>
> --<br>
> |: <a href="http://berrange.com" target="_blank">http://berrange.com</a> -o- <a href="http://www.flickr.com/photos/dberrange/" target="_blank">http://www.flickr.com/photos/dberrange/</a> :|<br>
> |: <a href="http://libvirt.org" target="_blank">http://libvirt.org</a> -o- <a href="http://virt-manager.org" target="_blank">http://virt-manager.org</a> :|<br>
> |: <a href="http://autobuild.org" target="_blank">http://autobuild.org</a> -o- <a href="http://search.cpan.org/~danberr/" target="_blank">http://search.cpan.org/~danberr/</a> :|<br>
> |: <a href="http://entangle-photo.org" target="_blank">http://entangle-photo.org</a> -o- <a href="http://live.gnome.org/gtk-vnc" target="_blank">http://live.gnome.org/gtk-vnc</a> :|<br>
><br>
> _______________________________________________<br>
> OpenStack-dev mailing list<br>
> <a href="mailto:OpenStack-dev@lists.openstack.org">OpenStack-dev@lists.openstack.org</a><br>
> <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
<br>
</div></div><br>_______________________________________________<br>
OpenStack-dev mailing list<br>
<a href="mailto:OpenStack-dev@lists.openstack.org">OpenStack-dev@lists.openstack.org</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
<br></blockquote></div><br></div></div>