<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Title" content="">
<meta name="Keywords" content="">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-reply;
font-family:Calibri;
color:windowtext;}
span.msoIns
{mso-style-type:export-only;
mso-style-name:"";
text-decoration:underline;
color:teal;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style>
</head>
<body bgcolor="white" lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal">> Hello people,<o:p></o:p></p>
<div>
<p class="MsoNormal">> After setting up an Ocata cloud and spinning up a few instances in it all of them using local storage I noticed I wasn't able to create more than a handfull of instances all thought the cloud had much more capacity.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">> After some debugging I noticed the compute node reporting more disk space as used than actual disk space available, which caused an Exception in the nova api service:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">> Compute:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">> 2017-03-08 14:43:47.209 3386 INFO nova.compute.resource_tracker [req-1486e04b-7548-4b17-b095-b5b08768ba67 - - - - -] Final resource view: name=redacted_hostname phys_ram=12287MB used_ram=6656MB phys_disk=48GB
<o:p></o:p></p>
<p class="MsoNormal">> used_disk=60GB total_vcpus=4 used_vcpus=3 pci_stats=[]<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">> The underlying issue (more disk space reported than available) seems to not be new, people already asked about it back in '14[1] which is why I didn't create a bugzilla but asking here.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">> I assume this is caused by nova counting the virtual disk size of all instances on that host as 'used_disk'. This in turn means it is not possible to overprovision local storage. Is there a configuration setting or a workaround for this?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><br>
“space used” is based on the size of the disk specified in the instance flavors not what is used on-disk.<o:p></o:p></p>
<p class="MsoNormal">e.g. when you spawn 10 instances with a flavor with 50GB of local storage the hypervisor will assume 500GB of space is needed.<o:p></o:p></p>
<p class="MsoNormal">If you use “thin-provisioing” of the and only 10GB is actually on disk it will still calculate with 500GB because those instances might grow to 500GB in total.<o:p></o:p></p>
<p class="MsoNormal">This is based on the assumption that you do not want to see “can’t write, disk full” messages on all your instances ;)<o:p></o:p></p>
<p class="MsoNormal"><br>
If you think you can get away with overprovisioning by assuming that not all instances will use the full disk space or e.g. use zfs compression you can set the overprovision facter.<o:p></o:p></p>
<p class="MsoNormal">Overprovision of disk is managed by “disk_allocation_ratio”.<o:p></o:p></p>
<p class="MsoNormal">You can set this either in nova.conf or in an aggregate. <o:p>
</o:p></p>
<p class="MsoNormal">Basically, works the same as memory/cpu overcommit.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Cheers,<o:p></o:p></p>
<p class="MsoNormal">Robert van Leeuwen<o:p></o:p></p>
</div>
</div>
</body>
</html>