<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Jun 12, 2014 at 11:33 AM, Tiago Sousa <span dir="ltr"><<a href="mailto:tiagu.asp@gmail.com" target="_blank">tiagu.asp@gmail.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">Hi, does anyone have documentation on how the extra_specs work?<div>

<br></div></div></blockquote><div><br></div><div>There's a bit of a worked example in the Operations Guide. </div><div>From <a href="http://docs.openstack.org/trunk/openstack-ops/content/scaling.html">http://docs.openstack.org/trunk/openstack-ops/content/scaling.html</a></div>

<div><p style="font-size:10pt;font-family:Verdana,Geneva,sans-serif;color:rgb(0,0,0)"><a id="d6e2313" class="">An advanced use of this general concept allows different instance types to run with different CPU and RAM allocation rations so that high-intensity computing loads and low-intensity development and testing systems can share the same cloud without either starving the high-use systems or wasting resources on low-utilization systems. This works by setting <code class="">metadata</code> in your host aggregates and matching <code class=""><span class="" style="background-color:rgb(197,211,195)">extra_specs</span></code> in your instance types.</a></p>

<p style="font-size:10pt;font-family:Verdana,Geneva,sans-serif;color:rgb(0,0,0)"><a id="d6e2313" class="">The first step is setting the aggregate metadata keys <code class="">cpu_allocation_ratio</code> and <code class="">ram_allocation_ration</code> to a floating-point value. The filter schedulers <code class="">AggregateCoreFilter</code> and <code class="">AggregateRamFilter</code> will use those values rather than the global defaults in <code class="">nova.conf</code> when scheduling to hosts in the aggregate. It is important to be cautious when using this feature, since each host can be in multiple aggregates but should have only one allocation ratio for each resources. It is up to you to avoid putting a host in multiple aggregates that define different values for the same <span class="">resource</span>.</a></p>

<p style="font-size:10pt;font-family:Verdana,Geneva,sans-serif;color:rgb(0,0,0)"><a id="d6e2313" class="">This is the first half of the equation. To get instance types that are guaranteed a particular ratio, you must set the<code class=""><span class="" style="background-color:rgb(197,211,195)">extra_specs</span></code> in the instance type to the key-value pair you want to match in the aggregate. For example, if you define<code class="">extra specs</code> <code class="">cpu_allocation_ratio</code> to "1.0", then instances of that type will run in aggregates only where the metadata key <code class="">cpu_allocation_ratio</code> is also defined as "1.0." In practice, it is better to define an additional key-value pair in the aggregate metadata to match on rather than match directly on <code class="">cpu_allocation_ratio</code> or <code class="">core_allocation_ratio</code>. This allows better abstraction. For example, by defining a key <code class="">overcommit</code> and setting a value of "high," "medium," or "low," you could then tune the numeric allocation ratios in the aggregates without also needing to change all instance types relating to them.</a></p>

</div><div> </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"><div></div><div>I would like to add a serial port to a flavor, and my research pointed me to the extra_specs but got stuck there.</div>

<div>
<br></div><div><br clear="all"><div>Cheers,</div><div>Tiago</div>
</div></div>
<br>_______________________________________________<br>
Mailing list: <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack</a><br>
Post to     : <a href="mailto:openstack@lists.openstack.org">openstack@lists.openstack.org</a><br>
Unsubscribe : <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack</a><br>
<br></blockquote></div><br></div></div>