Allow to Configure TB Cache size

Registered by yatin

Qemu>=5.0.0[1](included in Ubuntu Jammy, CentOS 8-stream etc) updated default TB Cache Size to 1 GiB(from 32 MiB) for system-emulated guest vms and due to this each guest VM is using much more system memory(1 GB+ memory for guest) with virt_driver=qemu.

This makes difficult to run Concurrent Guest VMs on a host with not much memory available like on CI or dev systems. The issue was seen in neutron scenario jobs where multiple concurrent guest VMs run. With Ubuntu Jammy Node(8GB Memory) such tests resulted into oom-kill issues.

Libvirt>=8.0.0[2] allows to configure tb-cache size per guest VM.

This blueprint proposes to add a config option (in workarounds group) in nova so operators have a way to configure lower tb-cache size as per the environment.
By default this config value will be unset and would not do any changes to the guest VM. If set and virt_driver=qemu, check libvirt version
- For libvirt<8.0.0, raise an error as this option is not supported
- For libvirt>=8.0.0 configure TB cache size as per config option.

Additionally a flag can be added in devstack to configure this option and same can be used in Jobs needing it.

Initial Tests are done with https://review.opendev.org/c/openstack/nova/+/868419/3 in https://review.opendev.org/c/openstack/neutron-tempest-plugin/+/881391/3

[1] https://github.com/qemu/qemu/commit/600e17b26
[2] https://gitlab.com/libvirt/libvirt/-/commit/58bf03f85

Blueprint information

Status:
Complete
Approver:
Sylvain Bauza
Priority:
Undefined
Drafter:
yatin
Direction:
Approved
Assignee:
yatin
Definition:
Approved
Series goal:
Accepted for bobcat
Implementation:
Implemented
Milestone target:
None
Started by
Sylvain Bauza
Completed by
Sylvain Bauza

Whiteboard

[20230426 bauzas] Approved as a specless blueprint by the Apr 25th nova meeting.

Gerrit topic: https://review.opendev.org/#/q/topic:libvirt-tb-cache-size

Addressed by: https://review.opendev.org/c/openstack/nova/+/868419
    Add config option to configure TB cache size

Addressed by: https://review.opendev.org/c/openstack/devstack/+/881580
    [nova] Add flag to set libvirt_tb_cache_size

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.