RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1373783 - Warn users against setting memory hard limit too high or too low when used for rdma-pin-all
Summary: Warn users against setting memory hard limit too high or too low when used fo...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.3
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Jiri Denemark
QA Contact: Yanqiu Zhang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-09-07 06:54 UTC by Fangge Jin
Modified: 2018-04-10 10:39 UTC (History)
7 users (show)

Fixed In Version: libvirt-3.8.0-1.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-04-10 10:39:40 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2018:0704 0 normal SHIPPED_LIVE libvirt bug fix and enhancement update 2018-04-10 15:57:35 UTC

Description Fangge Jin 2016-09-07 06:54:47 UTC
Description of problem:
When do RDMA migration with rdma-pin-all, the memory hard limit has to be high enough for both guest memory and memory consumed by QEMU, but also setting the limit too high( close to host memory size) may result in QEMU being killed. 

We should document this to let the user know. Just like this section in doc file formatdomain.html: Memory Backing->locked

locked
    When set and supported by the hypervisor, memory pages belonging to the domain will be locked in host's memory and the host will not be allowed to swap them out. For QEMU/KVM this requires hard_limit memory tuning element to be used and set to the maximum memory configured for the domain plus any memory consumed by the QEMU process itself. Beware of setting the memory limit too high (and thus allowing the domain to lock most of the host's memory). Doing so may be dangerous to both the domain and the host itself since the host's kernel may run out of memory.

Comment 1 Fangge Jin 2016-09-07 06:57:57 UTC
See also: https://bugzilla.redhat.com/show_bug.cgi?id=1046833

Comment 2 Jiri Denemark 2016-11-29 18:01:08 UTC
Fixed upstream by

commit 4e116e9dad24ae28558070efdddbdee0d651f56a
Refs: v2.5.0-rc1-4-g4e116e9da
Author:     Jiri Denemark <jdenemar>
AuthorDate: Thu Nov 24 16:32:19 2016 +0100
Commit:     Jiri Denemark <jdenemar>
CommitDate: Tue Nov 29 16:48:03 2016 +0100

    Enhance documentation of virDomainMigrateFlags

    The enhanced documentation of VIR_MIGRATE_RDMA_PIN_ALL fixes
    https://bugzilla.redhat.com/show_bug.cgi?id=1373783

    Signed-off-by: Jiri Denemark <jdenemar>

Comment 4 Yanqiu Zhang 2017-02-03 12:53:51 UTC
For end users, it's not very convenient to check the information in code file, I suggest that the comments to be added in documents such as /usr/share/doc/libvirt-docs-2.5.0/html/formatdomain.html(hard_limit) or migration.html.

Comment 5 Jiri Denemark 2017-06-13 10:57:33 UTC
The API docs is the right place for someone who wants to use the API, but you're right it's not easily visible to a user. I guess virsh man page would be the right place.

Comment 7 Jiri Denemark 2017-09-18 10:10:38 UTC
Fixed upstream by

commit 440838472d860224a94a77ca1f2c100df6c3ca77
Refs: v3.7.0-83-g440838472d
Author:     Jiri Denemark <jdenemar>
AuthorDate: Fri Sep 8 21:31:29 2017 +0200
Commit:     Jiri Denemark <jdenemar>
CommitDate: Mon Sep 18 10:30:47 2017 +0200

    virsh: Enhance documentation of --rdma-pin-all option

    https://bugzilla.redhat.com/show_bug.cgi?id=1373783

    Signed-off-by: Jiri Denemark <jdenemar>
    Reviewed-by: Pavel Hrdina <phrdina>

Comment 9 Yanqiu Zhang 2017-10-11 03:33:15 UTC
Can reproduce with libvirt-3.2.0-14.el7_4.2.x86_64.

Steps to reproduce:
# man virsh
...
       migrate [--live] [--offline] [--direct] [--p2p [--tunnelled]] [--persistent]
       [--undefinesource] [--suspend] [--copy-storage-all] [--copy-storage-inc] [--change-protection]
       [--unsafe] [--verbose] [--rdma-pin-all] ...
...
           --rdma-pin-all can be used with RDMA migration (i.e., when migrateuri starts with rdma://)
           to tell the hypervisor to pin all domain's memory at once before migration starts rather
           than letting it pin memory pages as needed.
...


Verify this bug with libvirt-3.8.0-1.el7.x86_64.

Steps to verify:
# man virsh
...
       migrate [--live] [--offline] [--direct] [--p2p [--tunnelled]] [--persistent]
       [--undefinesource] [--suspend] [--copy-storage-all] [--copy-storage-inc] [--change-protection]
       [--unsafe] [--verbose] [--rdma-pin-all] ...
...
           --rdma-pin-all can be used with RDMA migration (i.e., when migrateuri starts with rdma://)
           to tell the hypervisor to pin all domain's memory at once before migration starts rather
           than letting it pin memory pages as needed. For QEMU/KVM this requires hard_limit memory
           tuning element (in the domain XML) to be used and set to the maximum memory configured for
           the domain plus any memory consumed by the QEMU process itself. Beware of setting the
           memory limit too high (and thus allowing the domain to lock most of the host's memory).
           Doing so may be dangerous to both the domain and the host itself since the host's kernel
           may run out of memory.


Mark this bug as verified.

Comment 13 errata-xmlrpc 2018-04-10 10:39:40 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2018:0704


Note You need to log in before you can comment on or make changes to this bug.