Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 738933 - Improving virsh manual for virsh memtune command
Improving virsh manual for virsh memtune command
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt (Show other bugs)
6.2
Unspecified Unspecified
medium Severity medium
: rc
: ---
Assigned To: Peter Krempa
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2011-09-15 23:23 EDT by yuping zhang
Modified: 2012-06-20 02:31 EDT (History)
9 users (show)

See Also:
Fixed In Version: libvirt-0.9.9-1.el6
Doc Type: Bug Fix
Doc Text:
No Documentation needed
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-06-20 02:31:23 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2012:0748 normal SHIPPED_LIVE Low: libvirt security, bug fix, and enhancement update 2012-06-19 15:31:38 EDT

  None (edit)
Description yuping zhang 2011-09-15 23:23:54 EDT
Description of problem:
As the --min-guarantee option list in virsh manual and help,so we need to support it.

# virsh help memtune
  NAME
    memtune - Get or set memory parameters

  SYNOPSIS
    memtune <domain> [--hard-limit <number>] [--soft-limit <number>] [--swap-hard-limit <number>] [--min-guarantee <number>] [--config] [--live] [--current]

  DESCRIPTION
    Get or set the current memory parameters for a guest domain.
    To get the memory parameters use following command:

    virsh # memtune <domain>

  OPTIONS
    [--domain] <string>  domain name, id or uuid
    --hard-limit <number>  Max memory in kilobytes
    --soft-limit <number>  Memory during contention in kilobytes
    --swap-hard-limit <number>  Max memory plus swap in kilobytes
    --min-guarantee <number>  Min guaranteed memory in kilobytes
    --config         affect next boot
    --live           affect running domain
    --current        affect current domain

#man virsh
...
  memtune domain-id [--hard-limit kilobytes] [--soft-limit kilobytes]
       [--swap-hard-limit kilobytes] [--min-guarantee kilobytes] [[--config]
       [--live] | [--current]]
 ...
 --min-guarantee
               The guaranteed minimum memory allocation for the guest.  The units
               for this value are kilobytes (i.e. blocks of 1024 bytes).
...

# virsh memtune rhel6 --min-guarantee 10241024
error: Unable to change memory parameters
error: invalid argument: Memory tunable `min_guarantee' not implemented

Version-Release number of selected component (if applicable):
libvirt-0.9.4-11.el6.x86_64

How reproducible:
always

Steps to Reproduce:

Actual results:

Expected results:

Additional info:

virsh man page had better to improve documents, because users can't see any output when option --hard-limit, --soft-limit and --swap-hard-limit
is -1.
Comment 2 Osier Yang 2011-09-16 01:02:37 EDT
the min-guarantee is introduced for ESX driver, please see:

https://www.redhat.com/archives/libvir-list/2010-August/msg00613.html

Perhaps it will be a general tuning option for other drivers in future, but currently it's only used by ESX. And all the memory tunable for QEMU drivers are based on cgroup memory controller, which doesn't support thing like "min-guatentee" yet, so you can't file a bug saying it's a PFE, as there is even no underlying support yet.

IMHO this should just be closed as NOTABUG.
Comment 3 yuping zhang 2011-09-16 04:08:28 EDT
As ajia discussed with Osier in email,it's better to document in virsh manual
to outline "--min-guarantee" is only used by ESX driver.

And also,for -1 value,it's better to document it, because users can't see any output when option --hard-limit, --soft-limit and --swap-hard-limit
is -1.

So I updated the bug summary.Thanks, Osier and ajia.
Comment 4 Peter Krempa 2011-09-23 13:58:13 EDT
Fixed with upstream commit:

commit c4111bd0d9397446128aa939f3519518ce9cc519
Author: Peter Krempa <pkrempa@redhat.com>
Date:   Thu Sep 22 12:14:18 2011 +0200

    virsh: Improve virsh manual for virsh memtune command
    
    Commit 0a22f54 added --min-guarantee option for the memtune command.
    This option is supported only by the ESX hypervisor. This patch adds a
    statement about this fact, to prevent user confusion.
    
    This patch also adds explanation how to clear/set to unlimited the
    memory tunables. (documments the -1 value).
Comment 7 tingting zheng 2012-01-09 22:10:48 EST
Verified the bug with libvirt-0.9.9-1.el6.x86_64

# man virsh
memtune domain-id [--hard-limit kilobytes] [--soft-limit kilobytes] [--swap-hard-limit kilobytes]
       [--min-guarantee kilobytes] [[--config] [--live] | [--current]]
           Allows you to display or set the domain memory parameters. Without flags, the current settings are
           displayed; with a flag, the appropriate limit is adjusted if supported by the hypervisor.  LXC and
           QEMU/KVM support --hard-limit, --soft-limit, and --swap-hard-limit.  --min-guarantee is supported only by ESX hypervisor.        
           ……

           --hard-limit
               The maximum memory the guest can use.  The units for this value are kilobytes (i.e. blocks of
               1024 bytes).

           --soft-limit
               The memory limit to enforce during memory contention.  The units for this value are kilobytes
               (i.e. blocks of 1024 bytes).

           --swap-hard-limit
               The maximum memory plus swap the guest can use.  The units for this value are kilobytes (i.e.
               blocks of 1024 bytes).  This has to be more than hard-limit value provided.

           --min-guarantee
               The guaranteed minimum memory allocation for the guest.  The units for this value are kilobytes
               (i.e. blocks of 1024 bytes).

           Specifying -1 as a value for these limits is interpreted as unlimited.
Comment 8 Peter Krempa 2012-05-02 05:42:32 EDT
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
No Documentation needed
Comment 10 errata-xmlrpc 2012-06-20 02:31:23 EDT
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.

http://rhn.redhat.com/errata/RHSA-2012-0748.html

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