Skip to content

Commit

Permalink
Adds info about CPU, disk, vif, bandwidth quotas on flavors.
Browse files Browse the repository at this point in the history
Fix bug 1090654
Fix bug 1210248

Change-Id: I63b962dc6c9caf23b412782f00e1fe5623be68f5
  • Loading branch information
annegentle committed Aug 9, 2013
1 parent 58d21d5 commit ccc2c8e
Show file tree
Hide file tree
Showing 6 changed files with 203 additions and 85 deletions.
20 changes: 13 additions & 7 deletions doc/src/docbkx/common/section_compute-configure-quotas.xml
Expand Up @@ -5,7 +5,7 @@
xmlns:ns5="http://www.w3.org/1999/xhtml"
xmlns:ns4="http://www.w3.org/2000/svg"
xmlns:ns3="http://www.w3.org/1998/Math/MathML"
xmlns:ns="http://docbook.org/ns/docbook">
xmlns:ns="http://docbook.org/ns/docbook" version="5.0">
<title>Configuring Quotas</title>

<para>For tenants, quota controls are available to limit the (flag and default shown in
Expand Down Expand Up @@ -44,17 +44,23 @@ parenthesis):<itemizedlist>
<para>Number of security groups that may be created (security_groups=10)</para>
</listitem>
<listitem>
<para>Number of rules per security group (security_group_rules=20)</para>
</listitem>
<para>Number of rules per security group
(security_group_rules=20)</para>
</listitem>
<listitem>
<para>Number of CPU resources consumed by VM, KVM only
(cpu_quota=5000)</para>
</listitem>
</itemizedlist></para>
<para>The defaults may be modified by setting the variable in
<literal>nova.conf</literal>, then restarting the <systemitem class="service">nova-api</systemitem>
service.</para>
<para>To modify a value for a specific project, the <command>nova-manage</command>
command should be used. For example:
<para>To modify a value for a specific project, the
<command>nova-manage</command> command should be used. For
example:
<screen><userinput><prompt>$</prompt> nova-manage project quota --project=1113f5f266f3477ac03da4e4f82d0568 --key=cores --value=40</userinput></screen>
Alternately, quota settings are available through the OpenStack Dashboard in the "Edit
Project" page.</para>
Alternately, quota settings are available through the
OpenStack Dashboard in the "Edit Project" page.</para>
<xi:include href="../common/tables/nova-quota.xml"/>

</section>
180 changes: 180 additions & 0 deletions doc/src/docbkx/common/section_customize_flavors.xml
@@ -0,0 +1,180 @@
<?xml version="1.0" encoding="UTF-8"?>
<section xml:id="customize-flavors"
xmlns="http://docbook.org/ns/docbook"
xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0">
<title>Customizing Flavors</title>
<para>The <command>nova flavor-create</command> command allows
authorized users to create new flavors. Additional flavor
manipulation commands can be shown with the command
<command>nova help | grep flavor</command>. Note that the
OpenStack Dashboard simulates the ability to modify an
existing flavor by deleting an existing flavor and creating a
new one with the same name.</para>
<para>Flavors define a number of elements:</para>
<itemizedlist>
<listitem>
<para><literal>ID</literal>: a unique numeric id</para>
</listitem>
<listitem>
<para><literal>Name</literal>: a descriptive name.
<replaceable>xx</replaceable>.<replaceable>size_name</replaceable>
is typically not required, though some third party
tools may rely on it.</para>
</listitem>
<listitem>
<para><literal>Memory_MB</literal>: virtual machine memory
in megabytes</para>
</listitem>
<listitem>
<para><literal>Disk</literal>: virtual root disk size in
gigabytes. This is an ephemeral disk that the base
image is copied into. When booting from a persistent
volume it is not used. The "0" size is a special case
which uses the native base image size as the size of
the ephemeral root volume.</para>
</listitem>
<listitem>
<para><literal>Ephemeral</literal>: specifies the size of
a secondary ephemeral data disk. This is an empty,
unformatted disk and exists only for the life of the
instance.</para>
</listitem>
<listitem>
<para><literal>Swap</literal>: optional swap space
allocation for the instance</para>
</listitem>
<listitem>
<para><literal>VCPUs</literal>: number of virtual CPUs
presented to the instance</para>
</listitem>
<listitem>
<para><literal>RXTX_Factor</literal>: optional property
allows created servers to have a different bandwidth
cap than that defined in the network they are attached
to. This factor is multiplied by the rxtx_base
property of the network. Default value is 1.0 (that
is, the same as attached network).</para>
</listitem>
<listitem>
<para><literal>Is_Public</literal>: Boolean value, whether
flavor is available to all users or private to the
tenant it was created in. Defaults to True.</para>
</listitem>
<listitem>
<para><literal>extra_specs</literal>: additional optional
restrictions on which compute nodes the flavor can run
on. This is implemented as key/value pairs that must
match against the corresponding key/value pairs on
compute nodes. Can be used to implement things like
special resources (e.g., flavors that can only run on
compute nodes with GPU hardware).</para>
</listitem>
</itemizedlist>
<para>Flavor customization can be limited by the hypervisor in
use, for example the libvirt driver enables quotas on CPUs
available to a VM, disk tuning, bandwidth I/O, and instance
VIF traffic control.</para>
<para>You can configure the CPU limits with three control
parameters with the nova-manage tool. Here is an example of
configuring the I/O limit:</para>
<screen><prompt>#</prompt> <userinput>nova-manage flavor set_key --name m1.small --key quota:read_bytes_sec --value 10240000</userinput></screen>
<screen><prompt>#</prompt> <userinput>nova-manage flavor set_key --name m1.small --key quota:read_bytes_sec --value 10240000</userinput></screen>
<para>There are CPU control parameters for weight shares,
enforcement intervals for runtime quotas, and a quota for
maximum allowed bandwidth.</para>
<para>The optional cpu_shares element specifies the proportional
weighted share for the domain. If this element is omitted, the
service defaults to the OS provided defaults. There is no unit
for the value, it's a relative measure based on the setting of
other VMs. For example, a VM configured with value 2048 will
get twice as much CPU time as a VM configured with value 1024.</para>
<para>The optional cpu_period element specifies the enforcement
interval(unit: microseconds) for QEMU and LXC hypervisors.
Within period, each VCPU of the domain will not be allowed to
consume more than quota worth of runtime. The value should be
in range [1000, 1000000]. A period with value 0 means no
value.</para>
<para>The optional cpu_quota element specifies the maximum allowed
bandwidth(unit: microseconds). A domain with quota as any
negative value indicates that the domain has infinite
bandwidth, which means that it is not bandwidth controlled.
The value should be in range [1000, 18446744073709551] or less
than 0. A quota with value 0 means no value. You can use this
feature to ensure that all vcpus run at the same speed. An
example:</para>
<screen>
<prompt>#</prompt> <userinput>nova flavor-key m1.low_cpu set cpu_quota=10000</userinput></screen>
<screen>
<prompt>#</prompt> <userinput>nova flavor-key m1.low_cpu set cpu_period=20000</userinput></screen>
<para>In that example, the instance of m1.low_cpu can only consume
a maximum of 50% CPU of a physical CPU computing
capability.</para>
<para>Through quotas for disk I/O, you can set maximum disk write
to 10MB/sec for VM user for example:</para>
<screen><prompt>#</prompt> <userinput>nova flavor-set m1.medium set disk_write_bytes_sec=10240000</userinput></screen>
<para>These are the options for disk I/O:</para>
<itemizedlist>
<listitem>
<para>disk_read_bytes_sec</para>
</listitem>
<listitem>
<para>disk_read_iops_sec</para>
</listitem>
<listitem>
<para>disk_write_bytes_sec</para>
</listitem>
<listitem>
<para>disk_write_iops_sec</para>
</listitem>
<listitem>
<para>disk_total_bytes_sec</para>
</listitem>
<listitem>
<para>disk_total_iops_sec</para>
</listitem>
</itemizedlist>
<para>These are the options for vif I/O:</para>
<para>
<itemizedlist>
<listitem>
<para>vif_inbound_ average</para>
</listitem>
<listitem>
<para>vif_inbound_burst</para>
</listitem>
<listitem>
<para>vif_inbound_peak</para>
</listitem>
<listitem>
<para>vif_outbound_ average</para>
</listitem>
<listitem>
<para>vif_outbound_burst</para>
</listitem>
<listitem>
<para>vif_outbound_peak</para>
</listitem>
</itemizedlist>
</para>
<para>Incoming and outgoing traffic can be shaped independently.
The bandwidth element can have at most one inbound and at most
one outbound child element. Leaving any of these children
element out result in no QoS applied on that traffic
direction. So, when you want to shape only the network's
incoming traffic, use inbound only, and vice versa. Each of
these elements have one mandatory attribute average. It
specifies average bit rate on the interface being shaped. Then
there are two optional attributes: peak, which specifies
maximum rate at which bridge can send data, and burst, amount
of bytes that can be burst at peak speed. Accepted values for
attributes are integer numbers, The units for average and peak
attributes are kilobytes per second, and for the burst just
kilobytes. The rate is shared equally within domains connected
to the network.</para>
<para>Here are some examples for configuring a bandwidth limit for
instance network traffic:</para>
<screen><prompt>#</prompt> <userinput>nova-manage flavor set_key --name m1.small --key quota:inbound_average --value 10240</userinput>
</screen>
<screen><prompt>#</prompt><userinput>nova-manage flavor set_key --name m1.small --key quota:outbound_average --value 10240</userinput></screen>
</section>
4 changes: 2 additions & 2 deletions doc/src/docbkx/common/section_host_aggregates.xml
Expand Up @@ -169,8 +169,8 @@ xml:id="host-aggregates">
<para>Once the flavor has been created, we specify one or more key-value pair that must
match the key-value pairs on the host aggregates. In this case, there's only one
key-value pair, <literal>ssd=true</literal>. Setting a key-value pair on a flavor is
done using the <command>nova-manage instance_type set_key</command>
command.<screen><prompt>#</prompt> <userinput>nova-manage instance_type set_key --name=ssd.large --key=ssd --value=true</userinput></screen></para>
done using the <command>nova flavor-key set_key</command>
command.<screen><prompt>#</prompt> <userinput>nova flavor-key set_key --name=ssd.large --key=ssd --value=true</userinput></screen></para>
<para>Once it is set, you should see the <literal>extra_specs</literal> property of the
<literal>ssd.large</literal> flavor populated with a key of <literal>ssd</literal>
and a corresponding value of
Expand Down
4 changes: 2 additions & 2 deletions doc/src/docbkx/common/section_trusted-compute-pools.xml
Expand Up @@ -113,10 +113,10 @@ auth_blob=i-am-openstack</programlisting></para>
<title>Specify trusted flavors</title>
<para>One or more flavors must be configured as "trusted". Users can then request trusted
nodes by specifying one of these trusted flavors when booting a new instance. Use the
<command>nova-manage instance_type set_key</command> command to set a flavor as
<command>nova flavor-key set</command> command to set a flavor as
trusted. For example, to set the m1.tiny flavor as trusted:</para>
<para>
<screen><prompt>#</prompt> <userinput>nova-manage instance_type set_key m1.tiny trust:trusted_host trusted</userinput></screen>
<screen><prompt>#</prompt> <userinput>nova flavor-key m1.tiny set trust:trusted_host trusted</userinput></screen>
</para>
<para>A user can request that their instance runs on a trusted host by specifying a trusted
flavor when invoking the <command>nova boot</command> command.</para>
Expand Down
5 changes: 3 additions & 2 deletions doc/src/docbkx/common/tables/nova-quota.xml
Expand Up @@ -17,7 +17,8 @@
</tr>
<tr>
<td>enable_network_quota=False</td>
<td>(BoolOpt) Enables or disables quotaing of tenant networks</td>
<td>(BoolOpt) Enables or disables quota
checking of tenant networks <!-- Fix for source is at https://review.openstack.org/40271 --></td>
</tr>
<tr>
<td>quota_cores=20</td>
Expand Down Expand Up @@ -73,4 +74,4 @@
</tr>
</tbody>
</table>
</para>
</para>
75 changes: 3 additions & 72 deletions doc/src/docbkx/openstack-compute-admin/ch_instance_mgmt.xml
Expand Up @@ -316,78 +316,9 @@ header: Date: Thu, 13 Sep 2012 20:27:36 GMT
| 5 | m1.xlarge | 16384 | 160 | N/A | 0 | 8 | |
+----+-----------+-----------+------+-----------+------+-------+-------------+
</computeroutput></screen>
<para>The <command>nova flavor-create</command> command
allows authorized users to create new flavors.
Additional flavor manipulation commands can be shown
with the command <command>nova help | grep flavor</command></para>

<para>Flavors define a number of elements <itemizedlist>
<listitem>
<para><literal>ID</literal>: a unique numeric id</para>
</listitem>
<listitem>
<para><literal>Name</literal>: a descriptive name.
<replaceable>xx</replaceable>.<replaceable>size_name</replaceable>
is conventional not required, though some
third party tools may rely on it.</para>
</listitem>
<listitem>
<para><literal>Memory_MB</literal>: virtual machine memory in
megabytes</para>
</listitem>
<listitem>
<para><literal>Disk</literal>: virtual root disk size in
gigabytes. This is an ephemeral disk that
the base image is copied into. When
booting from a persistent volume it is not
used. The "0" size is a special case which
uses the native base image size as the
size of the ephemeral root volume.</para>
</listitem>
<listitem>
<para><literal>Ephemeral</literal>: specifies the size of a
secondary ephemeral data disk. This is an
empty, unformatted disk and exists only
for the life of the instance.</para>
</listitem>
<listitem>
<para><literal>Swap</literal>: optional swap space allocation for
the instance</para>
</listitem>
<listitem>
<para><literal>VCPUs</literal>: number of virtual CPUs presented
to the instance</para>
</listitem>
<listitem>
<para><literal>RXTX_Factor</literal>: optional property allows
created servers to have a different
bandwidth cap than that defined in the
network they are attached to. This factor
is multiplied by the rxtx_base property of
the network. Default value is 1.0 (that
is, the same as attached network).</para>
</listitem>
<listitem>
<para><literal>Is_Public</literal>: Boolean value, whether flavor
is available to all users or private to
the tenant it was created in. Defaults to
True.</para>
</listitem>
<listitem>
<para><literal>extra_specs</literal>: additional optional
restrictions on which compute nodes the
flavor can run on. This is implemented as
key/value pairs that must match against
the corresponding key/value pairs on
compute nodes. Can be used to implement
things like special resources (e.g.,
flavors that can only run on compute nodes
with GPU hardware).</para>
</listitem>
</itemizedlist>
</para>
</simplesect>
</section>
</simplesect>
</section>
<xi:include href="../common/section_customize_flavors.xml"></xi:include>
<section xml:id="instance-creation">
<?dbhtml stop-chunking?>
<title>Creating instances</title>
Expand Down

0 comments on commit ccc2c8e

Please sign in to comment.