The available hugepage is 1G less than the value set up when the vswitch_type parameter is set to: 'none'

Bug #2018324 reported by Matheus Machado Guilhermino
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
Fix Released
Low
Matheus Machado Guilhermino

Bug Description

Brief Description
-----------------

Increased the huge page memory up to 32 Gib by running the below command:

$ system host-memory-modify controller-0 0 -1G 32
[sysadmin@controller-0 ~(keystone_admin)]$ system host-memory-list controller-0+-----------+---------+------------+---------+----------------+--------+---------+-------------+------------+--------------+----------------------+-----------------+-----------------+-------------------+-----------------+-----------------+-------------------+---------------+| processor | mem_tot | mem_platfo | mem_ava | hugepages(hp)_ | vs_hp_ | vs_hp_t | vs_hp_avail | vs_hp_reqd | app_total_4K | app_hp_as_percentage | app_hp_total_2M | app_hp_avail_2M | app_hp_pending_2M | app_hp_total_1G | app_hp_avail_1G | app_hp_pending_1G | app_hp_use_1G || | al(MiB) | rm(MiB) | il(MiB) | configured | size(M | otal | | | | | | | | | | | || | | | | | iB) | | | | | | | | | | | | |+-----------+---------+------------+---------+----------------+--------+---------+-------------+------------+--------------+----------------------+-----------------+-----------------+-------------------+-----------------+-----------------+-------------------+---------------+| 0 | 116205 | 10000 | 115181 | True | 1024 | 0 | 0 | None | 21359872 | False | 0 | 0 | None | 32 | 31 | None | True |+-----------+---------+------------+---------+----------------+--------+---------+-------------+------------+--------------+----------------------+-----------------+-----------------+-------------------+-----------------+-----------------+-------------------+---------------+
Examining the current memory allocation, the following parameter change was observed:

app_hp_total_1G = 32 Gib
app_hp_avail_1G = 31 Gib

the following formula is used to calculate memory:

app_hp_total_1G = app_hp_avail_1G + vSwitch Page

According to the documentation, the vSwitch Huge Pages are not allocated if the vswitch_type is set to None

When checking with "system show", the vSwitch type is set to none:

[sysadmin@controller-0 ~(keystone_admin)]$ system show | grep vswitch_type
| vswitch_type | none |

Severity
--------

Minor

Steps to Reproduce
------------------

Execute "system host-memory-modify controller-0 0 -1G 32"
check available app_hp_avail_1G with "system host-memory-list controller-0"

Expected Behavior
------------------

app_hp_avail_1G equal to app_hp_total_1G on "system host-memory-list controller-0"

Actual Behavior
----------------

app_hp_avail_1G less than app_hp_total_1G on "system host-memory-list controller-0"

Reproducibility
---------------

100%

System Configuration
--------------------

Simplex lab environment

Last Pass
---------

N/A

Timestamp/Logs
--------------

No alarms observed

Test Activity
-------------

Developer Testing

Workaround
-------------

N/A

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to stx-puppet (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/starlingx/stx-puppet/+/882092

Changed in starlingx:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to config-files (master)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to stx-puppet (master)

Reviewed: https://review.opendev.org/c/starlingx/stx-puppet/+/882092
Committed: https://opendev.org/starlingx/stx-puppet/commit/248c258bc988da7f015616dde44b302d13890ea7
Submitter: "Zuul (22348)"
Branch: master

commit 248c258bc988da7f015616dde44b302d13890ea7
Author: Matheus Guilhermino <email address hidden>
Date: Tue May 2 12:10:51 2023 -0300

    Disable postgres huge page usage

    In order to use the total available 1G hugepages space when
    vswitch_type parameter is set to 'none', the value huge_pages=off
    needs to be included on /etc/postgresql/postgresql.conf since, by
    default, postgres uses hugepages if available.

    The postgresql.pp is a manifest called on unlock

    Test Plan
    PASS: AIO-SX: Successfully bootstrapped and unlocked
    PASS: Verified that app_hp_avail_1G == app_hp_total_1G after
          increasing huge page memory to the amount indicated by
          app_hp_total_1G (total and available values match when
          no applications are using huge pages).
    PASS: Output of 'cat /proc/meminfo' matches output of
          'system host-memory-list controller-0'
          (HugePages_Free == app_hp_avail_1G).

    Closes-bug: 2018324

    Change-Id: Iab7b7518fdcfccd2761778ed6a875a42cd35c34c
    Signed-off-by: Matheus Guilhermino <email address hidden>

Changed in starlingx:
status: In Progress → Fix Released
Ghada Khalil (gkhalil)
Changed in starlingx:
importance: Undecided → Low
tags: added: stx.9.0 stx.config
Changed in starlingx:
assignee: nobody → Matheus Machado Guilhermino (matheusguilhermino)
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.