<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>OpenStack Archives - OVHcloud Blog</title>
	<atom:link href="https://blog.ovhcloud.com/tag/openstack/feed/" rel="self" type="application/rss+xml" />
	<link>https://blog.ovhcloud.com/tag/openstack/</link>
	<description>Innovation for Freedom</description>
	<lastBuildDate>Mon, 03 Jul 2023 07:58:37 +0000</lastBuildDate>
	<language>en-GB</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://blog.ovhcloud.com/wp-content/uploads/2019/07/cropped-cropped-nouveau-logo-ovh-rebranding-32x32.gif</url>
	<title>OpenStack Archives - OVHcloud Blog</title>
	<link>https://blog.ovhcloud.com/tag/openstack/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>New  services in General Availability for managing your network and traffic  in Public Cloud: Load Balancer, Gateway, and Floating IPs</title>
		<link>https://blog.ovhcloud.com/new-services-in-general-availability-for-managing-your-network-and-traffic-in-public-cloud-load-balancer-gateway-and-floating-ips/</link>
		
		<dc:creator><![CDATA[Andry Ramiandrasoa]]></dc:creator>
		<pubDate>Thu, 03 Nov 2022 19:17:00 +0000</pubDate>
				<category><![CDATA[OVHcloud Product News]]></category>
		<category><![CDATA[OpenStack]]></category>
		<category><![CDATA[Public Cloud]]></category>
		<guid isPermaLink="false">https://blog.ovhcloud.com/?p=23706</guid>

					<description><![CDATA[The need for managed services so you can focus on your core business Our customers have been able to build, deploy and run their applications in the cloud by leveraging our Public Cloud, a coherent and integrated ecosystem of infrastructure and managed services. As our customers&#8217; cloud applications evolve, the need for ready-to-use, managed services [&#8230;]<img src="//blog.ovhcloud.com/wp-content/plugins/matomo/app/matomo.php?idsite=1&amp;rec=1&amp;url=https%3A%2F%2Fblog.ovhcloud.com%2Fnew-services-in-general-availability-for-managing-your-network-and-traffic-in-public-cloud-load-balancer-gateway-and-floating-ips%2F&amp;action_name=New%20%20services%20in%20General%20Availability%20for%20managing%20your%20network%20and%20traffic%20%20in%20Public%20Cloud%3A%20Load%20Balancer%2C%20Gateway%2C%20and%20Floating%20IPs&amp;urlref=https%3A%2F%2Fblog.ovhcloud.com%2Ffeed%2F" style="border:0;width:0;height:0" width="0" height="0" alt="" />]]></description>
										<content:encoded><![CDATA[
<h2 class="wp-block-heading" id="AnnouncingGAforNetworkservicesforPublicCloud-Theneedformanagedservicestofocusoncorebusiness">The need for managed services so you can focus on your core business</h2>



<p>Our customers have been able to build, deploy and run their applications in the cloud by leveraging our Public Cloud, a coherent and integrated ecosystem of infrastructure and managed services. As our customers&#8217; cloud applications evolve, the need for ready-to-use, managed services has become more prevalent, as it enables them to focus on adding more capabilities to their apps. While customers have outsourced to cloud providers the responsibility of managing foundational infrastructure services, they are looking for services that make it easier for them to concentrate on their business logic and network services are no exception to this trend. In this post, we&#8217;ll highlight the new services we are building to meet the needs of these types of customers.</p>



<h3 class="wp-block-heading" id="AnnouncingGAforNetworkservicesforPublicCloud-Networkmanagedservices">Network managed services</h3>



<p>Though the network is thought of as an infrastructure component, it is interesting to differentiate the raw capability of providing network connectivity from the network-related services like routing, load-balancing, and traffic management. In the past, it was possible to add these capabilities on your own using compute instances and deploying software on top of the components that perform the aforementioned network-related services. The main benefit of the services discussed in this post is that customers no longer need to implement and maintain such services, as we now provide them.</p>



<h3 class="wp-block-heading" id="AnnouncingGAforNetworkservicesforPublicCloud-LoadBalancer">Load Balancer</h3>



<p>While our Kubernetes customers have been able to use our Load Balancer, integrated with our Managed Kubernetes, we now provide a network and application-level load balancer compatible with our Public Cloud Openstack deployment. This load balancer is built upon the OpenStack Foundation&#8217;s Octavia project and can be managed through Openstack tools (API, CLI, or Horizon). This is a great fit for users that are familiar with the OpenStack environment and are looking for an infra-as-a-code approach. Load Balancer is available in a variety of sizes to accommodate different usage and performance levels and provides typical cloud features: dynamic public or private environments, high availability, and an interface to cloud-native platforms. Check out all the details on our product page: <a href="https://www.ovhcloud.com/en-ie/public-cloud/load-balancer/" data-wpel-link="external" target="_blank" rel="nofollow external noopener noreferrer">https://www.ovhcloud.com/en-ie/public-cloud/load-balancer/</a>.</p>



<h3 class="wp-block-heading" id="AnnouncingGAforNetworkservicesforPublicCloud-Gateway">Gateway</h3>



<p>Enabling to connect networks, Gateway brings more flexibility to manage resource access through the network. A typical Gateway use case is to split your architecture on multiple networks and configure routes on demand. Gateway can also be an internet gateway, with instances using private ports to remain isolated from the public. In addition to classic private network management tools, Gateway brings more granular management to your networks. More details here: <a href="https://www.ovhcloud.com/en-ie/public-cloud/gateway/" data-wpel-link="external" target="_blank" rel="nofollow external noopener noreferrer">https://www.ovhcloud.com/en-ie/public-cloud/gateway/</a></p>



<h3 class="wp-block-heading" id="AnnouncingGAforNetworkservicesforPublicCloud-FloatingIPs">Floating IPs</h3>



<p>Floating IPs are public IPs that can move from one instance to another and are handled by Gateway to forward traffic to the assigned public IP. There are several situations where floating IPs are useful:</p>



<p># You can define a floating IP for your application in advance, without having to create an instance to get a public IP. This can help you manage DNS records.<br># You can link your floating IP to instances reachable through your virtual router, allowing you to enable internet ingress traffic on-demand.<br># You can switch the link from one instance to another at any time, which can help you manage outage situations, or simply schedule maintenance actions (running rolling upgrades on multiple nodes, for example). Find out more about the product here: <a href="https://www.ovhcloud.com/en-ie/public-cloud/floating-ip/" data-wpel-link="external" target="_blank" rel="nofollow external noopener noreferrer">https://www.ovhcloud.com/en-ie/public-cloud/floating-ip/</a>.</p>



<h2 class="wp-block-heading" id="AnnouncingGAforNetworkservicesforPublicCloud-What'sinforme?">What&#8217;s in for me?</h2>



<p>Here, we&#8217;ll take some concrete examples so that you can better understand what each service can do for you. Floating IP, Gateway, and Load Balancer can be deployed together to create the appropriate rules for network accessibility while providing the required security. The following scenarios highlight the key benefits of each service used in combination.</p>



<h2 class="wp-block-heading" id="AnnouncingGAforNetworkservicesforPublicCloud-FloatingIPscenarios">Floating IP scenarios</h2>



<figure class="wp-block-image size-large"><img fetchpriority="high" decoding="async" width="1024" height="611" src="https://blog.ovhcloud.com/wp-content/uploads/2022/10/Floating-IPs-1024x611.png" alt="" class="wp-image-23713" srcset="https://blog.ovhcloud.com/wp-content/uploads/2022/10/Floating-IPs-1024x611.png 1024w, https://blog.ovhcloud.com/wp-content/uploads/2022/10/Floating-IPs-300x179.png 300w, https://blog.ovhcloud.com/wp-content/uploads/2022/10/Floating-IPs-768x458.png 768w, https://blog.ovhcloud.com/wp-content/uploads/2022/10/Floating-IPs.png 1093w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption><strong>Exposing a service on an instance<br></strong>The Floating IP, with the blue line, labeled A, shows a service running on an instance within a private network. This service can be reached from the public internet, only through the Floating IP. This enables you to update or replace the instance, transparently as the Floating IP remains the same. For outgoing traffic to the public internet, the service can leverage Gateway. The typical use case is when the service needs to download a new update.<br><br><strong>Exposing services behind Load Balancer<br></strong>The Floating IP with the green line, labeled B, shows the Load Balancer can be reached through the Floating IP and distribute incoming traffic to several instances. The instances behind the Load Balancer do not have a public IP, which ensures they remain completely private and not directly accessible from the outside. The Load Balancer brings higher security supporting SSL encryption and can be updated transparently as the Floating IP is hosted at the Gateway level.</figcaption></figure>



<h2 class="wp-block-heading" id="AnnouncingGAforNetworkservicesforPublicCloud-Gatewayscenarios">Gateway scenarios</h2>



<figure class="wp-block-image size-large"><img decoding="async" width="1024" height="598" src="https://blog.ovhcloud.com/wp-content/uploads/2022/10/Load-balancers-1024x598.png" alt="" class="wp-image-23714" srcset="https://blog.ovhcloud.com/wp-content/uploads/2022/10/Load-balancers-1024x598.png 1024w, https://blog.ovhcloud.com/wp-content/uploads/2022/10/Load-balancers-300x175.png 300w, https://blog.ovhcloud.com/wp-content/uploads/2022/10/Load-balancers-768x449.png 768w, https://blog.ovhcloud.com/wp-content/uploads/2022/10/Load-balancers.png 1106w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption><strong>Enable internet access to private instances</strong><br>Instances running within a private network can leverage the Gateway to send traffic to the public internet, while not being accessible from the outside. This enables you to update software running on your private instances while making sure only services within the private network can connect to your private instances.<br><br><strong>Exposing a service on an instance</strong><br>A service running on an instance within a private network can only be reached from the public internet through the Floating IP. This enables you to update or replace the instance, transparently as the Floating IP remains the same. For outgoing traffic to the public internet, the service can leverage the Gateway. A typical use case is when the service needs to download an update.<br><br><strong>Exposing services behind Load Balancer<br></strong>This is the same scenario as highlighted in the Floating IPs section but from a Gateway perspective. Here the added value is the ability to route incoming traffic within the private network.</figcaption></figure>



<h2 class="wp-block-heading" id="AnnouncingGAforNetworkservicesforPublicCloud-LoadBalancerscenario">Load Balancer scenario</h2>



<figure class="wp-block-image size-large"><img decoding="async" width="1024" height="394" src="https://blog.ovhcloud.com/wp-content/uploads/2022/10/Gateway-1-1024x394.png" alt="" class="wp-image-23717" srcset="https://blog.ovhcloud.com/wp-content/uploads/2022/10/Gateway-1-1024x394.png 1024w, https://blog.ovhcloud.com/wp-content/uploads/2022/10/Gateway-1-300x115.png 300w, https://blog.ovhcloud.com/wp-content/uploads/2022/10/Gateway-1-768x296.png 768w, https://blog.ovhcloud.com/wp-content/uploads/2022/10/Gateway-1.png 1190w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption><strong>Exposing services behind Load Balancer<br></strong>This is the same scenario highlighted in the Floating IPs and Gateway section. Here the role of the Load Balancer is to distribute traffic to the private instances.</figcaption></figure>



<h2 class="wp-block-heading" id="AnnouncingGAforNetworkservicesforPublicCloud-Nextsteps">Next steps</h2>



<p>A big congrats to our teams that made the release of our Load Balancer, Gateway, and Floating IPs services available to our customers! At launch our network services, are available in the following Public Cloud locations: GRA9, GRA5, GRA7, SBG5, SBG7, UK1, DE1, WAW1, BHS5, SYD1, SGP1.&nbsp;After the launch, keep track as additional locations are rolled out&nbsp;<a href="https://www.ovhcloud.com/en-gb/public-cloud/regions-availability/" data-wpel-link="external" target="_blank" rel="nofollow external noopener noreferrer">here</a>.</p>



<p>For new customers to our Public Cloud, you can take advantage of a free trial and test these new services along with our full catalog. We are always looking for feedback, feel free to reach out on our Discord channels. Last but not least, check out our <a href="https://github.com/ovh/public-cloud-roadmap/projects/3" data-wpel-link="external" target="_blank" rel="nofollow external noopener noreferrer">publicly available roadmap on Github</a> and propose new features and interact with our Product Managers.</p>
<img loading="lazy" decoding="async" src="//blog.ovhcloud.com/wp-content/plugins/matomo/app/matomo.php?idsite=1&amp;rec=1&amp;url=https%3A%2F%2Fblog.ovhcloud.com%2Fnew-services-in-general-availability-for-managing-your-network-and-traffic-in-public-cloud-load-balancer-gateway-and-floating-ips%2F&amp;action_name=New%20%20services%20in%20General%20Availability%20for%20managing%20your%20network%20and%20traffic%20%20in%20Public%20Cloud%3A%20Load%20Balancer%2C%20Gateway%2C%20and%20Floating%20IPs&amp;urlref=https%3A%2F%2Fblog.ovhcloud.com%2Ffeed%2F" style="border:0;width:0;height:0" width="0" height="0" alt="" />]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Create and use OpenStack snapshots</title>
		<link>https://blog.ovhcloud.com/create-and-use-openstack-snapshots/</link>
		
		<dc:creator><![CDATA[Pierre Gaxatte]]></dc:creator>
		<pubDate>Fri, 07 Feb 2020 12:41:00 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[OpenStack]]></category>
		<category><![CDATA[Public Cloud]]></category>
		<guid isPermaLink="false">https://blog.ovh.com/fr/blog/?p=15280</guid>

					<description><![CDATA[What is a snapshot in OpenStack/OVHcloud Public Cloud? A snapshot is a mechanism that allows you to create a new image from a running instance. This mainly serves two purposes: As a backup mechanism: save the main disk of your instance to an image and later boot a new instance from this image with the [&#8230;]<img src="//blog.ovhcloud.com/wp-content/plugins/matomo/app/matomo.php?idsite=1&amp;rec=1&amp;url=https%3A%2F%2Fblog.ovhcloud.com%2Fcreate-and-use-openstack-snapshots%2F&amp;action_name=Create%20and%20use%20OpenStack%20snapshots&amp;urlref=https%3A%2F%2Fblog.ovhcloud.com%2Ffeed%2F" style="border:0;width:0;height:0" width="0" height="0" alt="" />]]></description>
										<content:encoded><![CDATA[
<h3 class="wp-block-heading">What is a snapshot in OpenStack/OVHcloud Public Cloud?</h3>



<p>A snapshot is a mechanism that allows you to create a new image from a running instance. This mainly serves two purposes:</p>



<ol class="wp-block-list"><li>As a backup mechanism: save the main disk of your instance to an image and later boot a new instance from this image with the saved data.</li><li>As a templating mechanism: customise a base image and save it to use as a template for new instances.</li></ol>



<div class="wp-block-image"><figure class="aligncenter size-large"><img loading="lazy" decoding="async" width="1024" height="537" src="https://www.ovh.com/blog/wp-content/uploads/2020/02/FB8B2791-5512-47AA-8431-39BCBCC95230-1024x537.jpeg" alt="" class="wp-image-16993" srcset="https://blog.ovhcloud.com/wp-content/uploads/2020/02/FB8B2791-5512-47AA-8431-39BCBCC95230-1024x537.jpeg 1024w, https://blog.ovhcloud.com/wp-content/uploads/2020/02/FB8B2791-5512-47AA-8431-39BCBCC95230-300x157.jpeg 300w, https://blog.ovhcloud.com/wp-content/uploads/2020/02/FB8B2791-5512-47AA-8431-39BCBCC95230-768x403.jpeg 768w, https://blog.ovhcloud.com/wp-content/uploads/2020/02/FB8B2791-5512-47AA-8431-39BCBCC95230.jpeg 1199w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure></div>



<p>Snapshots can be taken of instances while they are either running or stopped. In simple terms, snapshots are images with the following additional properties:</p>



<figure class="wp-block-table confluenceTable wrapped"><table class=""><thead><tr><th>Name</th><th>Value</th></tr></thead><tbody><tr><td><code class="literal">image_type</code></td><td>snapshot</td></tr><tr><td><code class="literal">instance_uuid</code></td><td>&lt;uuid of instance that was used for the snapshot&gt;</td></tr><tr><td><code class="literal">base_image_ref</code></td><td>&lt;uuid of original image of instance that was used for snapshot&gt;</td></tr><tr><td><code class="literal">image_location</code></td><td>snapshot</td></tr></tbody></table></figure>



<h3 class="wp-block-heading">How to create a snapshot</h3>



<h3 class="wp-block-heading">Using the CLI</h3>



<p>To create a snapshot of an instance using the CLI, use the following command:</p>



<pre class="wp-block-code"><code class=""># Load your OpenStack credentials
$ source openrc

# Using the openstack client
$ openstack server image create --name &lt;name of the new image> &lt;instance name or uuid>

# Or using the nova client (deprecated)
$ nova image-create &lt;instance name or uuid> &lt;name of the new image></code></pre>



<h3 class="wp-block-heading">Using Horizon</h3>



<p>Once you&#8217;re logged in to <a rel="nofollow external noopener noreferrer" href="https://horizon.cloud.ovh.net/" data-wpel-link="external" target="_blank">Horizon</a>, you can create a snapshot via the <a rel="nofollow external noopener noreferrer" href="https://horizon.cloud.ovh.net/project/instances/" data-wpel-link="external" target="_blank">Compute → Instances</a> page by clicking on the &#8220;Create snapshot&#8221; action.</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="289" src="https://www.ovh.com/blog/wp-content/uploads/2019/12/instances-1280x361-1024x289.png" alt="" class="wp-image-16573" srcset="https://blog.ovhcloud.com/wp-content/uploads/2019/12/instances-1280x361-1024x289.png 1024w, https://blog.ovhcloud.com/wp-content/uploads/2019/12/instances-1280x361-300x85.png 300w, https://blog.ovhcloud.com/wp-content/uploads/2019/12/instances-1280x361-768x217.png 768w, https://blog.ovhcloud.com/wp-content/uploads/2019/12/instances-1280x361.png 1280w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>The snapshot&#8217;s status and information about it can be found on the <a rel="nofollow external noopener noreferrer" href="https://horizon.cloud.ovh.net/project/images" data-wpel-link="external" target="_blank">Compute → Images</a> page.</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="248" src="https://www.ovh.com/blog/wp-content/uploads/2019/12/2019-03-18-102330_1662x402_scrot-1280x310-1024x248.png" alt="" class="wp-image-16574" srcset="https://blog.ovhcloud.com/wp-content/uploads/2019/12/2019-03-18-102330_1662x402_scrot-1280x310-1024x248.png 1024w, https://blog.ovhcloud.com/wp-content/uploads/2019/12/2019-03-18-102330_1662x402_scrot-1280x310-300x73.png 300w, https://blog.ovhcloud.com/wp-content/uploads/2019/12/2019-03-18-102330_1662x402_scrot-1280x310-768x186.png 768w, https://blog.ovhcloud.com/wp-content/uploads/2019/12/2019-03-18-102330_1662x402_scrot-1280x310.png 1280w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>You can then select the snapshot when creating a new instance.</p>



<h2 class="title wp-block-heading">Live snapshots and data consistency</h2>



<p>We call a snapshot taken against a running instance with no downtime a &#8220;live snapshot&#8221;.</p>



<p>These snapshots are simply disk-only snapshots, and <em>may be inconsistent if the instance&#8217;s OS is not aware of the snapshot being taken</em>.</p>



<p>This phenomenon occurs when a hypervisor freezes the instance to allow the creation of a &#8220;delta&#8221; file before resuming the execution of the instance. This is done to prevent the instance writing directly to its disk while it is copied. When the copy is done, the instance is frozen again to allow the &#8220;delta&#8221; to be merged with the instance&#8217;s disk, and the execution is then resumed with the disk fully merged.</p>



<p>Inconsistencies can appear on the first freeze if the instance is not aware that the hypervisor is taking a snapshot, because the applications and the kernel running on the instance are not told to flush their buffers.</p>



<h3 class="wp-block-heading">Ensuring snapshots are consistent</h3>



<p>OpenStack Nova relies on QEMU to manage the virtual machines. QEMU also provides tools to communicate with an agent installed on the instance, in order to allow it to take certain actions before a snapshot.</p>



<p>This communication takes place via a virtual device added to the instance when OpenStack Nova detects that the image used has the following property: <code>hw_qemu_guest_agent set to yes.</code></p>



<p>On a previously created private image, you can set the properties using this command:</p>



<pre class="wp-block-code"><code class=""># Using the openstack client
$ openstack image set --property hw_qemu_guest_agent=yes &lt;image name or uuid>

# Or using the glance client (deprecated)
$ glance image-update --property hw_qemu_guest_agent=yes &lt;image name or uuid></code></pre>



<p>To check the properties are indeed set, use the following command:</p>



<pre class="wp-block-code"><code class="">$ openstack image show -f value -c properties &lt;image name or uuid></code></pre>



<p>The following diagram shows the workflow of a snapshot under these conditions:</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="838" src="https://www.ovh.com/blog/wp-content/uploads/2020/02/1AFD8AED-20D0-4ECE-8894-3EEA72649D0D-1024x838.jpeg" alt="" class="wp-image-16995" srcset="https://blog.ovhcloud.com/wp-content/uploads/2020/02/1AFD8AED-20D0-4ECE-8894-3EEA72649D0D-1024x838.jpeg 1024w, https://blog.ovhcloud.com/wp-content/uploads/2020/02/1AFD8AED-20D0-4ECE-8894-3EEA72649D0D-300x245.jpeg 300w, https://blog.ovhcloud.com/wp-content/uploads/2020/02/1AFD8AED-20D0-4ECE-8894-3EEA72649D0D-768x628.jpeg 768w, https://blog.ovhcloud.com/wp-content/uploads/2020/02/1AFD8AED-20D0-4ECE-8894-3EEA72649D0D.jpeg 1392w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>The specific step that prevents any inconsistencies is <em>#6: QEMU-agent freezes the file filesystem</em>.</p>



<h3 class="wp-block-heading">Configuring the QEMU agent</h3>



<h4 class="wp-block-heading">Linux</h4>



<p>The qemu-guest-agent is not installed by default, but once it is installed and started, the filesystem freeze/thaw mechanism will work straight out of the box.</p>



<p>You can check that your instance is set up for communication with the hypervisor by checking the specific device:</p>



<pre class="wp-block-code"><code class="">$ file /dev/virtio-ports/org.qemu.guest_agent.0
/dev/virtio-ports/org.qemu.guest_agent.0: symbolic link to `../vport2p1'</code></pre>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow"><p><strong>If this file is not present, the qemu guest agent will not work, which means your image does not have the  <code>hw_qemu_guest_agent</code> property set to <code>yes</code>.</strong></p></blockquote>



<h5 class="wp-block-heading">Debian-based distributions (Debian, Ubuntu)</h5>



<pre class="wp-block-code"><code class=""># Install the agent
user@agent:~$ sudo apt-get update
user@agent:~$ sudo apt-get install qemu-guest-agent

# Check the agent is started (it should be automatically started and enabled)
user@agent:~$ sudo service qemu-guest-agent status</code></pre>



<h5 class="wp-block-heading">Redhat-based distributions (Centos, Fedora)</h5>



<pre class="wp-block-code"><code class=""># Install the agent
user@agent:~$ sudo yum install qemu-guest-agent

# Enable the agent
user@agent:~$ sudo chkconfig qemu-guest-agent on

# Start the agent
user@agent:~$ sudo service qemu-guest-agent start

# Check the agent is started
user@agent:~$ sudo service qemu-guest-agent status</code></pre>



<h4 class="wp-block-heading">Windows</h4>



<p>Download and install the MSI related to your architecture (32 or 64 bit versions, although we recommend 64 bits for Public Cloud) from the Fedora project: <a rel="nofollow external noopener noreferrer" href="https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/latest-qemu-ga/" data-wpel-link="external" target="_blank">https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/latest-qemu-ga/</a></p>



<p>You can check the service is running by using this powershell command:</p>



<pre class="wp-block-code"><code class="">PS C:\Users\Administrator> Get-Service QEMU-GA

Status   Name               DisplayName
------   ----               -----------
Running  QEMU-GA            QEMU Guest Agent</code></pre>



<p>The Fedora documentation on creating Windows images with virtIO drivers can be found here.&nbsp;<em><a rel="nofollow external noopener noreferrer" href="https://docs.fedoraproject.org/en-US/quick-docs/creating-windows-virtual-machines-using-virtio-drivers/index.html" data-wpel-link="external" target="_blank">[2]</a></em></p>



<h3 class="wp-block-heading">Advanced usage: QEMU agent hooks</h3>



<p>It is possible to add scripts that will run before the filesystem is frozen by the agent and after it is thawed.</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow"><p><strong>The example below is done on Debian 9, so the configuration might need to be adjusted for a different distributions.</strong></p><p><strong>Also, some distributions already provide the fsfreeze-hook.</strong></p></blockquote>



<h4 class="wp-block-heading">Add the fsfreeze-hook script</h4>



<p>First, we need to add and activate the fsfreeze-hook mechanism:</p>



<pre class="wp-block-code"><code class=""># Create the folders to receive the hooks
debian@agent:~$ sudo mkdir -p /etc/qemu/fsfreeze-hook.d

# Download the fsfreeze-hook from the QEMU repository
debian@agent:~$ sudo wget -O /etc/qemu/fsfreeze-hook https://raw.githubusercontent.com/qemu/qemu/master/scripts/qemu-guest-agent/fsfreeze-hook
debian@agent:~$ sudo chmod +x /etc/qemu/fsfreeze-hook

# Add the configuration of the qemu-guest-agent daemon to use this script
debian@agent:~$ sudo tee /etc/default/qemu-guest-agent > /dev/null &lt;&lt;EOF
DAEMON_ARGS="-F/etc/qemu/fsfreeze-hook"
EOF

# Restart the service to take the modifications into account
debian@agent:~$ sudo service qemu-guest-agent restart</code></pre>



<h4 class="wp-block-heading">Example hook script</h4>



<p>The <code>/etc/qemu/fsfreeze-hook</code> script allows users to add custom scripts, to be run before and after the filesystem freeze.</p>



<p>Let&#8217;s add a test that writes in a file when the instance is being frozen and thawed:</p>



<pre class="wp-block-code"><code class="">debian@agent:~$ sudo tee /etc/qemu/fsfreeze-hook.d/test_hook.sh > /dev/null &lt;&lt;EOF
#!/bin/bash

case \$1 in
 freeze)
   echo "I'm frozen" > /tmp/freeze
   ;;
 thaw)
   echo "I'm thawed" >> /tmp/freeze
   ;;
 *)
   exit 1
   ;;
esac
EOF

debian@agent:~$ sudo chmod +x /etc/qemu/fsfreeze-hook.d/test_hook.sh</code></pre>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow"><p><strong>Be very careful with custom hook scripts</strong>. If one fails, the snapshot will be totally abandoned and destroyed. If you cannot find the image that was supposed to be created with the snapshot, it is probably because one of the scripts has failed. In this case, check the instance&#8217;s qemu-agent log.</p></blockquote>



<p>Take a snapshot of your instance:</p>



<pre class="wp-block-code"><code class="">$ openstack server image create --name test_snapshot &lt;instance name or uuid></code></pre>



<p>Check the test hook has been run:</p>



<pre class="wp-block-code"><code class=""># It works!
debian@agent:~$ sudo cat /tmp/freeze
I'm frozen
I'm thawed</code></pre>



<p>Clean the test:</p>



<pre class="wp-block-code"><code class="">debian@agent:~$ sudo rm /etc/qemu/fsfreeze-hook.d/test_hook.sh /tmp/freeze</code></pre>



<h3 class="wp-block-heading">Why isn&#8217;t this enabled by default?</h3>



<p><span style="color: #000000; text-decoration: none;">The qemu-guest-agent is not installed by default on most distributions. So why don&#8217;t we add it by default on the base images we provide?<br></span></p>



<p><span style="color: #000000; text-decoration: none;">The problem is that we are not legally allowed to change the content of the base images provided by Ubuntu, so for the sake of uniformity, we don&#8217;t install the package on any distribution.</span></p>



<p><span style="color: #000000; text-decoration: none;"><em>Sources:</em></span></p>



<ul class="wp-block-list"><li><span style="color: #000000; text-decoration: none;"><em>Sébastien Han&#8217;s &#8220;OpenStack: Perform Consistent Snapshots&#8221; blog entry <a rel="nofollow external noopener noreferrer" href="https://www.sebastien-han.fr/blog/2015/02/09/openstack-perform-consistent-snapshots-with-qemu-guest-agent/" data-wpel-link="external" target="_blank">[1]</a></em></span></li><li><span style="color: #000000; text-decoration: none;"><em>The proxmox wiki article on QEMU guest agent<a rel="nofollow external noopener noreferrer" href="https://pve.proxmox.com/wiki/Qemu-guest-agent" data-wpel-link="external" target="_blank"> [2]</a></em></span></li><li><em><span style="color: #000000; text-decoration: none;">The Fedora documentation on creating Windows images with virtIO drivers&nbsp;<a rel="nofollow external noopener noreferrer" href="https://docs.fedoraproject.org/en-US/quick-docs/creating-windows-virtual-machines-using-virtio-drivers/index.html" data-wpel-link="external" target="_blank">[3]</a></span></em><br><span style="color: #000000; text-decoration: none;"><br></span></li></ul>



<p></p>
<img loading="lazy" decoding="async" src="//blog.ovhcloud.com/wp-content/plugins/matomo/app/matomo.php?idsite=1&amp;rec=1&amp;url=https%3A%2F%2Fblog.ovhcloud.com%2Fcreate-and-use-openstack-snapshots%2F&amp;action_name=Create%20and%20use%20OpenStack%20snapshots&amp;urlref=https%3A%2F%2Fblog.ovhcloud.com%2Ffeed%2F" style="border:0;width:0;height:0" width="0" height="0" alt="" />]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Dealing with small files with OpenStack Swift (part 2)</title>
		<link>https://blog.ovhcloud.com/dealing-with-small-files-with-openstack-swift-part-2/</link>
		
		<dc:creator><![CDATA[Alexandre Lecuyer]]></dc:creator>
		<pubDate>Fri, 17 Jan 2020 09:16:09 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[OpenStack]]></category>
		<category><![CDATA[Storage]]></category>
		<category><![CDATA[Swift]]></category>
		<guid isPermaLink="false">https://www.ovh.com/blog/?p=16151</guid>

					<description><![CDATA[In the first part of these articles, we demonstrated how storing small files in Swift may cause performance issues. In this second part we will present the solution. With this in mind, I will assume that you have read the first part, or that you are familiar with Swift. Files inside files We settled on [&#8230;]<img src="//blog.ovhcloud.com/wp-content/plugins/matomo/app/matomo.php?idsite=1&amp;rec=1&amp;url=https%3A%2F%2Fblog.ovhcloud.com%2Fdealing-with-small-files-with-openstack-swift-part-2%2F&amp;action_name=Dealing%20with%20small%20files%20with%20OpenStack%20Swift%20%28part%202%29&amp;urlref=https%3A%2F%2Fblog.ovhcloud.com%2Ffeed%2F" style="border:0;width:0;height:0" width="0" height="0" alt="" />]]></description>
										<content:encoded><![CDATA[
<p>In the<a href="https://www.ovh.com/blog/dealing-with-small-files-with-openstack-swift-part-1/" data-wpel-link="exclude"> first part of these articles</a>, we demonstrated how storing small files in Swift may cause performance issues. In this second part we will present the solution. With this in mind, I will assume that you have read the first part, or that you are familiar with Swift.<br></p>



<div class="wp-block-image"><figure class="aligncenter size-large is-resized"><img loading="lazy" decoding="async" src="https://www.ovh.com/blog/wp-content/uploads/2019/10/E53A8B26-BDF1-43A9-9A64-5C38029C9929-1024x513.jpeg" alt="Swift at OVHcloud" class="wp-image-16063" width="512" height="257" srcset="https://blog.ovhcloud.com/wp-content/uploads/2019/10/E53A8B26-BDF1-43A9-9A64-5C38029C9929-1024x513.jpeg 1024w, https://blog.ovhcloud.com/wp-content/uploads/2019/10/E53A8B26-BDF1-43A9-9A64-5C38029C9929-300x150.jpeg 300w, https://blog.ovhcloud.com/wp-content/uploads/2019/10/E53A8B26-BDF1-43A9-9A64-5C38029C9929-768x385.jpeg 768w, https://blog.ovhcloud.com/wp-content/uploads/2019/10/E53A8B26-BDF1-43A9-9A64-5C38029C9929.jpeg 1199w" sizes="auto, (max-width: 512px) 100vw, 512px" /></figure></div>



<h3 class="wp-block-heading">Files inside files</h3>



<p>We settled on a simple approach: we would store all these small fragments in larger files. This means that inodes usage on the filesystem is much lower. <br></p>



<div class="wp-block-image"><figure class="aligncenter size-large is-resized"><img loading="lazy" decoding="async" src="https://www.ovh.com/blog/wp-content/uploads/2020/01/E65EF82E-7465-4791-AF4D-23E67D0DC1E6-1024x273.jpeg" alt="" class="wp-image-16757" width="512" height="137" srcset="https://blog.ovhcloud.com/wp-content/uploads/2020/01/E65EF82E-7465-4791-AF4D-23E67D0DC1E6-1024x273.jpeg 1024w, https://blog.ovhcloud.com/wp-content/uploads/2020/01/E65EF82E-7465-4791-AF4D-23E67D0DC1E6-300x80.jpeg 300w, https://blog.ovhcloud.com/wp-content/uploads/2020/01/E65EF82E-7465-4791-AF4D-23E67D0DC1E6-768x205.jpeg 768w, https://blog.ovhcloud.com/wp-content/uploads/2020/01/E65EF82E-7465-4791-AF4D-23E67D0DC1E6.jpeg 1220w" sizes="auto, (max-width: 512px) 100vw, 512px" /></figure></div>



<p>These large files, which we call “volumes”, have three important characteristics:</p>



<ul class="wp-block-list"><li>They are dedicated to a Swift partition</li><li>They are append only: never overwrite data</li><li>No concurrent writes: we may have multiple volumes per partition</li></ul>



<p>We need to keep track of the location of these fragments within a volume. For this we developed a new component: the index-server. This will store each fragment location: the volume it is stored in, and its offset within the volume. </p>



<div class="wp-block-image"><figure class="aligncenter size-large is-resized"><img loading="lazy" decoding="async" src="https://www.ovh.com/blog/wp-content/uploads/2020/01/4147A20D-7993-4079-903C-A07FC94BEA81.jpeg" alt="" class="wp-image-16759" width="398" height="293" srcset="https://blog.ovhcloud.com/wp-content/uploads/2020/01/4147A20D-7993-4079-903C-A07FC94BEA81.jpeg 795w, https://blog.ovhcloud.com/wp-content/uploads/2020/01/4147A20D-7993-4079-903C-A07FC94BEA81-300x221.jpeg 300w, https://blog.ovhcloud.com/wp-content/uploads/2020/01/4147A20D-7993-4079-903C-A07FC94BEA81-768x565.jpeg 768w" sizes="auto, (max-width: 398px) 100vw, 398px" /></figure></div>



<p>There is one index-server per disk drive. This means that its failure domain matches with the data it is indexing. It communicates with the existing object-server process through a local UNIX socket.</p>



<h4 class="wp-block-heading">Leveraging on LevelDB </h4>



<p>We chose LevelDB to store the fragment location in the index-server:</p>



<ul class="wp-block-list"><li>It sorts data on-disk, which means it is efficient on regular spinning disks</li><li>It is space efficient thanks to the Snappy compression library</li></ul>



<p>Our initial tests were promising: it showed that we need about 40 bytes to track a fragment, vs 300 bytes if we used the regular file-based storage backend. We only track the fragment location, while the filesystem stores a lot of information that we don&#8217;t need (user, group, permissions..) This means the key-value would be small enough to be cached in memory, and listing files would not require physical disk reads.</p>



<p>When writing an object, the regular swift backend would create a file to hold the data. With LOSF, it would instead:</p>



<ul class="wp-block-list"><li>Obtain a filesystem lock on a volume</li><li>Append the object data at the end of the volume, and call fdatasync()</li><li>Register the object location in the index-server (volume number, and offset within volume)</li></ul>



<p>To read back an object:</p>



<ul class="wp-block-list"><li>Query the index-server to get its location: volume number and offset</li><li>Open the volume and seek to the offset to serve the data</li></ul>



<p>However, we still have a couple of problems to solve!<br></p>



<h3 class="wp-block-heading">Deleting objects</h3>



<p>When a customer deletes an object, how can we actually delete data from the volumes? Remember that we only append data to a volume, so we can&#8217;t just mark space as unused within a volume, and try to reuse it later. We use XFS, and it offers an interesting solution: The ability to “punch a hole” in a file.<br></p>



<p>The logical size does not change, which means that fragments located after the hole do not change offset. The physical space, however, is released to the filesystem. This is a great solution, as it means we can keep appending to volumes, free space within a volume, and let the filesystem deal with space allocation.</p>



<div class="wp-block-image"><figure class="aligncenter size-large is-resized"><img loading="lazy" decoding="async" src="https://www.ovh.com/blog/wp-content/uploads/2020/01/643F85AA-C543-4F90-BD10-D6F34D41287F.jpeg" alt="" class="wp-image-16762" width="377" height="238" srcset="https://blog.ovhcloud.com/wp-content/uploads/2020/01/643F85AA-C543-4F90-BD10-D6F34D41287F.jpeg 754w, https://blog.ovhcloud.com/wp-content/uploads/2020/01/643F85AA-C543-4F90-BD10-D6F34D41287F-300x189.jpeg 300w" sizes="auto, (max-width: 377px) 100vw, 377px" /></figure></div>



<div class="wp-block-image"><figure class="aligncenter size-large is-resized"><img loading="lazy" decoding="async" src="https://www.ovh.com/blog/wp-content/uploads/2020/01/314F81C4-F129-48AE-93A0-B707D2C021CE.jpeg" alt="" class="wp-image-16763" width="375" height="359" srcset="https://blog.ovhcloud.com/wp-content/uploads/2020/01/314F81C4-F129-48AE-93A0-B707D2C021CE.jpeg 749w, https://blog.ovhcloud.com/wp-content/uploads/2020/01/314F81C4-F129-48AE-93A0-B707D2C021CE-300x288.jpeg 300w" sizes="auto, (max-width: 375px) 100vw, 375px" /></figure></div>



<h2 class="wp-block-heading">Directory structure</h2>



<p>The index-server will store object names in a flat namespace, but Swift relies on a directory hierarchy.</p>



<pre class="wp-block-code"><code class="">/mnt/objects/&lt;partition>/&lt;suffix>/&lt;checksum>/&lt;timestamp>.data</code></pre>



<p>The partition directory is the partition which the object belongs to, and the suffix directory is just the last three letters of the md5 checksum. (This was done to avoid having too many entries in a single directory)</p>



<p>If you have not used Swift before, the &#8220;partition index&#8221; of an object indicates which device in the cluster should store the object. The partition index is calculated by taking a few bits from the object&#8217;s path MD5. You can find out more <a href="https://docs.openstack.org/swift/latest/overview_ring.html" data-wpel-link="external" target="_blank" rel="nofollow external noopener noreferrer">here</a>.<br></p>



<p>We do not explicitely store these directories in the index-server, as they can be computed from the object-hash. Remember that the object names are stored in order by LevelDB.</p>



<figure class="wp-block-image is-resized"><img loading="lazy" decoding="async" src="https://docs.google.com/drawings/d/sXCQOPWYjWdZxRKyoCQCBMg/image?w=602&amp;h=292&amp;rev=263&amp;ac=1&amp;parent=1UwtIisZKQcstTlIOKYX6I17U7bH4mCtg6uIC7xcY2mM" alt="" width="809" height="392"/></figure>



<h3 class="wp-block-heading">Data migration</h3>



<p>This new approach changes the on-disk format. However we already had over 50 PB of data. Migrating offline was impossible. We wrote an intermediate, hybrid version of the system. It would always write new data using the new disk layout, but for reads, it would first look up in the index-server, and if the fragment wasn’t found, it would look up the fragment in the regular backend directory.</p>



<p>Meanwhile, a background tool would run to slowly to convert data from the old system to the new one. This took a few months to run over all machines.</p>



<h3 class="wp-block-heading">Results</h3>



<p>After the migration completed, the disk activity on the cluster was much lower: we observed that the index-server data would fit in memory, so listing objects in the cluster, or getting an object&#8217;s location would not require physical disk IO. The latency improved for both PUT and GET operations, and the cluster &#8220;reconstructor&#8221; tasks were able to progress much faster. (The reconstructor is the process that rebuilds data after a disk fails in the cluster)</p>



<h3 class="wp-block-heading">Future work</h3>



<p>In the context of object storage, hard drives still have a price advantage over solid state drives. Their capacity continues to grow, however the performance per drive has not improved. For the same usable space, if you switch from 6TB to 12TB drives, you&#8217;ve effectively halved your performance. </p>



<p>As we plan for the next generation of Swift clusters, we must find new ways to use these larger drives while ensuring performance is still good. This will probably mean using a mix of SSDs and spinning disks. Exciting work is happening in this area, as we will store more data on dedicated fast devices to further optimise Swift&#8217;s cluster response time.</p>
<img loading="lazy" decoding="async" src="//blog.ovhcloud.com/wp-content/plugins/matomo/app/matomo.php?idsite=1&amp;rec=1&amp;url=https%3A%2F%2Fblog.ovhcloud.com%2Fdealing-with-small-files-with-openstack-swift-part-2%2F&amp;action_name=Dealing%20with%20small%20files%20with%20OpenStack%20Swift%20%28part%202%29&amp;urlref=https%3A%2F%2Fblog.ovhcloud.com%2Ffeed%2F" style="border:0;width:0;height:0" width="0" height="0" alt="" />]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Dealing with small files with OpenStack Swift (part 1)</title>
		<link>https://blog.ovhcloud.com/dealing-with-small-files-with-openstack-swift-part-1/</link>
		
		<dc:creator><![CDATA[Alexandre Lecuyer]]></dc:creator>
		<pubDate>Fri, 04 Oct 2019 08:37:39 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[OpenStack]]></category>
		<category><![CDATA[Storage]]></category>
		<category><![CDATA[Swift]]></category>
		<guid isPermaLink="false">https://www.ovh.com/blog/?p=16037</guid>

					<description><![CDATA[OpenStack Swift is a distributed storage system that is easy to scale horizontally, using standard servers and disks. We are using it at OVHcloud for internal needs, and as a service for our customers. By design, it is rather easy to use, but you still need to think about your workload when designing a Swift [&#8230;]<img src="//blog.ovhcloud.com/wp-content/plugins/matomo/app/matomo.php?idsite=1&amp;rec=1&amp;url=https%3A%2F%2Fblog.ovhcloud.com%2Fdealing-with-small-files-with-openstack-swift-part-1%2F&amp;action_name=Dealing%20with%20small%20files%20with%20OpenStack%20Swift%20%28part%201%29&amp;urlref=https%3A%2F%2Fblog.ovhcloud.com%2Ffeed%2F" style="border:0;width:0;height:0" width="0" height="0" alt="" />]]></description>
										<content:encoded><![CDATA[
<p>OpenStack Swift is a distributed storage system that is easy to scale horizontally, using standard servers and disks.</p>



<p>We are using it at OVHcloud for internal needs, and as a service for our customers.<br></p>



<div class="wp-block-image"><figure class="aligncenter"><img loading="lazy" decoding="async" width="1024" height="513" src="https://www.ovh.com/blog/wp-content/uploads/2019/10/E53A8B26-BDF1-43A9-9A64-5C38029C9929-1024x513.jpeg" alt="Swift at OVHcloud" class="wp-image-16063" srcset="https://blog.ovhcloud.com/wp-content/uploads/2019/10/E53A8B26-BDF1-43A9-9A64-5C38029C9929-1024x513.jpeg 1024w, https://blog.ovhcloud.com/wp-content/uploads/2019/10/E53A8B26-BDF1-43A9-9A64-5C38029C9929-300x150.jpeg 300w, https://blog.ovhcloud.com/wp-content/uploads/2019/10/E53A8B26-BDF1-43A9-9A64-5C38029C9929-768x385.jpeg 768w, https://blog.ovhcloud.com/wp-content/uploads/2019/10/E53A8B26-BDF1-43A9-9A64-5C38029C9929.jpeg 1199w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure></div>



<p>By design, it is rather easy to use, but you still need to think about your workload when designing a Swift cluster. In this post I’ll explain how data is stored in a Swift cluster, and why small objects are a concern.<br></p>



<h3 class="wp-block-heading">How does Swift store files?</h3>



<p>The nodes responsible for storing data in a Swift cluster are the “object servers”. To select the object servers that will hold a specific object, Swift relies on <a href="https://en.wikipedia.org/wiki/Consistent_hashing" data-wpel-link="external" target="_blank" rel="nofollow external noopener noreferrer">consistent hashing</a>: </p>



<p></p>



<p>In practice, when an object is uploaded, a MD5 checksum will be computed, based on the object name. A number of bits will be extracted from that checksum, which will give us the “partition” number.&nbsp;<br></p>



<p>The partition number enables you to look at the “ring”, to see which server and disk should store that particular object. The “ring” is a mapping between a partition number, and the object servers that should store objects belonging to that partition.<br></p>



<p>Let’s take a look at an example. In this case we will use only 2 bits off the md5 checksum (far too low but much easier to draw! There are only 4 partitions)<br></p>



<figure class="wp-block-image"><img loading="lazy" decoding="async" width="1024" height="564" src="https://www.ovh.com/blog/wp-content/uploads/2019/10/00FE1332-E324-4E49-9E6E-0FA7E6C27E81-1024x564.jpeg" alt="" class="wp-image-16064" srcset="https://blog.ovhcloud.com/wp-content/uploads/2019/10/00FE1332-E324-4E49-9E6E-0FA7E6C27E81-1024x564.jpeg 1024w, https://blog.ovhcloud.com/wp-content/uploads/2019/10/00FE1332-E324-4E49-9E6E-0FA7E6C27E81-300x165.jpeg 300w, https://blog.ovhcloud.com/wp-content/uploads/2019/10/00FE1332-E324-4E49-9E6E-0FA7E6C27E81-768x423.jpeg 768w, https://blog.ovhcloud.com/wp-content/uploads/2019/10/00FE1332-E324-4E49-9E6E-0FA7E6C27E81.jpeg 1227w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p></p>



<p></p>



<p>When a file is uploaded, from its name and other elements, we get a md5 checksum, <code>72acded3acd45e4c8b6ed680854b8ab1</code>. If we take the 2 most significant bits, we get partition 1.&nbsp;</p>



<p>From the object ring, we get the list of servers that should store copies of the object.&nbsp;</p>



<p>With a recommended Swift setup, you would store three identical copies of the object. For a single upload, we create three actual files, on three different servers.<br></p>



<h3 class="wp-block-heading">Swift policies</h3>



<p>We’ve just seen how the most common Swift policy is to store identical copies of an object.<br></p>



<p>That may be a little costly for some use cases, and Swift also supports “erasure coding” policies.<br></p>



<p>Let’s compare them now.<br></p>



<p>The “replica policy” which we just described. You can choose how many copies of objects you want to store.</p>



<figure class="wp-block-image"><img loading="lazy" decoding="async" width="1024" height="885" src="https://www.ovh.com/blog/wp-content/uploads/2019/10/407D94D3-DCA9-4F2B-B34B-82FBD8D89186-1024x885.jpeg" alt="Replica in Swift" class="wp-image-16071" srcset="https://blog.ovhcloud.com/wp-content/uploads/2019/10/407D94D3-DCA9-4F2B-B34B-82FBD8D89186-1024x885.jpeg 1024w, https://blog.ovhcloud.com/wp-content/uploads/2019/10/407D94D3-DCA9-4F2B-B34B-82FBD8D89186-300x259.jpeg 300w, https://blog.ovhcloud.com/wp-content/uploads/2019/10/407D94D3-DCA9-4F2B-B34B-82FBD8D89186-768x664.jpeg 768w, https://blog.ovhcloud.com/wp-content/uploads/2019/10/407D94D3-DCA9-4F2B-B34B-82FBD8D89186.jpeg 1290w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>The “erasure coding” policy type</p>



<figure class="wp-block-image"><img loading="lazy" decoding="async" width="918" height="1024" src="https://www.ovh.com/blog/wp-content/uploads/2019/10/14C000A4-B7C0-4C80-B394-D9884C8765A6-918x1024.jpeg" alt="Erasure coding in Swift" class="wp-image-16072" srcset="https://blog.ovhcloud.com/wp-content/uploads/2019/10/14C000A4-B7C0-4C80-B394-D9884C8765A6-918x1024.jpeg 918w, https://blog.ovhcloud.com/wp-content/uploads/2019/10/14C000A4-B7C0-4C80-B394-D9884C8765A6-269x300.jpeg 269w, https://blog.ovhcloud.com/wp-content/uploads/2019/10/14C000A4-B7C0-4C80-B394-D9884C8765A6-768x856.jpeg 768w, https://blog.ovhcloud.com/wp-content/uploads/2019/10/14C000A4-B7C0-4C80-B394-D9884C8765A6.jpeg 1269w" sizes="auto, (max-width: 918px) 100vw, 918px" /></figure>



<p>The object is split into fragments, with added redundant pieces to enable object reconstruction, if a disk containing a fragment fails.</p>



<p>At OVHcloud, we use a 12+3 policies (12 pieces from the object and 3 computed pieces)<br></p>



<p>This mode is more space efficient than replication, but it also creates more files on the infrastructure. In our configuration, we would create 15 files on the infrastructure, vs 3 files with a standard “replication” policy.</p>



<h3 class="wp-block-heading">Why is this a problem?</h3>



<p>On clusters where we have a combination of both an erasure coding policy, and a median object size of 32k, we would end up with over 70 million files *per drive*.</p>



<p>On a server with 36 disks, that’s 2.5 billion files.<br></p>



<p>The Swift cluster needs to regularly list these files to:</p>



<ul class="wp-block-list"><li>Serve the object to customers</li><li>Detect bit rot</li><li>Reconstruct an object if a fragment has been lost because of a disk failure</li></ul>



<p>Usually, listing files on a hard drive is pretty quick, thank’s to Linux’s directory cache. However, on some clusters we noticed the time to list files was increasing, and a lot of the hard drive’s IO capacity was used to read directory contents: there were too many files, and the system was unable to cache the directory contents. Wasting a lot of IO for this meant that the cluster response time was getting slower, and reconstruction tasks (rebuilding fragments lost because of disk failures) were lagging.</p>



<p>In the next post we&#8217;ll see how we addressed this.</p>
<img loading="lazy" decoding="async" src="//blog.ovhcloud.com/wp-content/plugins/matomo/app/matomo.php?idsite=1&amp;rec=1&amp;url=https%3A%2F%2Fblog.ovhcloud.com%2Fdealing-with-small-files-with-openstack-swift-part-1%2F&amp;action_name=Dealing%20with%20small%20files%20with%20OpenStack%20Swift%20%28part%201%29&amp;urlref=https%3A%2F%2Fblog.ovhcloud.com%2Ffeed%2F" style="border:0;width:0;height:0" width="0" height="0" alt="" />]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Understanding CI/CD for Big Data and Machine Learning</title>
		<link>https://blog.ovhcloud.com/understanding-ci-cd-for-big-data-and-machine-learning/</link>
		
		<dc:creator><![CDATA[Yvonnick Esnault]]></dc:creator>
		<pubDate>Thu, 14 Feb 2019 12:28:36 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Automation]]></category>
		<category><![CDATA[Big Data]]></category>
		<category><![CDATA[CDS]]></category>
		<category><![CDATA[DataBuzzWord]]></category>
		<category><![CDATA[DevOps]]></category>
		<category><![CDATA[Docker]]></category>
		<category><![CDATA[Kubernetes]]></category>
		<category><![CDATA[Machine learning]]></category>
		<category><![CDATA[OpenStack]]></category>
		<category><![CDATA[Podcast]]></category>
		<guid isPermaLink="false">https://blog.ovh.com/fr/blog/?p=14588</guid>

					<description><![CDATA[This week, the OVH Integration and Continuous Deployment team was invited to the&#160;DataBuzzWord&#160;podcast. Together, we explored the topic of continuous deployment in the context of machine learning and big data.&#160;We also discussed continuous deployment for environments like&#160;Kubernetes, Docker, OpenStack and&#160;VMware VSphere. If you missed it, or would like to review everything that was discussed, you [&#8230;]<img src="//blog.ovhcloud.com/wp-content/plugins/matomo/app/matomo.php?idsite=1&amp;rec=1&amp;url=https%3A%2F%2Fblog.ovhcloud.com%2Funderstanding-ci-cd-for-big-data-and-machine-learning%2F&amp;action_name=Understanding%20CI%2FCD%20for%20Big%20Data%20and%20Machine%20Learning&amp;urlref=https%3A%2F%2Fblog.ovhcloud.com%2Ffeed%2F" style="border:0;width:0;height:0" width="0" height="0" alt="" />]]></description>
										<content:encoded><![CDATA[
<p>This week, the OVH Integration and Continuous Deployment team was invited to the&nbsp;<a href="https://www.spreaker.com/show/2072727" data-wpel-link="external" target="_blank" rel="nofollow external noopener noreferrer">DataBuzzWord</a>&nbsp;podcast.</p>



<div class="wp-block-image"><figure class="aligncenter"><img loading="lazy" decoding="async" width="297" height="300" src="/blog/wp-content/uploads/2019/02/CE25CF9F-9489-4B9D-B123-FE4FD613EF85-297x300.png" alt="CDS" class="wp-image-14512" srcset="https://blog.ovhcloud.com/wp-content/uploads/2019/02/CE25CF9F-9489-4B9D-B123-FE4FD613EF85-297x300.png 297w, https://blog.ovhcloud.com/wp-content/uploads/2019/02/CE25CF9F-9489-4B9D-B123-FE4FD613EF85-768x775.png 768w, https://blog.ovhcloud.com/wp-content/uploads/2019/02/CE25CF9F-9489-4B9D-B123-FE4FD613EF85.png 793w" sizes="auto, (max-width: 297px) 100vw, 297px" /></figure></div>



<p>Together, we explored the topic of continuous deployment in the context of machine learning and big data.&nbsp;We also discussed continuous deployment for environments like&nbsp;<a href="https://www.ovh.com/fr/blog/?s=kubernetes" data-wpel-link="exclude">Kubernetes</a>, Docker, OpenStack and&nbsp;<a href="https://www.ovh.com/fr/blog/?s=vmware" data-wpel-link="exclude">VMware VSphere</a>.</p>



<p>If you missed it, or would like to review everything that was discussed, you can&nbsp;<a href="https://www.spreaker.com/show/2072727" data-wpel-link="external" target="_blank" rel="nofollow external noopener noreferrer">listen to it again here</a>. We hope to return soon, to continue sharing our passion for testing, integration and continuous deployment.</p>



<p>Although the podcast was recorded in French, starting from tomorrow, we&#8217;ll be delving further into the key points of our discussion in a series of articles on this blog.</p>


<div class="lazyblock-youtube-gdpr-compliant-ZRXyrv wp-block-lazyblock-youtube-gdpr-compliant"><script type="module">
  import 'https://blog.ovhcloud.com/wp-content/assets/ovhcloud-gdrp-compliant-embedding-widgets/src/ovhcloud-gdrp-compliant-spreaker.js';
</script>
      
      <ovhcloud-gdrp-compliant-spreaker
          spreaker="17021384"
          debug></ovhcloud-gdrp-compliant-spreaker> 

</div>


<p>Find CDS on GitHub:</p>



<ul class="wp-block-list"><li><a href="https://github.com/ovh/cds" data-wpel-link="external" target="_blank" rel="nofollow external noopener noreferrer">https://github.com/ovh/cds</a></li></ul>



<p>&#8230;. and follow us on Twitter:</p>



<ul class="wp-block-list"><li><a href="https://twitter.com/yesnault" rel="nofollow external noopener noreferrer" data-wpel-link="external" target="_blank">https://twitter.com/yesnault</a></li><li><a href="https://twitter.com/francoissamin" rel="nofollow external noopener noreferrer" data-wpel-link="external" target="_blank">https://twitter.com/francoissamin</a></li></ul>



<p>Come chat about these subjects with us on our Gitter channel:&nbsp;<a href="https://gitter.im/ovh-cds/" data-wpel-link="external" target="_blank" rel="nofollow external noopener noreferrer">https://gitter.im/ovh-cds/</a></p>
<img loading="lazy" decoding="async" src="//blog.ovhcloud.com/wp-content/plugins/matomo/app/matomo.php?idsite=1&amp;rec=1&amp;url=https%3A%2F%2Fblog.ovhcloud.com%2Funderstanding-ci-cd-for-big-data-and-machine-learning%2F&amp;action_name=Understanding%20CI%2FCD%20for%20Big%20Data%20and%20Machine%20Learning&amp;urlref=https%3A%2F%2Fblog.ovhcloud.com%2Ffeed%2F" style="border:0;width:0;height:0" width="0" height="0" alt="" />]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
