Documentation for over subscription

Over subscription in thin provisioning was added in Cinder in Kilo.
This patch added documentation for it.

Change-Id: Idbe0602f306a6c21d5544a5af1ffda646f5aa813
This commit is contained in:
Xing Yang 2015-04-22 02:07:17 -04:00 committed by Christian Berendt
parent 9c23d0279e
commit ac490fc9b1
2 changed files with 106 additions and 0 deletions

View File

@ -0,0 +1,105 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE section [
<!ENTITY % openstack SYSTEM "../../common/entities/openstack.ent">
%openstack;
]>
<section 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"
xml:id="over_subscription">
<title>Oversubscription in thin provisioning</title>
<para>OpenStack Block Storage enables you to choose a volume back
end based on virtual capacities for thin provisioning using the
oversubscription ratio.
</para>
<para>A reference implementation is provided for the default LVM driver.
The illustration below uses the LVM driver as an example.
</para>
<simplesect><title>Configure oversubscription settings</title>
<para>To support oversubscription in thin provisioning, a flag
<option>max_over_subscription_ratio</option> is introduced into
<filename>cinder.conf</filename>. This is a float representation
of the oversubscription ratio when thin provisioning is involved.
Default ratio is 20.0, meaning provisioned capacity can be 20
times of the total physical capacity. A ratio of 10.5 means
provisioned capacity can be 10.5 times of the total physical
capacity. A ratio of 1.0 means provisioned capacity cannot exceed
the total physical capacity. A ratio lower than 1.0 is
ignored and the default value is used instead.
</para>
<note><para><option>max_over_subscription_ratio</option> can be
configured for each back end when multiple-storage back ends are
enabled. It is provided as a reference implementation and is used
by the LVM driver. However, it is not a requirement for a driver
to use this option from <filename>cinder.conf</filename>.
<option>max_over_subscription_ratio</option> is for configuring
a back end. For a driver that supports multiple pools per back
end, it can report this ratio for each pool. The LVM driver does
not support multiple pools.
</para></note>
<para>The existing <option>reserved_percentage</option> flag is used
to prevent over provisioning. This flag represents the percentage
of the back-end capacity that is reserved.</para>
<note><para>There is a change on how <option>reserved_percentage
</option> is used. It was measured against the free capacity in
the past. Now it is measured against the total capacity.
</para></note>
</simplesect>
<simplesect><title>Capabilities</title>
<para>Drivers can report the following capabilities for a back end or
a pool:
</para>
<programlisting language="ini">thin_provisioning_support=True(or False)
thick_provisioning_support=True(or False)
provisioned_capacity_gb=<replaceable>PROVISIONED_CAPACITY</replaceable>
max_over_subscription_ratio=<replaceable>MAX_RATIO</replaceable></programlisting>
<para>Where <replaceable>PROVISIONED_CAPACITY</replaceable> is the
apparent allocated space indicating how much capacity has been
provisioned and <replaceable>MAX_RATIO</replaceable> is the
maximum oversubscription ratio. For the LVM driver, it is
<option>max_over_subscription_ratio</option> in <filename>
cinder.conf</filename>.
</para>
<para>Two capabilities are added here to allow a back end or pool to
claim support for thin provisioning, or thick provisioning,
or both.
</para>
<para>The LVM driver reports <option>thin_provisioning_support=True
</option> and <option>thick_provisioning_support=False</option>
if the <option>lvm_type</option> flag in <filename>cinder.conf
</filename> is <literal>thin</literal>. Otherwise it reports
<option>thin_provisioning_support=False</option> and <option>
thick_provisioning_support=True</option>.
</para>
</simplesect>
<simplesect><title>Volume type extra specs</title>
<para>If volume type is provided as part of the volume creation
request, it can have the following extra specs defined:</para>
<programlisting language="ini">'capabilities:thin_provisioning_support': '&lt;is&gt; True' or '&lt;is&gt; False'
'capabilities:thick_provisioning_support': '&lt;is&gt; True' or '&lt;is&gt; False'</programlisting>
<note><para><literal>capabilities</literal> scope key before
<literal>thin_provisioning_support</literal> and <literal>
thick_provisioning_support</literal> is not required. So the
following works too:</para></note>
<programlisting language="ini">'thin_provisioning_support': '&lt;is&gt; True' or '&lt;is&gt; False'
'thick_provisioning_support': '&lt;is&gt; True' or '&lt;is&gt; False'</programlisting>
<para>The above extra specs are used by the scheduler to find a back
end that supports thin provisioning, thick provisioning, or both to
match the needs of a specific volume type.
</para>
</simplesect>
<simplesect><title>Capacity filter</title>
<para>In the capacity filter, <literal>max_over_subscription_ratio
</literal> is used when choosing a back end if <literal>
thin_provisioning_support</literal> is True and <option>
max_over_subscription_ratio</option> is greater than 1.0.
</para>
</simplesect>
<simplesect><title>Capacity weigher</title>
<para>In the capacity weigher, virtual free capacity is used for
ranking if <literal>thin_provisioning_support</literal> is True.
Otherwise, real free capacity will be used as before.
</para>
</simplesect>
</section>

View File

@ -152,6 +152,7 @@
<xi:include href="blockstorage/section_consistency_groups.xml"/>
<xi:include href="blockstorage/section_driver_filter_weighing.xml"/>
<xi:include href="blockstorage/section_ratelimit-volume-copy-bandwidth.xml"/>
<xi:include href="blockstorage/section_over_subscription.xml"/>
</section>
<section xml:id="troubleshooting-cinder-install">
<title>Troubleshoot your installation</title>