Provide mechanism to tune the sysctl param fs.aio-max-nr on the host

Bug #1959449 reported by David Vallee Delisle
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
New
Undecided
David Vallee Delisle

Bug Description

Previously (for example, in RHOSP 13) libvirt-daemon RPM was installed on compute nodes and it provided /usr/lib/sysctl.d/60-libvirtd.conf configuration file [1] to increase fs.aio-max-nr from 65536 (default) to 1048576. libvirt-daemon RPM is no longer installed on RHOSP 16.1 nodes and default value is not changed there.

Documentation tells us that this number should be calculated as number of virtual disks on the host * 128. As a result default limit leaves us with 512 virtual disks, but KCS providing deployment limitations https://access.redhat.com/articles/1436373 tells us about 16384 KVM guests per hypervisor.

I am not sure how default value would behave in containerized environment, but this looks like a possible problem that requires second look.

[1]
[root@compute-1 ~]# cat /usr/lib/sysctl.d/60-libvirtd.conf
# The kernel allocates aio memory on demand, and this number limits the
# number of parallel aio requests; the only drawback of a larger limit is
# that a malicious guest could issue parallel requests to cause the kernel
# to set aside memory. Set this number at least as large as
# 128 * (number of virtual disks on the host)
# Libvirt uses a default of 1M requests to allow 8k disks, with at most
# 64M of kernel memory if all disks hit an aio request at the same time.
fs.aio-max-nr = 1048576

Changed in tripleo:
assignee: nobody → David Vallee Delisle (valleedelisle)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-heat-templates (stable/train)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-heat-templates (stable/wallaby)

Reviewed: https://review.opendev.org/c/openstack/tripleo-heat-templates/+/826845
Committed: https://opendev.org/openstack/tripleo-heat-templates/commit/e8acb586ddbea402c5c7da096137deeb74de4189
Submitter: "Zuul (22348)"
Branch: stable/wallaby

commit e8acb586ddbea402c5c7da096137deeb74de4189
Author: David Vallee Delisle <email address hidden>
Date: Tue Jan 18 10:17:10 2022 -0500

    Defining fs.aio-max-nr for hosts with libvirt service

    When we install libvirt on a host, the system parameter ``fs.aio-max-nr`` is
    to 1048576. Since we containerized libvirtd, we lost this system parameter.
    We now make sure it's defined by adding it from the nova-libvirt-common
    template.

    Related: https://bugzilla.redhat.com/show_bug.cgi?id=2036195
    Closes-Bug: 1959449
    Change-Id: I4d82e2a467c4250b23cc7de97233f934b3dbbe46
    (cherry picked from commit 97c1306b27508d842a108cd6f746cd0f3c607fbe)

tags: added: in-stable-wallaby
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-heat-templates (stable/victoria)

Fix proposed to branch: stable/victoria
Review: https://review.opendev.org/c/openstack/tripleo-heat-templates/+/829034

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-heat-templates (stable/ussuri)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-heat-templates (stable/train)

Reviewed: https://review.opendev.org/c/openstack/tripleo-heat-templates/+/827018
Committed: https://opendev.org/openstack/tripleo-heat-templates/commit/8c2eaf949ae8129b2df78086860fb1f97946d9c7
Submitter: "Zuul (22348)"
Branch: stable/train

commit 8c2eaf949ae8129b2df78086860fb1f97946d9c7
Author: David Vallee Delisle <email address hidden>
Date: Tue Jan 18 10:17:10 2022 -0500

    Defining fs.aio-max-nr for hosts with libvirt service

    When we install libvirt on a host, the system parameter ``fs.aio-max-nr`` is
    to 1048576. Since we containerized libvirtd, we lost this system parameter.
    We now make sure it's defined by adding it from the nova-libvirt-common
    template.

    Conflict:
     - roles/ComputeVdpa.yaml is only on Wallaby
     - adapted for rocky template version
     - roles/ComputeHCISriov.yaml was added in Ussuri
     - changes in inotify parameters

    Related: https://bugzilla.redhat.com/show_bug.cgi?id=2036195
    Closes-Bug: 1959449
    Change-Id: I4d82e2a467c4250b23cc7de97233f934b3dbbe46
    (cherry picked from commit 97c1306b27508d842a108cd6f746cd0f3c607fbe)
    (cherry picked from commit e8acb586ddbea402c5c7da096137deeb74de4189)
    (cherry picked from commit e01fe8b3424f62b93591c75550ed1835aaa758d5)
    (cherry picked from commit 7a1fe08ef803a74f8f17b283feea7189f3cbe00c)

tags: added: in-stable-train
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-heat-templates (stable/victoria)

Reviewed: https://review.opendev.org/c/openstack/tripleo-heat-templates/+/829034
Committed: https://opendev.org/openstack/tripleo-heat-templates/commit/e01fe8b3424f62b93591c75550ed1835aaa758d5
Submitter: "Zuul (22348)"
Branch: stable/victoria

commit e01fe8b3424f62b93591c75550ed1835aaa758d5
Author: David Vallee Delisle <email address hidden>
Date: Tue Jan 18 10:17:10 2022 -0500

    Defining fs.aio-max-nr for hosts with libvirt service

    When we install libvirt on a host, the system parameter ``fs.aio-max-nr`` is
    to 1048576. Since we containerized libvirtd, we lost this system parameter.
    We now make sure it's defined by adding it from the nova-libvirt-common
    template.

    Conflict:
     - roles/ComputeVdpa.yaml is only on Wallaby
     - adapted for rocky template version

    Related: https://bugzilla.redhat.com/show_bug.cgi?id=2036195
    Closes-Bug: 1959449
    Change-Id: I4d82e2a467c4250b23cc7de97233f934b3dbbe46
    (cherry picked from commit 97c1306b27508d842a108cd6f746cd0f3c607fbe)
    (cherry picked from commit e8acb586ddbea402c5c7da096137deeb74de4189)

tags: added: in-stable-victoria
tags: added: in-stable-ussuri
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-heat-templates (stable/ussuri)

Reviewed: https://review.opendev.org/c/openstack/tripleo-heat-templates/+/829035
Committed: https://opendev.org/openstack/tripleo-heat-templates/commit/7a1fe08ef803a74f8f17b283feea7189f3cbe00c
Submitter: "Zuul (22348)"
Branch: stable/ussuri

commit 7a1fe08ef803a74f8f17b283feea7189f3cbe00c
Author: David Vallee Delisle <email address hidden>
Date: Tue Jan 18 10:17:10 2022 -0500

    Defining fs.aio-max-nr for hosts with libvirt service

    When we install libvirt on a host, the system parameter ``fs.aio-max-nr`` is
    to 1048576. Since we containerized libvirtd, we lost this system parameter.
    We now make sure it's defined by adding it from the nova-libvirt-common
    template.

    Conflict:
     - roles/ComputeVdpa.yaml is only on Wallaby
     - adapted for rocky template version

    Related: https://bugzilla.redhat.com/show_bug.cgi?id=2036195
    Closes-Bug: 1959449
    Change-Id: I4d82e2a467c4250b23cc7de97233f934b3dbbe46
    (cherry picked from commit 97c1306b27508d842a108cd6f746cd0f3c607fbe)
    (cherry picked from commit e8acb586ddbea402c5c7da096137deeb74de4189)
    (cherry picked from commit e01fe8b3424f62b93591c75550ed1835aaa758d5)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-heat-templates ussuri-eol

This issue was fixed in the openstack/tripleo-heat-templates ussuri-eol release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-heat-templates 13.6.0

This issue was fixed in the openstack/tripleo-heat-templates 13.6.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-heat-templates train-eol

This issue was fixed in the openstack/tripleo-heat-templates train-eol release.

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.