[Openstack] [nova] Nova-scheduler: when are filters applied?

Eugen Block eblock at nde.ag
Mon Sep 3 11:27:37 UTC 2018


Hi,

> To echo what cfriesen said, if you set your allocation ratio to 1.0,  
> the system will not overcommit memory. Shut down instances consume  
> memory from an inventory management perspective. If you don't want  
> any danger of an instance causing an OOM, you must set you  
> ram_allocation_ratio to 1.0.

let's forget about the scheduler, I'll try to make my question a bit clearer.

Let's say I have a ratio of 1.0 on my hypervisor, and let it have 24  
GB of RAM available, ignoring the OS for a moment. Now I launch 6  
instances, each with a flavor requesting 4 GB of RAM, that would leave  
no space for further instances, right?
Then I shutdown two instances (freeing 8 GB RAM) and create a new one  
with 8 GB of RAM, the compute node is full again (assuming all  
instances actually consume all of their RAM).
Now I boot one of the shutdown instances again, the compute node would  
require additional 4 GB of RAM for that instance, and this would lead  
to OOM, isn't that correct? So a ratio of 1.0 would not prevent that  
from happening, would it?

Regards,
Eugen


Zitat von Jay Pipes <jaypipes at gmail.com>:

> On 08/30/2018 10:54 AM, Eugen Block wrote:
>> Hi Jay,
>>
>>> You need to set your ram_allocation_ratio nova.CONF option to 1.0  
>>> if you're running into OOM issues. This will prevent overcommit of  
>>> memory on your compute nodes.
>>
>> I understand that, the overcommitment works quite well most of the time.
>>
>> It just has been an issue twice when I booted an instance that had  
>> been shutdown a while ago. In the meantime there were new instances  
>> created on that hypervisor, and this old instance caused the OOM.
>>
>> I would expect that with a ratio of 1.0 I would experience the same  
>> issue, wouldn't I? As far as I understand the scheduler only checks  
>> at instance creation, not when booting existing instances. Is that  
>> a correct assumption?
>
> To echo what cfriesen said, if you set your allocation ratio to 1.0,  
> the system will not overcommit memory. Shut down instances consume  
> memory from an inventory management perspective. If you don't want  
> any danger of an instance causing an OOM, you must set you  
> ram_allocation_ratio to 1.0.
>
> The scheduler doesn't really have anything to do with this.
>
> Best,
> -jay
>
> _______________________________________________
> Mailing list: http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
> Post to     : openstack at lists.openstack.org
> Unsubscribe : http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack





More information about the Openstack mailing list