Merge "cleaning up chapter scheduling"

This commit is contained in:
Jenkins 2013-08-12 13:06:00 +00:00 committed by Gerrit Code Review
commit d23f7d3124

View File

@ -79,28 +79,22 @@ ram_weight_multiplier=1.0
that will be used by the scheduler. The default setting that will be used by the scheduler. The default setting
specifies all of the filter that are included with the specifies all of the filter that are included with the
Compute service: Compute service:
<programlisting> <programlisting>scheduler_available_filters=nova.scheduler.filters.all_filters</programlisting>
scheduler_available_filters=nova.scheduler.filters.all_filters This configuration option can be specified multiple times. For
</programlisting>This
configuration option can be specified multiple times. For
example, if you implemented your own custom filter in example, if you implemented your own custom filter in
Python called <literal>myfilter.MyFilter</literal> and you Python called <literal>myfilter.MyFilter</literal> and you
wanted to use both the built-in filters and your custom wanted to use both the built-in filters and your custom
filter, your <filename>nova.conf</filename> file would filter, your <filename>nova.conf</filename> file would
contain: contain:
<programlisting> <programlisting>scheduler_available_filters=nova.scheduler.filters.all_filters
scheduler_available_filters=nova.scheduler.filters.all_filters scheduler_available_filters=myfilter.MyFilter</programlisting>
scheduler_available_filters=myfilter.MyFilter
</programlisting>
</para> </para>
<para>The <literal>scheduler_default_filters</literal> <para>The <literal>scheduler_default_filters</literal>
configuration option in <filename>nova.conf</filename> configuration option in <filename>nova.conf</filename>
defines the list of filters that will be applied by the defines the list of filters that will be applied by the
<systemitem class="service">nova-scheduler</systemitem> service. As <systemitem class="service">nova-scheduler</systemitem> service. As
mentioned above, the default filters are: mentioned above, the default filters are:
<programlisting> <programlisting>scheduler_default_filters=AvailabilityZoneFilter,RamFilter,ComputeFilter</programlisting>
scheduler_default_filters=AvailabilityZoneFilter,RamFilter,ComputeFilter
</programlisting>
</para> </para>
<para>The available filters are described below.</para> <para>The available filters are described below.</para>
<section xml:id="aggregatecorefilter"> <section xml:id="aggregatecorefilter">
@ -201,16 +195,12 @@ scheduler_default_filters=AvailabilityZoneFilter,RamFilter,ComputeFilter
Configuration option in Configuration option in
<filename>nova.conf</filename>. The default setting <filename>nova.conf</filename>. The default setting
is: is:
<programlisting> <programlisting>cpu_allocation_ratio=16.0</programlisting>
cpu_allocation_ratio=16.0
</programlisting>
With this setting, if there are 8 vCPUs on a node, the With this setting, if there are 8 vCPUs on a node, the
scheduler will allow instances up to 128 vCPU to be scheduler will allow instances up to 128 vCPU to be
run on that node.</para> run on that node.</para>
<para>To disallow vCPU overcommitment set:</para> <para>To disallow vCPU overcommitment set:</para>
<programlisting> <programlisting>cpu_allocation_ratio=1.0</programlisting>
cpu_allocation_ratio=1.0
</programlisting>
</section> </section>
<section xml:id="differenthostfilter"> <section xml:id="differenthostfilter">
@ -229,7 +219,7 @@ scheduler_default_filters=AvailabilityZoneFilter,RamFilter,ComputeFilter
With the API, use the With the API, use the
<literal>os:scheduler_hints</literal> key. For <literal>os:scheduler_hints</literal> key. For
example: example:
<programlisting language="json"> <programlisting language="json">{
{ {
'server': { 'server': {
'name': 'server-1', 'name': 'server-1',
@ -240,8 +230,7 @@ scheduler_default_filters=AvailabilityZoneFilter,RamFilter,ComputeFilter
'different_host': ['a0cf03a5-d921-4877-bb5c-86d26cf818e1', 'different_host': ['a0cf03a5-d921-4877-bb5c-86d26cf818e1',
'8c19174f-4220-44f0-824a-cd1eeef10287'], '8c19174f-4220-44f0-824a-cd1eeef10287'],
} }
} }</programlisting>
</programlisting>
</para> </para>
</section> </section>
@ -289,7 +278,8 @@ scheduler_default_filters=AvailabilityZoneFilter,RamFilter,ComputeFilter
require a host that runs an ARM-based processor and require a host that runs an ARM-based processor and
QEMU as the hypervisor. An image can be decorated with QEMU as the hypervisor. An image can be decorated with
these properties using these properties using
<programlisting>glance image-update img-uuid --property architecture=arm --property hypervisor_type=qemu</programlisting> <screen>
<prompt>$</prompt> <userinput>glance image-update img-uuid --property architecture=arm --property hypervisor_type=qemu</userinput></screen>
</para> </para>
<para>The image properties that the filter checks for <para>The image properties that the filter checks for
are:</para> are:</para>
@ -329,10 +319,8 @@ scheduler_default_filters=AvailabilityZoneFilter,RamFilter,ComputeFilter
using the <literal>isolated_hosts</literal> and using the <literal>isolated_hosts</literal> and
<literal>isolated_images</literal> configuration <literal>isolated_images</literal> configuration
options. For example: options. For example:
<programlisting> <programlisting>isolated_hosts=server1,server2
isolated_hosts=server1,server2 isolated_images=342b492c-128f-4a42-8d3a-c5088cf27d13,ebd267a6-ca86-4d6c-9a0e-bd132d6b7d09</programlisting>
isolated_images=342b492c-128f-4a42-8d3a-c5088cf27d13,ebd267a6-ca86-4d6c-9a0e-bd132d6b7d09
</programlisting>
</para> </para>
</section> </section>
@ -391,7 +379,7 @@ isolated_images=342b492c-128f-4a42-8d3a-c5088cf27d13,ebd267a6-ca86-4d6c-9a0e-bd1
1 --hint query='[">=","$free_ram_mb",1024]' server1</userinput></screen> 1 --hint query='[">=","$free_ram_mb",1024]' server1</userinput></screen>
With the API, use the With the API, use the
<literal>os:scheduler_hints</literal> key: <literal>os:scheduler_hints</literal> key:
<programlisting> <programlisting language="json">{
{ {
'server': { 'server': {
'name': 'server-1', 'name': 'server-1',
@ -401,8 +389,7 @@ isolated_images=342b492c-128f-4a42-8d3a-c5088cf27d13,ebd267a6-ca86-4d6c-9a0e-bd1
'os:scheduler_hints': { 'os:scheduler_hints': {
'query': '[">=","$free_ram_mb",1024]', 'query': '[">=","$free_ram_mb",1024]',
} }
} }</programlisting></para>
</programlisting></para>
</section> </section>
<section xml:id="ramfilter"> <section xml:id="ramfilter">
@ -418,9 +405,7 @@ isolated_images=342b492c-128f-4a42-8d3a-c5088cf27d13,ebd267a6-ca86-4d6c-9a0e-bd1
configuration option in configuration option in
<filename>nova.conf</filename>. The default setting <filename>nova.conf</filename>. The default setting
is: is:
<programlisting> <programlisting>ram_allocation_ratio=1.5</programlisting>
ram_allocation_ratio=1.5
</programlisting>
With this setting, if there is 1GB of free RAM, the With this setting, if there is 1GB of free RAM, the
scheduler will allow instances up to size 1.5GB to be scheduler will allow instances up to size 1.5GB to be
run on that instance.</para> run on that instance.</para>
@ -455,7 +440,7 @@ ram_allocation_ratio=1.5
<prompt>$</prompt> <userinput>nova boot --image cedef40a-ed67-4d10-800e-17455edce175 --flavor 1 --hint same_host=a0cf03a5-d921-4877-bb5c-86d26cf818e1 --hint same_host=8c19174f-4220-44f0-824a-cd1eeef10287 server-1</userinput></screen> <prompt>$</prompt> <userinput>nova boot --image cedef40a-ed67-4d10-800e-17455edce175 --flavor 1 --hint same_host=a0cf03a5-d921-4877-bb5c-86d26cf818e1 --hint same_host=8c19174f-4220-44f0-824a-cd1eeef10287 server-1</userinput></screen>
With the API, use the With the API, use the
<literal>os:scheduler_hints</literal> key: <literal>os:scheduler_hints</literal> key:
<programlisting> <programlisting language="json">{
{ {
'server': { 'server': {
'name': 'server-1', 'name': 'server-1',
@ -466,8 +451,7 @@ ram_allocation_ratio=1.5
'same_host': ['a0cf03a5-d921-4877-bb5c-86d26cf818e1', 'same_host': ['a0cf03a5-d921-4877-bb5c-86d26cf818e1',
'8c19174f-4220-44f0-824a-cd1eeef10287'], '8c19174f-4220-44f0-824a-cd1eeef10287'],
} }
} }</programlisting>
</programlisting>
</para> </para>
</section> </section>
@ -502,7 +486,7 @@ ram_allocation_ratio=1.5
</screen> </screen>
<para>With the API, use the <para>With the API, use the
<literal>os:scheduler_hints</literal> key:</para> <literal>os:scheduler_hints</literal> key:</para>
<programlisting language="json"> <programlisting language="json">{
{ {
'server': { 'server': {
'name': 'server-1', 'name': 'server-1',
@ -513,8 +497,7 @@ ram_allocation_ratio=1.5
'build_near_host_ip': '192.168.1.1', 'build_near_host_ip': '192.168.1.1',
'cidr': '24' 'cidr': '24'
} }
} }</programlisting>
</programlisting>
</section> </section>
</section> </section>
@ -529,10 +512,8 @@ ram_allocation_ratio=1.5
which selects the only weigher available -- the which selects the only weigher available -- the
RamWeigher. Hosts are then weighed and sorted with the RamWeigher. Hosts are then weighed and sorted with the
largest weight winning.</para> largest weight winning.</para>
<programlisting> <programlisting>scheduler_weight_classes=nova.scheduler.weights.all_weighers
scheduler_weight_classes=nova.scheduler.weights.all_weighers ram_weight_multiplier=1.0</programlisting>
ram_weight_multiplier=1.0
</programlisting>
<para>The default is to spread instances across all hosts <para>The default is to spread instances across all hosts
evenly. Set the <literal>ram_weight_multiplier</literal> evenly. Set the <literal>ram_weight_multiplier</literal>
option to a negative number if you prefer stacking instead option to a negative number if you prefer stacking instead