Sensible cap to worker-multiplier is needed

Bug #1843011 reported by Nobuto Murata
14
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Charm Helpers
Fix Released
Undecided
Nobuto Murata
OpenStack API Layer
Fix Released
Undecided
Nobuto Murata
OpenStack Charm Guide
Fix Released
High
Nobuto Murata
OpenStack Nova Compute Charm
Fix Released
Wishlist
Nobuto Murata

Bug Description

worker-multiplier is a common option across multiple OpenStack charms. Most of the control plane related charms will be deployed into LXD containers because of higher density and better separations. However, nova-compute cannot be deployed into LXD of course by nature, so no cap will be applied to worker-multiplier if no value is set.

https://jaas.ai/nova-compute#charm-config-worker-multiplier
> worker-multiplier
> (float) The CPU core multiplier to use when configuring worker processes for this services e.g. metadata-api. By default, the number of workers for each daemon is set to twice the number of CPU cores a service unit has. When deployed in a LXD container, this default value will be capped to 4 workers unless this configuration option is set.

One example was that a customer had 150+ workers which ate almost all memory of the system and led to OOM killer. While users can set an explicit value through the charm option, sensible default cap is nice to have even for bare metal.

Tags: cpe-onsite sts
Changed in charm-nova-compute:
status: New → Triaged
importance: Undecided → Wishlist
tags: added: sts
Revision history for this message
Brett Milford (brettmilford) wrote :

We have encountered this in a deployment using reserved hugepages.
350 1G pages were reserved, leaving 22G for hypervisor processes.
Around 14G of this was consumed by metadata-api processes which in combination with the other system processes was leaving little free memory and resulting in memory fragmentation.
The outcome was that qemu was unable to allocate order 6 pages when launching VMs (which were to be backed by hugepages).
I expect in setups using reserved hugepages the effects of this bug would be more pronounced and occur more often.

Revision history for this message
Andrea Ieri (aieri) wrote :

subscribed field-high given the impact this bug has on environments using hugepages

Revision history for this message
Celia Wang (ziyiwang) wrote :

Current value we used in customers' cloud is worker-multiplier="0.1". (Brett and me tried to use 4 but that's not too helpful)
So a more sensible default value is needed.

Revision history for this message
Nobuto Murata (nobuto) wrote :
Revision history for this message
James Page (james-page) wrote :

PR looks good and has been updated - will merge today.

I've dropped field-high and added field-medium for this bug as there is a documented workaround using the existing configuration option but this is still a good feature to get landed for our next release.

Changed in charm-nova-compute:
status: Triaged → In Progress
assignee: nobody → Nobuto Murata (nobuto)
milestone: none → 21.04
Nobuto Murata (nobuto)
Changed in charm-helpers:
assignee: nobody → Nobuto Murata (nobuto)
status: New → Fix Committed
Revision history for this message
Nobuto Murata (nobuto) wrote :

For reactive charms (update config.yaml to reflect the change):
https://review.opendev.org/c/openstack/charm-layer-openstack-api/+/778839

For a classic charm, nova-compute as the example:
https://review.opendev.org/c/openstack/charm-nova-compute/+/778838
(I will copy the same to other classic charms once nova-compute one is approved)

Revision history for this message
Aurelien Lourot (aurelien-lourot) wrote :

@nobuto, thanks for doing this! Could you please also open a gerrit review to the charm-guide's release notes? Thanks!

Changed in charm-guide:
status: New → Triaged
importance: Undecided → High
Nobuto Murata (nobuto)
Changed in charm-guide:
assignee: nobody → Nobuto Murata (nobuto)
Revision history for this message
Nobuto Murata (nobuto) wrote :
Changed in charm-nova-compute:
status: In Progress → Fix Committed
Revision history for this message
Nobuto Murata (nobuto) wrote :
Changed in layer-openstack-api:
assignee: nobody → Nobuto Murata (nobuto)
status: New → Fix Committed
Revision history for this message
Nobuto Murata (nobuto) wrote :
Nobuto Murata (nobuto)
Changed in charm-guide:
status: Triaged → In Progress
Changed in layer-openstack-api:
milestone: none → 21.04
Changed in charm-nova-compute:
status: Fix Committed → Fix Released
Changed in layer-openstack-api:
status: Fix Committed → Fix Released
Revision history for this message
Billy Olsen (billy-olsen) wrote :

charm-helpers fix was included in the v0.20.21 release.

~/work/charms/charm-helpers (master) $ git tag --contains 63dfd93
v0.20.21

Changed in charm-helpers:
status: Fix Committed → Fix Released
Revision history for this message
Nobuto Murata (nobuto) wrote :
Changed in charm-guide:
status: In Progress → Fix Released
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.