Bug 669739

Summary: bump domain memory limits
Product: Red Hat Enterprise Linux 6 Reporter: Andrew Jones <drjones>
Component: kernelAssignee: Igor Mammedov <imammedo>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: urgent    
Version: 6.0CC: anton, imammedo, james.brown, jgregusk, jzheng, leiwang, mjenner, pbonzini, pcao, qguan, qwan, sforsber, sghosh, tburke, ted.williams, whayutin
Target Milestone: rcKeywords: EC2, ZStream
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: kernel-2.6.32-163.el6 Doc Type: Bug Fix
Doc Text:
Memory limit for x86_64 domU PV guests has been increased to 128 GB: CONFIG_XEN_MAX_DOMAIN_MEMORY=128.
Story Points: ---
Clone Of:
: 716498 (view as bug list) Environment:
Last Closed: 2011-12-06 07:41:15 EST Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On:    
Bug Blocks: 653816, 716498, 716539    
Description Flags
[RHEL6.2 Xen PATCH V2] xen: bump memory limit for x86_64 domU PV guest to 128Gb
[RHEL6.2 Xen PATCH V3] xen: bump memory limit for x86_64 domU PV guest to 128Gb none

Description Andrew Jones 2011-01-14 10:32:08 EST
RHEL6 arch/x86/xen/Kconfig sets 32-bit guests to 8G and 64-bit guests to 32G for maximum memory. Upstream now has that at 128, which makes more sense considering the pseudo-physical memory map allows up to 168G.
Comment 2 Andrew Jones 2011-01-24 05:35:19 EST
Thinking about this more we should probably take all of

commit 58e05027b530ff081ecea68e38de8d59db8f87e0
Author: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Date:   Fri Aug 27 13:28:48 2010 -0700

    xen: convert p2m to a 3 level tree

which is the upstream patch that bumps the memory limit. If we don't take this whole patch then we'll have a cost of one page per gig. Right now we have the small cost of 8 pages for 32-bit guests and 32 pages for 64-bit guests. We could maybe double those without being too wasteful, but going to 128 would certainly be overly expensive. The full upstream patch switches to using early_brk() when setting up the p2m map, and thus any unused pages that were reserved for early_brk are freed.

Since nobody seems to be hitting the current limits, then I'm inclined to move the consideration of the full backport to 6.2, and not even bother doing the Kconfig change to increase (double?) the current limits.
Comment 3 Paolo Bonzini 2011-04-20 09:02:09 EDT
http://xen.1045712.n5.nabble.com/PATCH-xen-convert-p2m-to-a-3-level-tree-partial-revert-td3359827.html points out a possible regression from bumping the memory limits.  Upstream commits e5f15b45 and 14988a4d should fix this.
Comment 4 Igor Mammedov 2011-05-09 11:18:30 EDT
upstream 8e1b4cf210 maybe useful here too.
Comment 5 Andrew Jones 2011-06-24 04:23:02 EDT
*** Bug 716274 has been marked as a duplicate of this bug. ***
Comment 6 Andrew Jones 2011-06-24 04:28:41 EDT
We need to bump up to at least 70G for x86_64 guests per the requirements of
one customer. At this time we have no request to change 32-bit guest limits,
but while we're in the business it might be good to try 16G.
Comment 7 RHEL Product and Program Management 2011-06-24 04:39:51 EDT
This request was evaluated by Red Hat Product Management for inclusion
in a Red Hat Enterprise Linux maintenance release. Product Management has 
requested further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed 
products. This request is not yet committed for inclusion in an Update release.
Comment 8 Igor Mammedov 2011-06-24 08:44:53 EDT
Backported 58e05027b530ff0 and patches it depends on.

Tested x32 PV guest with 10Gb RAM on my WS (boots/saves/resumes).

Waiting for a reservation of a beaker host with sufficient amount of memory to
test x64 PV guest.
Comment 20 Aristeu Rozanski 2011-06-27 15:18:42 EDT
Patch(es) available on kernel-2.6.32-163.el6
Comment 23 Martin Prpic 2011-08-26 09:40:30 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:
Memory limit for x86_64 domU PV guests has been increased to 128 GB: CONFIG_XEN_MAX_DOMAIN_MEMORY=128.
Comment 24 Qin Guan 2011-10-31 00:41:00 EDT
Verify this problem with kernel-2.6.32-202.el6 (128G memory guest excluded).

Host Version: 
2.6.18-286.el5xen, x86_64

Guest Version:
kernel-2.6.32-202.el6, pv

Test Matrix:

- AMD, Intel
Guest Arch i386:
- Memory Size: 512M, 4G, 8G
Guest Arch x86_64:
- Memory Size: 1G, 4G, 16G, 32G, 70G, 128G
Guest CPU: 

For guest with 128G memory, sanity test pass with kernel-2.6.32-211.el6. Please
refer to bug 743590 comment 8.
Comment 25 errata-xmlrpc 2011-12-06 07:41:15 EST
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.