Bug 738933 - Improving virsh manual for virsh memtune command
Summary: Improving virsh manual for virsh memtune command
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.2
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Peter Krempa
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-09-16 03:23 UTC by yuping zhang
Modified: 2012-06-20 06:31 UTC (History)
9 users (show)

Fixed In Version: libvirt-0.9.9-1.el6
Doc Type: Bug Fix
Doc Text:
No Documentation needed
Clone Of:
Environment:
Last Closed: 2012-06-20 06:31:23 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System 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 19:31:38 UTC

Description yuping zhang 2011-09-16 03:23:54 UTC
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 05:02:37 UTC
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 08:08:28 UTC
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 17:58:13 UTC
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-10 03:10:48 UTC
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 09:42:32 UTC
    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 06:31:23 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.

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.