From: Jia Rao Subject: how to change the memory size of a VM Date: Mon, 2 Nov 2009 15:42:19 -0500 Message-ID: <994429490911021242x476ce517l34b3aa5db2a3157@mail.gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0655771321==" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org --===============0655771321== Content-Type: multipart/alternative; boundary=00032555a196ee5149047769690a --00032555a196ee5149047769690a Content-Type: text/plain; charset=ISO-8859-1 Hi all, I am looking into a problem that when the memory size of a VM is changed which part of the original memory is taken away by xen. For example, if I change the memory size of a VM from 2048MB --> 1024MB, how can I tell which are the 1024M byte that will be taken away (I do not want the xen to take the memory spaces that are caching useful data). The command for memory size reconfiguration is "xm mem-set", so I looked the source code of xm. It turned out to be the following python calls: tools/python/xen/xm/main.py: setMemoryTarget(dom, mem_target) tools/python/xen/xend/XendDomainInfo.py: setMemoryTarget: self._safe_set_memory('memory_dynamic_min', target * MiB) self._safe_set_memory('memory_dynamic_max', target * MiB) --00032555a196ee5149047769690a Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi all,

I am looking into a problem that when the memory size of a V= M is changed which part of the original memory is taken away by xen.
For= example, if I change the memory size of a VM from 2048MB --> 1024MB, ho= w can I tell which are the 1024M byte that will be taken away (I do not wan= t the xen to take the memory spaces that are caching useful data).

The command for memory size reconfiguration is "xm mem-set", = so I looked the source code of xm.
It turned out to be the following pyt= hon calls:

tools/python/xen/xm/main.py: setMemoryTarget(dom, mem_tar= get)
tools/python/xen/xend/XendDomainInfo.py: setMemoryTarget: =A0=A0=A0=A0=A0= =A0=A0 self._safe_set_memory('memory_dynamic_min', target * MiB)=A0=A0=A0=A0=A0=A0=A0 self._safe_set_memory('memory_dynamic_max', = target * MiB)
--00032555a196ee5149047769690a-- --===============0655771321== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --===============0655771321==--