WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-users

[Xen-users] Re: Memory resizing

To: Jiri Denemark <jirka@xxxxxxxxxxx>
Subject: [Xen-users] Re: Memory resizing
From: Anthony Liguori <aliguori@xxxxxxxxxx>
Date: Fri, 06 Oct 2006 16:31:53 -0500
Cc: xen-users@xxxxxxxxxxxxxxxxxxx
Delivery-date: Fri, 06 Oct 2006 14:32:39 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <20061006093403.GA7141@xxxxxxxx>
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
References: <20061006093403.GA7141@xxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 1.5.0.7 (X11/20060918)
Ballooning down to 160MB is not quite the same as creating a domain with 160MB.

What's really going on here, is that you create a domain with 7800MB, and then the balloon driver tells the kernel that it's allocated (7800-160)MBs. The kernel really doesn't know that the balloon driver gave that memory back to Xen--it just thinks it's a greedy kernel module.

At any rate, Linux tends to allocate certain structures as percentages. Furthermore, the swapping heuristics are going to be based on the assumption that the system really has 7800MB of memory. Since you only have a 1G swap, I imagine it will be very conservative about how it uses that swap.

Regards,

Anthony Liguori

Jiri Denemark wrote:
Hi.

I have a machine with 8GB of memory and I'd like to create two domUs in such a
way that each domain can use memory from about 160MB to 7800MB (set manually
using xm mem-set).

First, I create Domain-1 with memory=7800, than reduce its current memory
allocation to 160MB by xm mem-set 1 160. After that, the second domU is
started in the same way. Up to now, everything is ok.

After logging in the first domain, free tells me there is 62MB of free memory
out of total 160MB and 1GB of free swap. Then I start a process which consumes
more than 62 megabytes of memory (to be specific, view a 100+MB file with the
vim). After a while, the process is killed by OOM killer, even though there is
plenty of space available in swap. When I create the domain with memory=160,
everything works as expected, free space in swap is used and no process is
killed by OOM.

Do you have any idea where the problem could be?

Thanks a lot.

Jirka



_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users

<Prev in Thread] Current Thread [Next in Thread>