Clarify memory rounding of HMC

Bug #1689265 reported by Andreas Scheuring
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
nova-dpm
New
Low
sreeteja

Bug Description

The HMC implements memory rounding:

Docs form the "initial-memory" [1] attribute of a partition:

"[...]
Note: If the value input by the user does not fall on an
increment boundary, it is rounded up to the closest
increment boundary."

Also consider [2], page 100.

We need to clarify how this affects u
- can we end up with consuming more memory than specified in our max_memory property
- an there be a missmatch between used memory and the one specified in the flavor and quota?
- ...

[1] https://www-01.ibm.com/support/docview.wss?uid=isg2cb468b15654ca89b85257f7200746c16
[2] http://www-01.ibm.com/support/docview.wss?uid=isg22dec9fb95bdff17385257dc4007a164f

Revision history for this message
sreeteja (sreeteja) wrote :
Revision history for this message
Andreas Scheuring (andreas-scheuring) wrote :

no, this one is about the dpm partition memory properties, while the bug you are referring to is about the max_memory openstack dpm property

Changed in nova-dpm:
importance: Undecided → Low
Revision history for this message
sreeteja (sreeteja) wrote :

Yes I tried a scenario in which I gave the flavor as 1000MB ram with the ram_allocation_ratio as 1 and due to the HMC rounding property it rounded off this value to 1024MB and launched an instance...but the in the dashboard under the hypervisor stats it is showing as ram-used 1000MB and also ram_filter which is a scheduler filter com pares this condition
https://github.com/openstack/nova/blob/4f91ed3a547965ed96a22520edcfb783e7936e95/nova/scheduler/filters/ram_filter.py#L39
even this parameters like memory_mb are all taken from the flavor so...there are two problems in this

1.With the existing code if we allocate the max_memory as 2000MB to be used by a specific host due to HMC rounding property it consumes 2048MB (because even if flavor is provided as 1000 it rounds to 1024 only)...OVER CONSUMPTION OF RAM

2. This also shows wrong hypervisor stats and mislead scheduler ram_filter...

Changed in nova-dpm:
assignee: nobody → sreeteja (sreeteja)
Revision history for this message
Andreas Scheuring (andreas-scheuring) wrote :

nice elaboration!

Revision history for this message
Andreas Scheuring (andreas-scheuring) wrote :

I think the solution is to deny instance creation if the flavor has a ram size that requires rounding (is not a multiple of 256) with an appropriate error message in the log. We should also add this piece of information to the docs.

The alternative would be to live with the fact and just print warnings...

Andy, Marco, what do you think?

Revision history for this message
Sreeram Vancheeswaran (sreeram-vancheeswaran) wrote :

I'd vote for the second option, i.e, to live with this and print warning messages, as it is rounding off to the nearest multiple of 256, and according to me this is ok to live with.

Revision history for this message
Marco Pavone (pavone) wrote :

we should not silently accept the rounding taking place.
My preferred way is to check for the actual memory consumption after the create partition has been triggered, and report this back to scheduler (i.e. update in nova database). However, I didn't check if this is possible from both current zhmcclient and nova(-spawn) implementations...

Revision history for this message
Andreas Scheuring (andreas-scheuring) wrote :

@Marco: But that doesn't solve the issue 2 issues sreeteja laid out.

#1 More memory than the max_memory parameter might get consumed
#2 This is one of the reason for #1. The scheduler makes assumptions about the requested memory along the flavor - he does not know anything about the memory rounding taking place).

We're already reporting back the right values IMO [1]. The problem is issue #1 and #2.

[1] https://github.com/openstack/nova-dpm/blob/cb0074b90e432ffcb3c971576cfda65d84d855dc/nova_dpm/virt/dpm/host.py#L109,L115

Revision history for this message
sreeteja (sreeteja) wrote :

Yes as andreas told we are reporting the right value by [1] https://github.com/openstack/nova-dpm/blob/cb0074b90e432ffcb3c971576cfda65d84d855dc/nova_dpm/virt/dpm/host.py#L109,L115 but the hypervisor metrics are shown wrong as they are looking at the memory value consumed as the flavor RAM value that is provided ...I would like to attach the screenshot of the hypervisor stats tried for the above usecase

Revision history for this message
sreeteja (sreeteja) wrote :
Revision history for this message
sreeteja (sreeteja) wrote :
Revision history for this message
sreeteja (sreeteja) wrote :
Revision history for this message
Andreas Scheuring (andreas-scheuring) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.