Hi, I am new to XCP, and I have some queries. 1. when I create a VM I am allocating memory for this one, my question is : Is this memory is reserved to that VM even if it is down?and if yes how can I use this memory for another VM while it is down? 2. If I have xen host with 12G RAM and I want to create 3 VMs on that host what is the maximum value for RAM size I can use to leave enough memory for the XEN host to work fine? 3.If many hosts joined a pool lets say 3 hosts each with 12G RAM and each one has its local SR (no shared storage). Can I create a VM with more than 12G RAM and specify a sr of one host for it? the answers of these questions will light my life :( Thanks for any help _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
inas mohamed wrote:>1. when I create a VM I am allocating memory for this one, my >question is : Is this memory is reserved to that VM even if it is >down?and if yes how can I use this memory for another VM while it is >down?The memory is reserved for the VM while it is running, but is available if the VM is stopped. I believe that at the moment, there is no dynamic memory usage - ie you cannot overcommit and have memory automatically moved between VMs. But there is a mechanism called ballooning which allows memory to be dynamically altered (at least for PV guests, not sure about HV guests) - so you can manually balloon down memory on one guest and reuse it in another. I think there is work going on with a view to automating this, but if you stop and think what''s involved, it''s a very non-trivial task.>2. If I have xen host with 12G RAM and I want to create 3 VMs on >that host what is the maximum value for RAM size I can use to leave >enough memory for the XEN host to work fine?Depending what you are doing in the host, about 512M should be fine. It''s worth adding a "dom0_mem=512M" statement in your bootloader* so that the Dom0 kernel sets it''s table sizes according to the memory it will be using rather than the memory in themachine. * As in "kernel /xen-x.x.x-amd64.gz dom0_mem=512M">3.If many hosts joined a pool lets say 3 hosts each with 12G RAM and >each one has its local SR (no shared storage). Can I create a VM >with more than 12G RAM and specify a sr of one host for it?No, you cannot share ram across hosts. On a host with 12G ram, you''ll be limited to something like 11G for a single VM - allowing 1/2G for the host itself, and some overhead (not sure how much) for Xen. When setting up your guest, it is worth setting "memory" and "mexmem" - memory is how much the guest will be started with, mexmem is the upper limit it can be ballooned to. Using the old style config files, it would be set like this - dunno about XCP : memory = ''256'' maxmem = ''512'' -- Simon Hobson Visit http://www.magpiesnestpublishing.co.uk/ for books by acclaimed author Gladys Hobson. Novels - poetry - short stories - ideal as Christmas stocking fillers. Some available as e-books. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Tue, Mar 8, 2011 at 1:53 PM, inas mohamed <inas_2003@yahoo.com> wrote:> > Hi, > I am new to XCP, and I have some queries.my comments below are generic to Xen, but should apply to XCP as well.> 1. when I create a VM I am allocating memory for this one, my question is : Is this memory is reserved to that VM even if it is down?No> and if yes how can I use this memory for another VM while it is down?Just start another domU> 2. If I have xen host with 12G RAM and I want to create 3 VMs on that host what is the maximum value for RAM size I can use to leave enough memory for the XEN host to work fine?That depends. When using bare RHEL dom0, I used to be able to run dom0 using only 512MB. Now that I have zfs on it, even 1.5GB doesn''t seem enough. CMIIW, I think XCP already limits how much memory the dom0 (you call it "Xen host") will use, so from users'' perspective you can just start domUs until it complains not enough memory.> 3.If many hosts joined a pool lets say 3 hosts each with 12G RAM and each one has its local SR (no shared storage). Can I create a VM with more than 12G RAM and specify a sr of one host for it?Nope. -- Fajar _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Thanks for all, 1. But if this is the case what is the benefit of using a resource pool?? 2. You said if VM is down it will release the RAM. why when I tried to find free memory on the host (using free -m) I am not be able to see more free memory? actually even the total memory is not correct.So, the correct question is how to find the total and free physical memory on XCP host?? Thanks again for helping me. --- On Tue, 3/8/11, Simon Hobson <linux@thehobsons.co.uk> wrote: From: Simon Hobson <linux@thehobsons.co.uk> Subject: Re: [Xen-users] I need some answers please To: xen-users@lists.xensource.com Date: Tuesday, March 8, 2011, 9:34 AM inas mohamed wrote:> 1. when I create a VM I am allocating memory for this one, my question is : Is this memory is reserved to that VM even if it is down?and if yes how can I use this memory for another VM while it is down?The memory is reserved for the VM while it is running, but is available if the VM is stopped. I believe that at the moment, there is no dynamic memory usage - ie you cannot overcommit and have memory automatically moved between VMs. But there is a mechanism called ballooning which allows memory to be dynamically altered (at least for PV guests, not sure about HV guests) - so you can manually balloon down memory on one guest and reuse it in another. I think there is work going on with a view to automating this, but if you stop and think what''s involved, it''s a very non-trivial task.> 2. If I have xen host with 12G RAM and I want to create 3 VMs on that host what is the maximum value for RAM size I can use to leave enough memory for the XEN host to work fine?Depending what you are doing in the host, about 512M should be fine. It''s worth adding a "dom0_mem=512M" statement in your bootloader* so that the Dom0 kernel sets it''s table sizes according to the memory it will be using rather than the memory in themachine. * As in "kernel /xen-x.x.x-amd64.gz dom0_mem=512M"> 3.If many hosts joined a pool lets say 3 hosts each with 12G RAM and each one has its local SR (no shared storage). Can I create a VM with more than 12G RAM and specify a sr of one host for it?No, you cannot share ram across hosts. On a host with 12G ram, you''ll be limited to something like 11G for a single VM - allowing 1/2G for the host itself, and some overhead (not sure how much) for Xen. When setting up your guest, it is worth setting "memory" and "mexmem" - memory is how much the guest will be started with, mexmem is the upper limit it can be ballooned to. Using the old style config files, it would be set like this - dunno about XCP : memory = ''256'' maxmem = ''512'' -- Simon Hobson Visit http://www.magpiesnestpublishing.co.uk/ for books by acclaimed author Gladys Hobson. Novels - poetry - short stories - ideal as Christmas stocking fillers. Some available as e-books. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
inas mohamed wrote:>1. But if this is the case what is the benefit of using a resource pool??Not sure what the question is here. You have a real machine with X amount of memory. By the time you''ve allowed some for Xen and Dom0, you have Y left over. You can snow start guests that use up to Y memory between them. If you shut one down, you can reuse it''s memory for another guest. If things get unbalanced, you can move a guest to another host that has more free memory - and given the right setup this can be a live migration. If you find you need to start another guest, then (depending on the systems) you may be able to squeeze enough memory by ballooning the other guests down a bit.>2. You said if VM is down it will release the RAM. why when I tried >to find free memory on the host (using free -m) I am not be able to >see more free memory? actually even the total memory is not >correct.So, the correct question is how to find the total and free >physical memory on XCP host??Don''t forget that the Dom0 kernel is also running as a (PV) virtual machine. It will only see the memory given to it by Xen - none of the normal GNU/Linux tools will show you real memory utilisation for the host machine. Not sure where else to find the memory utilisation, but it is shown by xentop. -- Simon Hobson Visit http://www.magpiesnestpublishing.co.uk/ for books by acclaimed author Gladys Hobson. Novels - poetry - short stories - ideal as Christmas stocking fillers. Some available as e-books. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
thanks for your reply. Can I understand from your answer that the resource pool benefit is for moving VM from one XCP host to another . And not sharing their resources so I can create VM with RAM size equal to the summation of two XCP hosts RAM size??? Thanks --- On Tue, 3/8/11, Simon Hobson <linux@thehobsons.co.uk> wrote: From: Simon Hobson <linux@thehobsons.co.uk> Subject: Re: [Xen-users] I need some answers please To: xen-users@lists.xensource.com Date: Tuesday, March 8, 2011, 12:13 PM inas mohamed wrote:> 1. But if this is the case what is the benefit of using a resource pool??Not sure what the question is here. You have a real machine with X amount of memory. By the time you''ve allowed some for Xen and Dom0, you have Y left over. You can snow start guests that use up to Y memory between them. If you shut one down, you can reuse it''s memory for another guest. If things get unbalanced, you can move a guest to another host that has more free memory - and given the right setup this can be a live migration. If you find you need to start another guest, then (depending on the systems) you may be able to squeeze enough memory by ballooning the other guests down a bit.> 2. You said if VM is down it will release the RAM. why when I tried to find free memory on the host (using free -m) I am not be able to see more free memory? actually even the total memory is not correct.So, the correct question is how to find the total and free physical memory on XCP host??Don''t forget that the Dom0 kernel is also running as a (PV) virtual machine. It will only see the memory given to it by Xen - none of the normal GNU/Linux tools will show you real memory utilisation for the host machine. Not sure where else to find the memory utilisation, but it is shown by xentop. -- Simon Hobson Visit http://www.magpiesnestpublishing.co.uk/ for books by acclaimed author Gladys Hobson. Novels - poetry - short stories - ideal as Christmas stocking fillers. Some available as e-books. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
A: Because it messes up the order in which people normally read text. A: Top-posting. inas mohamed wrote:>thanks for your reply. > >Can I understand from your answer that the resource pool benefit is >for moving VM from one XCP host to another . And not sharing their >resources so I can create VM with RAM size equal to the summation of >two XCP hosts RAM size???I''m not familiar with XCP, but I''d guess that''s the case Q: Why is top-posting such a bad thing? Q: What is the most annoying thing in e-mail? -- Simon Hobson Visit http://www.magpiesnestpublishing.co.uk/ for books by acclaimed author Gladys Hobson. Novels - poetry - short stories - ideal as Christmas stocking fillers. Some available as e-books. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Yes, the point of a pool is to be able to move a VM between physical nodes. You cannot span one VM across multiple physical nodes. That is not how virtualization works. For example, if you own two 8GB XCP hosts, you cannot create one big 16GB VM. It simply does not work that way. What you could do is create VMs that were smaller than the RAM size of the physical nodes. For example, you could create several 1GB VM and then move them between the XCP hosts as needed. -----Original Message----- From: xen-users-bounces@lists.xensource.com [mailto:xen-users-bounces@lists.xensource.com] On Behalf Of inas mohamed Sent: Tuesday, March 08, 2011 4:35 AM To: xen-users@lists.xensource.com; Simon Hobson Subject: Re: [Xen-users] I need some answers please thanks for your reply. Can I understand from your answer that the resource pool benefit is for moving VM from one XCP host to another . And not sharing their resources so I can create VM with RAM size equal to the summation of two XCP hosts RAM size??? Thanks --- On Tue, 3/8/11, Simon Hobson <linux@thehobsons.co.uk> wrote: From: Simon Hobson <linux@thehobsons.co.uk> Subject: Re: [Xen-users] I need some answers please To: xen-users@lists.xensource.com Date: Tuesday, March 8, 2011, 12:13 PM inas mohamed wrote:> 1. But if this is the case what is the benefit of using a resource pool??Not sure what the question is here. You have a real machine with X amount of memory. By the time you''ve allowed some for Xen and Dom0, you have Y left over. You can snow start guests that use up to Y memory between them. If you shut one down, you can reuse it''s memory for another guest. If things get unbalanced, you can move a guest to another host that has more free memory - and given the right setup this can be a live migration. If you find you need to start another guest, then (depending on the systems) you may be able to squeeze enough memory by ballooning the other guests down a bit.> 2. You said if VM is down it will release the RAM. why when I tried tofind free memory on the host (using free -m) I am not be able to see more free memory? actually even the total memory is not correct.So, the correct question is how to find the total and free physical memory on XCP host?? Don''t forget that the Dom0 kernel is also running as a (PV) virtual machine. It will only see the memory given to it by Xen - none of the normal GNU/Linux tools will show you real memory utilisation for the host machine. Not sure where else to find the memory utilisation, but it is shown by xentop. -- Simon Hobson Visit http://www.magpiesnestpublishing.co.uk/ for books by acclaimed author Gladys Hobson. Novels - poetry - short stories - ideal as Christmas stocking fillers. Some available as e-books. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
inas mohamed wrote:>Can I understand from your answer that the resource pool benefit is >for moving VM from one XCP host to another .And another thought ... Having a pool of multiple host servers allows you to have a management system that can create VMs on the fly (eg on demand from a customer control panel type of thing) - and it can create the VM on any server with sufficient resources. -- Simon Hobson Visit http://www.magpiesnestpublishing.co.uk/ for books by acclaimed author Gladys Hobson. Novels - poetry - short stories - ideal as Christmas stocking fillers. Some available as e-books. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Thanks so much for clearing every thing. --- On Tue, 3/8/11, admin@xenhive.com <admin@xenhive.com> wrote: From: admin@xenhive.com <admin@xenhive.com> Subject: RE: [Xen-users] I need some answers please To: "''inas mohamed''" <inas_2003@yahoo.com>, xen-users@lists.xensource.com, "''Simon Hobson''" <linux@thehobsons.co.uk> Date: Tuesday, March 8, 2011, 5:53 PM Yes, the point of a pool is to be able to move a VM between physical nodes. You cannot span one VM across multiple physical nodes. That is not how virtualization works. For example, if you own two 8GB XCP hosts, you cannot create one big 16GB VM. It simply does not work that way. What you could do is create VMs that were smaller than the RAM size of the physical nodes. For example, you could create several 1GB VM and then move them between the XCP hosts as needed. -----Original Message----- From: xen-users-bounces@lists.xensource.com [mailto:xen-users-bounces@lists.xensource.com] On Behalf Of inas mohamed Sent: Tuesday, March 08, 2011 4:35 AM To: xen-users@lists.xensource.com; Simon Hobson Subject: Re: [Xen-users] I need some answers please thanks for your reply. Can I understand from your answer that the resource pool benefit is for moving VM from one XCP host to another . And not sharing their resources so I can create VM with RAM size equal to the summation of two XCP hosts RAM size??? Thanks --- On Tue, 3/8/11, Simon Hobson <linux@thehobsons.co.uk> wrote: From: Simon Hobson <linux@thehobsons.co.uk> Subject: Re: [Xen-users] I need some answers please To: xen-users@lists.xensource.com Date: Tuesday, March 8, 2011, 12:13 PM inas mohamed wrote: > 1. But if this is the case what is the benefit of using a resource pool?? Not sure what the question is here. You have a real machine with X amount of memory. By the time you''ve allowed some for Xen and Dom0, you have Y left over. You can snow start guests that use up to Y memory between them. If you shut one down, you can reuse it''s memory for another guest. If things get unbalanced, you can move a guest to another host that has more free memory - and given the right setup this can be a live migration. If you find you need to start another guest, then (depending on the systems) you may be able to squeeze enough memory by ballooning the other guests down a bit. > 2. You said if VM is down it will release the RAM. why when I tried to find free memory on the host (using free -m) I am not be able to see more free memory? actually even the total memory is not correct.So, the correct question is how to find the total and free physical memory on XCP host?? Don''t forget that the Dom0 kernel is also running as a (PV) virtual machine. It will only see the memory given to it by Xen - none of the normal GNU/Linux tools will show you real memory utilisation for the host machine. Not sure where else to find the memory utilisation, but it is shown by xentop. -- Simon Hobson Visit http://www.magpiesnestpublishing.co.uk/ for books by acclaimed author Gladys Hobson. Novels - poetry - short stories - ideal as Christmas stocking fillers. Some available as e-books. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users -----Inline Attachment Follows----- _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users