<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<div dir="ltr">There's quite a lot to this. So, first off, quotas in horizon are not in great shape, and it should be one of our priorities next cycle to improve on this. As you've pointed out, it seems any check on quotas right now runs multiple serial API
 calls for everything that has quotas; I haven't checked this myself, but others have mentioned the same behaviour.
<div><br>
</div>
<div>I don't think anyone is actively working on improving quota behaviour, but in the past cycle these two efforts spring to mind:</div>
<div>- <a href="https://blueprints.launchpad.net/horizon/+spec/make-quotas-great-again">
https://blueprints.launchpad.net/horizon/+spec/make-quotas-great-again</a><br>
</div>
<div>- <a href="https://review.openstack.org/#/c/334017/">https://review.openstack.org/#/c/334017/</a></div>
<div><br>
</div>
<div>If there are people with time to work on this effort I'd be happy to review. Instances management, quotas, overview pages, Identity work are what I'd currently consider the top priorities for improvement.</div>
<div><br>
</div>
<div>Rob</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On 26 January 2017 at 03:24, Lingxian Kong <span dir="ltr">
<<a href="mailto:anlin.kong@gmail.com" target="_blank">anlin.kong@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>
<div dir="ltr">
<div class="gmail_default"><font face="tahoma, sans-serif">Hi, guys,</font></div>
<div class="gmail_default"><font face="tahoma, sans-serif"><br>
</font></div>
<div class="gmail_default"><font face="tahoma, sans-serif">Sorry for recalling this thread after 1 year, but we are currently suffering from the poor performance issue for our public cloud. </font></div>
<div class="gmail_default"><font face="tahoma, sans-serif"><br>
</font></div>
<div class="gmail_default"><font face="tahoma, sans-serif">As usage of our customers keeps growing, we are at a stage that should seriously pay more attention to horizon performance problem, so Google took me to this email after a lot of search.</font></div>
<div class="gmail_default"><font face="tahoma, sans-serif"><br>
</font></div>
<div class="gmail_default"><font face="tahoma, sans-serif">Currently, when loading a page that may contain some buttons for creating/allocating resource (e.g. 'Access & Security'), horizon will check the quota usage first to see if a specific button should
 be disabled or not, and the checkings just happen *in sequence*, which makes things even worse. </font></div>
<div class="gmail_default"><font face="tahoma, sans-serif"><br>
</font></div>
<div class="gmail_default"><font face="tahoma, sans-serif">What's more, the quota usage query in horizon is included in one function[1], it will invoke Nova, Cinder, Neutron (perhaps more in future) APIs to get usage of bunch of resources, rather than the resource
 that page is rendering, which is another flaw IMHO. I know that this function call is already put in cache, but most of our customers' pain just come from the first click.</font></div>
<div class="gmail_default"><font face="tahoma, sans-serif"><br>
</font></div>
<div class="gmail_default"><font face="tahoma, sans-serif">So, I have a few questions:</font></div>
<div class="gmail_default"><font face="tahoma, sans-serif"><br>
</font></div>
<div class="gmail_default"><font face="tahoma, sans-serif">1. Does horizon support some config option that could disable quota check? As a public cloud, it doesn't make much sense that usage should be limited, and we have a monitoring tool that will increase
 quotas automatically when customer's usage will hit the quota limit. So, getting rid of that check will save our customers appreciable mass of waiting time.</font></div>
<div class="gmail_default"><font face="tahoma, sans-serif"><br>
</font></div>
<div class="gmail_default"><font face="tahoma, sans-serif">2. Another option is to support get quota usage for specific resource rather than all the resources, e.g. when loading floating ip tab, horizon only get floating ip quota usage from Neutron, which has
 only 2 api calls.</font></div>
<div class="gmail_default"><font face="tahoma, sans-serif"><br>
</font></div>
<div class="gmail_default"><font face="tahoma, sans-serif">3. I found this FFE[2] which is great (also replied), but splitting tabs is not the end, more effort should be put into the performance improvement.</font></div>
<div class="gmail_default"><font face="tahoma, sans-serif"><br>
</font></div>
<div class="gmail_default"><font face="tahoma, sans-serif">4. Some other trivial improvement like this: </font><a href="https://review.openstack.org/425494" target="_blank">https://review.<wbr>openstack.org/425494</a></div>
<div class="gmail_default"><font face="tahoma, sans-serif"><br>
</font></div>
<div class="gmail_default"><font face="tahoma, sans-serif">[1]: </font><a href="https://github.com/openstack/horizon/blob/master/openstack_dashboard/usage/quotas.py#L396" target="_blank">https://github.com/openst<wbr>ack/horizon/blob/master/openst<wbr>ack_dashboard/usage/quotas.py#<wbr>L396</a></div>
<div class="gmail_default">[2]: <a href="http://openstack.markmail.org/thread/ra3brm6voo4ouxtx#query:+page:1+mid:oata2tifthnhy5b7+state:results" target="_blank">http://openstack.<wbr>markmail.org/thread/<wbr>ra3brm6voo4ouxtx#query:+page:<wbr>1+mid:oata2tifthnhy5b7+state:<wbr>results</a></div>
<div class="gmail_extra"><font face="tahoma, sans-serif"><br clear="all">
</font>
<div>
<div class="m_-2964274615231930661gmail-m_-53317656967369809gmail-m_7455941545383019998m_3047723482775250075gmail_signature">
<div dir="ltr">
<div>
<div dir="ltr">
<div><font face="tahoma, sans-serif"><br>
Cheers,<br>
Lingxian Kong (Larry)</font></div>
</div>
</div>
</div>
</div>
</div>
<br>
<div class="gmail_quote">On Wed, Dec 23, 2015 at 9:50 PM, Timur Sufiev <span dir="ltr">
<<a href="mailto:tsufiev@mirantis.com" target="_blank">tsufiev@mirantis.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
Duncan,<br>
<br>
Thank you for the suggestion, will do.
<div class="m_-2964274615231930661gmail-m_-53317656967369809gmail-m_7455941545383019998m_3047723482775250075HOEnZb">
<div class="m_-2964274615231930661gmail-m_-53317656967369809gmail-m_7455941545383019998m_3047723482775250075h5">
<br>
<div class="gmail_quote">
<div dir="ltr">On Wed, 23 Dec 2015 at 10:55, Duncan Thomas <<a href="mailto:duncan.thomas@gmail.com" target="_blank">duncan.thomas@gmail.com</a>> wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div dir="ltr">On a cloud with a large number of tenants, this is going to involve a large number of API calls. I'd suggest you put a spec into cinder to add an API call for getting the totals straight out of the DB - it should be easy enough to add.<br>
</div>
<div class="gmail_extra"></div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On 18 December 2015 at 20:35, Timur Sufiev <span dir="ltr">
<<a href="mailto:tsufiev@mirantis.com" target="_blank">tsufiev@mirantis.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div dir="ltr">Matt,
<div><br>
</div>
<div>actually Ivan (Ivan, thanks a lot!) showed me the exact cinderclient call that I needed. Now I know how to retrieve Cinder quota usage info per-tenant, seems that to retrieve the same info cloud-wide I should sum up all the available tenant usages.</div>
<div><br>
</div>
<div>With Cinder quota usages being sorted out, my next goal is Nova and Neutron. As for Neutron, there are plenty of quota-related calls I'm going to play with next week, perhaps there is something suitable for my use case. But as for Nova, I haven't found
 something similar to 'usage' of cinderclient call, so help from someone familiar with Nova is very appreciated :).</div>
<div><br>
</div>
<div>[0] <a href="https://github.com/openstack/python-cinderclient/blob/master/cinderclient/v2/quotas.py#L36" target="_blank">https://github.com/opensta<wbr>ck/python-cinderclient/blob/ma<wbr>ster/cinderclient/v2/quotas.py<wbr>#L36</a></div>
</div>
<div>
<div><br>
<div class="gmail_quote">
<div dir="ltr">On Fri, Dec 18, 2015 at 5:17 PM Matt Riedemann <<a href="mailto:mriedem@linux.vnet.ibm.com" target="_blank">mriedem@linux.vnet.ibm.com</a>> wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<br>
<br>
On 12/17/2015 2:40 PM, Ivan Kolodyazhny wrote:<br>
> Hi Timur,<br>
><br>
> Did you try this Cinder API [1]?  Here [2] is cinderclient output.<br>
><br>
><br>
><br>
> [1]<br>
> <a href="https://github.com/openstack/python-cinderclient/blob/master/cinderclient/v2/quotas.py#L33" rel="noreferrer" target="_blank">
https://github.com/openstack/p<wbr>ython-cinderclient/blob/master<wbr>/cinderclient/v2/quotas.py#L33</a><br>
> [2] <a href="http://paste.openstack.org/show/482225/" rel="noreferrer" target="_blank">
http://paste.openstack.org/sho<wbr>w/482225/</a><br>
><br>
> Regards,<br>
> Ivan Kolodyazhny,<br>
> <a href="http://blog.e0ne.info/" rel="noreferrer" target="_blank">http://blog.e0ne.info/</a><br>
><br>
> On Thu, Dec 17, 2015 at 8:41 PM, Timur Sufiev <<a href="mailto:tsufiev@mirantis.com" target="_blank">tsufiev@mirantis.com</a><br>
> <mailto:<a href="mailto:tsufiev@mirantis.com" target="_blank">tsufiev@mirantis.com</a>>> wrote:<br>
><br>
>     Hello, folks!<br>
><br>
>     I'd like to initiate a discussion of the feature request I'm going<br>
>     to make on behalf of Horizon to every core OpenStack service which<br>
>     supports Quota feature, namely Cinder, Nova and Neutron.<br>
><br>
>     Although all three services' APIs support special calls to get<br>
>     current quota limitations (Nova and Cinder allows to get and update<br>
>     both per-tenant and default cloud-wide limitations, Neutron allows<br>
>     to do it only for per-tenant limitations), there is no special call<br>
>     in any of these services to get current per-tenant usage of quota.<br>
>     Because of that Horizon needs to get, say for 'volumes' quota, a<br>
>     list of Cinder volumes in the current tenant and then just calculate<br>
>     its length [1]. When there are really a lot of entities in tenant -<br>
>     instances/volumes/security groups/whatever - all this calls sum up<br>
>     and make rendering pages in Horizon much more slower than it could<br>
>     be. Is it possible to provide special API calls to alleviate this?<br>
><br>
>     [1]<br>
>     <a href="https://github.com/openstack/horizon/blob/9.0.0.0b1/openstack_dashboard/usage/quotas.py#L350" rel="noreferrer" target="_blank">https://github.com/openstack/<wbr>horizon/blob/9.0.0.0b1/opensta<wbr>ck_dashboard/usage/quotas.py#L<wbr>350</a><br>
><br>
>     _____________________________<wbr>______________________________<wbr>_______________<br>
>     OpenStack Development Mailing List (not for usage questions)<br>
>     Unsubscribe:<br>
>     <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" rel="noreferrer" target="_blank">OpenStack-dev-request@lists.o<wbr>penstack.org?subject:unsubscri<wbr>be</a><br>
>     <<a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" rel="noreferrer" target="_blank">http://OpenStack-dev-request<wbr>@lists.openstack.org?subject:u<wbr>nsubscribe</a>><br>
>     <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" rel="noreferrer" target="_blank">http://lists.openstack.org/cg<wbr>i-bin/mailman/listinfo/opensta<wbr>ck-dev</a><br>
><br>
><br>
><br>
><br>
> ______________________________<wbr>______________________________<wbr>______________<br>
> OpenStack Development Mailing List (not for usage questions)<br>
> Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" rel="noreferrer" target="_blank">
OpenStack-dev-request@lists.op<wbr>enstack.org?subject:unsubscrib<wbr>e</a><br>
> <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" rel="noreferrer" target="_blank">
http://lists.openstack.org/cgi<wbr>-bin/mailman/listinfo/openstac<wbr>k-dev</a><br>
><br>
<br>
I think Timur is asking for a way to filter on only certain resources<br>
for quota usage/limits, like volumes in cinder or instances in nova,<br>
rather than getting back all resource usage/limits per tenant.<br>
<br>
Is that correct, Timur?<br>
<br>
While it's possible to add this, I'm not sure how much time it's<br>
actually going to save in the DB query time to get the quota information<br>
for a tenant.<br>
<br>
Anyway, it's an API change so it would require a spec for nova which<br>
means we wouldn't be getting to that until at least N since we're in<br>
spec freeze for mitaka.<br>
<br>
--<br>
<br>
Thanks,<br>
<br>
Matt Riedemann<br>
<br>
<br>
______________________________<wbr>______________________________<wbr>______________<br>
OpenStack Development Mailing List (not for usage questions)<br>
Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" rel="noreferrer" target="_blank">
OpenStack-dev-request@lists.op<wbr>enstack.org?subject:unsubscrib<wbr>e</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" rel="noreferrer" target="_blank">http://lists.openstack.org/cgi<wbr>-bin/mailman/listinfo/openstac<wbr>k-dev</a><br>
</blockquote>
</div>
</div>
</div>
<br>
______________________________<wbr>______________________________<wbr>______________<br>
OpenStack Development Mailing List (not for usage questions)<br>
Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" rel="noreferrer" target="_blank">
OpenStack-dev-request@lists.op<wbr>enstack.org?subject:unsubscrib<wbr>e</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" rel="noreferrer" target="_blank">http://lists.openstack.org/cgi<wbr>-bin/mailman/listinfo/openstac<wbr>k-dev</a><br>
<br>
</blockquote>
</div>
<br>
<br clear="all">
<br>
</div>
<div class="gmail_extra">-- <br>
<div>
<div dir="ltr">
<div>-- <br>
Duncan Thomas</div>
</div>
</div>
</div>
______________________________<wbr>______________________________<wbr>______________<br>
OpenStack Development Mailing List (not for usage questions)<br>
Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" rel="noreferrer" target="_blank">
OpenStack-dev-request@lists.op<wbr>enstack.org?subject:unsubscrib<wbr>e</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" rel="noreferrer" target="_blank">http://lists.openstack.org/cgi<wbr>-bin/mailman/listinfo/openstac<wbr>k-dev</a><br>
</blockquote>
</div>
</div>
</div>
<br>
______________________________<wbr>______________________________<wbr>______________<br>
OpenStack Development Mailing List (not for usage questions)<br>
Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" rel="noreferrer" target="_blank">
OpenStack-dev-request@lists.op<wbr>enstack.org?subject:unsubscrib<wbr>e</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" rel="noreferrer" target="_blank">http://lists.openstack.org/cgi<wbr>-bin/mailman/listinfo/openstac<wbr>k-dev</a><br>
<br>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</body>
</html>