enabling per node filtering of mempage sizes
For certain workloads how a guest memory is allocated can be an important
factor for performance or security reasons. In some scenarios implementation
constraints may require the use of large pages for all guests on a node. This
blueprint extends nova to allow operators declare what page sizes may be
consumed on a particular compute node.
Blueprint information
- Status:
- Complete
- Approver:
- None
- Priority:
- Undefined
- Drafter:
- sean mooney
- Direction:
- Needs approval
- Assignee:
- sean mooney
- Definition:
- Obsolete
- Series goal:
- None
- Implementation:
- Unknown
- Milestone target:
- None
- Started by
- Completed by
- sean mooney
Related branches
Related bugs
Sprints
Whiteboard
Problem description
===================
In the Kilo cycle, the virt drivers large pages feature[1] is introduced
to allow a guest to request the type of memory backing that they desire
via a flavor or image metadata.
In certain configurations, it may be desired or required to filter the
memory pages available to vms booted on a node. At present no mechanism
exists to allow filtering of reported memory pages.
Use Cases
----------
On a host that only supports vhost-user or ivshmem,
all vms are required to use large page memory.
If a vm is booted with standard pages with these interfaces,
network connectivity will not available.
In this case it is desirable to filter out small/4k pages when reporting
available memory to the scheduler.
Proposed change
===============
This blueprint proposes adding a new config variable (allowed_
to the libvirt section of the nova.conf.
cfg.ListOpt(
The _get_host_
will be modified to filter the mempages reported for each cell based on the
value of CONF.libvirt.
If small is set then only 4k pages will be reported.
If large is set 2MB and 1GB will be reported.
If any is set no filtering will be applied.
The default value of "any" was chosen to ensure that this change has no effect on
existing deployment.
References
==========
[1] - https:/
alternative
========
a new filter (AggregateMemor
The AggregateMemory
The AggregateMemory
A new MemoryBacking attribute will be added to the aggregate metadata.
The MemoryBacking attribute can be set to 1 or more of the flowing: small,large,
If small is set then host will only be passed if the vm requests small or 4k pages.
If large is set then host will only be passed if the vm requests 2MB or 1GB.
If the MemoryBacking element is not set for an aggregate the AggregateMemory
If this alternative is preferred I will resubmit as a new blueprint and mark this as superseded.