Mailing List Archive

Xen ballooning problem.
Hello.
Is it true that "Xen ballooning" has some problems? For example, when it dedicate memory to VMs then it can't release it and back it to the host and it is a reason for migrate from Xen to KVM.

Thank you.

_______________________________________________
Xen-users mailing list
Xen-users@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-users
Re: Xen ballooning problem. [ In reply to ]
Hi,

On Fri, Dec 15, 2017 at 01:28:22PM +0000, Jason Long wrote:
> Hello.
> Is it true that "Xen ballooning" has some problems? For example, when it dedicate memory to VMs then it can't release it and back it to the host and it is a reason for migrate from Xen to KVM.
>
> Thank you.

I have found a few combinations of xen/kernel which don't work well but otherwise I find it works for my case.
Currently xen 4.9.1, 4.1.47 dom0 kernel, mix of Ubuntu 16.04 4.4 and 4.14 kernels in pv guests. I use the tmem
module to automatically balloon the guest up/down as memory pressure changes.

James

_______________________________________________
Xen-users mailing list
Xen-users@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-users
Re: Xen ballooning problem. [ In reply to ]
Can it work well? I mean is release the memory and back it to host.
--------------------------------------------
On Fri, 12/15/17, James Dingwall <james@dingwall.me.uk> wrote:

Subject: Re: [Xen-users] Xen ballooning problem.
To: "Jason Long" <hack3rcon@yahoo.com>
Cc: xen-users@lists.xen.org
Date: Friday, December 15, 2017, 5:29 PM

Hi,

On Fri, Dec 15, 2017 at
01:28:22PM +0000, Jason Long wrote:
>
Hello.
> Is it true that "Xen
ballooning" has some problems? For example, when it
dedicate memory to VMs then it can't release it and back
it to the host and it is a reason for migrate from Xen to
KVM.
>
> Thank
you.

I have found a
few combinations of xen/kernel which don't work well but
otherwise I find it works for my case. 
Currently xen 4.9.1, 4.1.47 dom0 kernel, mix of
Ubuntu 16.04 4.4 and 4.14 kernels in pv guests.  I use the
tmem
module to automatically balloon the
guest up/down as memory pressure changes.

James

-----Inline Attachment Follows-----



_______________________________________________
Xen-users mailing list
Xen-users@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-users
Re: Xen ballooning problem. [ In reply to ]
Jason,

Yes, I'm afraid it's true. This does in your case constitute a reason to
migrate from Xen to KVM. If along with this you decide to migrate from the
Xen-users mailing list to somewhere else, we'll all certainly be sorry to
see you go, but we understand that it's a sacrifice you might be willing to
make and wish you all the best of luck with your transition.

Regards,

On Fri, Dec 15, 2017 at 10:18 PM, Jason Long <hack3rcon@yahoo.com> wrote:

> Can it work well? I mean is release the memory and back it to host.
> --------------------------------------------
> On Fri, 12/15/17, James Dingwall <james@dingwall.me.uk> wrote:
>
> Subject: Re: [Xen-users] Xen ballooning problem.
> To: "Jason Long" <hack3rcon@yahoo.com>
> Cc: xen-users@lists.xen.org
> Date: Friday, December 15, 2017, 5:29 PM
>
> Hi,
>
> On Fri, Dec 15, 2017 at
> 01:28:22PM +0000, Jason Long wrote:
> >
> Hello.
> > Is it true that "Xen
> ballooning" has some problems? For example, when it
> dedicate memory to VMs then it can't release it and back
> it to the host and it is a reason for migrate from Xen to
> KVM.
> >
> > Thank
> you.
>
> I have found a
> few combinations of xen/kernel which don't work well but
> otherwise I find it works for my case.
> Currently xen 4.9.1, 4.1.47 dom0 kernel, mix of
> Ubuntu 16.04 4.4 and 4.14 kernels in pv guests. I use the
> tmem
> module to automatically balloon the
> guest up/down as memory pressure changes.
>
> James
>
> -----Inline Attachment Follows-----
>
>
>
> _______________________________________________
> Xen-users mailing list
> Xen-users@lists.xenproject.org
> https://lists.xenproject.org/mailman/listinfo/xen-users
>
Re: Xen ballooning problem. [ In reply to ]
Hi Jason,

On Fri, Dec 15, 2017 at 09:18:14PM +0000, Jason Long wrote:
> Can it work well? I mean is release the memory and back it to host.

If I understand correctly you want to take memory from one running guest and then assign it to another? Yes, this is works. The tmem module helps you do this
automatically but as an example you can also do:

You want to start guest 3 but you only have 512M free memory, you are happy to take 256M from guests 1 & 2:

guest 1: memory = 1024
guest 2: memory = 1024
guest 3: memory = 1024


xl mem-set guest1 768
xl mem-set guest2 768
xl create guest3

James


> --------------------------------------------
> On Fri, 12/15/17, James Dingwall <james@dingwall.me.uk> wrote:
>
> Subject: Re: [Xen-users] Xen ballooning problem.
> To: "Jason Long" <hack3rcon@yahoo.com>
> Cc: xen-users@lists.xen.org
> Date: Friday, December 15, 2017, 5:29 PM
>
> Hi,
>
> On Fri, Dec 15, 2017 at
> 01:28:22PM +0000, Jason Long wrote:
> >
> Hello.
> > Is it true that "Xen
> ballooning" has some problems? For example, when it
> dedicate memory to VMs then it can't release it and back
> it to the host and it is a reason for migrate from Xen to
> KVM.
> >
> > Thank
> you.
>
> I have found a
> few combinations of xen/kernel which don't work well but
> otherwise I find it works for my case. 
> Currently xen 4.9.1, 4.1.47 dom0 kernel, mix of
> Ubuntu 16.04 4.4 and 4.14 kernels in pv guests.  I use the
> tmem
> module to automatically balloon the
> guest up/down as memory pressure changes.
>
> James
>
> -----Inline Attachment Follows-----
>
>
>
> _______________________________________________
> Xen-users mailing list
> Xen-users@lists.xenproject.org
> https://lists.xenproject.org/mailman/listinfo/xen-users

_______________________________________________
Xen-users mailing list
Xen-users@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-users
Re: Xen ballooning problem. [ In reply to ]
Thank you for your reply but I mean is "KVM is also the better option for memory ballooning according to most users who accuse XEN of not returning unused RAM that has been previously shared with other VMs. KVM, unlike XEN is close to dedicated servers and users claim that KVM is way faster. Many users also admire the fact that KVM is more frequently updated which in turn leads to firmer security."
Please see "https://cloudcone.com/blog/kvm-vs-xen-knowing-the-differences-and-picking-the-best/".



On Tuesday, December 19, 2017, 2:04:58 AM PST, James Dingwall <james-xen@dingwall.me.uk> wrote:

Hi Jason,

On Fri, Dec 15, 2017 at 09:18:14PM +0000, Jason Long wrote:
> Can it work well? I mean is release the memory and back it to host.

If I understand correctly you want to take memory from one running guest and then assign it to another?  Yes, this is works.  The tmem module helps you do this
automatically but as an example you can also do:

You want to start guest 3 but you only have 512M free memory, you are happy to take 256M from guests 1 & 2:

guest 1: memory = 1024
guest 2: memory = 1024
guest 3: memory = 1024


xl mem-set guest1 768
xl mem-set guest2 768
xl create guest3

James


> --------------------------------------------
> On Fri, 12/15/17, James Dingwall <james@dingwall.me.uk> wrote:
>
>  Subject: Re: [Xen-users] Xen ballooning problem.
>  To: "Jason Long" <hack3rcon@yahoo.com>
>  Cc: xen-users@lists.xen.org
>  Date: Friday, December 15, 2017, 5:29 PM

>  Hi,

>  On Fri, Dec 15, 2017 at
>  01:28:22PM +0000, Jason Long wrote:
>  >
>  Hello.
>  > Is it true that "Xen
>  ballooning" has some problems? For example, when it
>  dedicate memory to VMs then it can't release it and back
>  it to the host and it is a reason for migrate from Xen to
>  KVM.
>  >
>  > Thank
>  you.

>  I have found a
>  few combinations of xen/kernel which don't work well but
>  otherwise I find it works for my case. 
>  Currently xen 4.9.1, 4.1.47 dom0 kernel, mix of
>  Ubuntu 16.04 4.4 and 4.14 kernels in pv guests.  I use the
>  tmem
>  module to automatically balloon the
>  guest up/down as memory pressure changes.

>  James

>  -----Inline Attachment Follows-----


>
> _______________________________________________
> Xen-users mailing list
> Xen-users@lists.xenproject.org
> https://lists.xenproject.org/mailman/listinfo/xen-users

_______________________________________________
Xen-users mailing list
Xen-users@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-users
Re: Xen ballooning problem. [ In reply to ]
On Tuesday, December 19, 2017 5:22:39 PM CET Jason Long wrote:
> Thank you for your reply but I mean is "KVM is also the better option for
> memory ballooning according to most users who accuse XEN of not returning
> unused RAM that has been previously shared with other VMs. KVM, unlike XEN
> is close to dedicated servers and users claim that KVM is way faster. Many
> users also admire the fact that KVM is more frequently updated which in
> turn leads to firmer security." Please see
> "https://cloudcone.com/blog/kvm-vs-xen-knowing-the-differences-and-picking-> the-best/".

I think the " not returning " part comes from people who don't fully
understand how Xen works.

With Xen, even the "host" is a guest. (Dom0)
In most default installations, the dom0 starts with all the memory. When you
start a new VM, the required memory is removed from the dom0 and given to the
VM.
When the VM is stopped, the memory is not automagically handed back to the
dom0. You need to do this yourself (or add it to your management toolkit).

I set up my Dom0's to a fixed amount of memory and disable the ballooning part
as this makes more sense in this context.

KVM works ontop of the host, which means that when memory is released by a VM,
it does go back to the host.

KVM is not closer to the hardware than Xen is. But with KVM, the host is
closer than the dom0. Which does mean that any benchmarking on the host itself
is likely showing a slight performance benefit.
When looking at the VMs, however, I would doubt KVM to be better performing.

The main reason why I am preferring Xen over KVM is the ability to create true
snapshots (eg. including RAM) and being able to create a seperate storage
domain. I have not seen a similar option in KVM.

--
Joost

_______________________________________________
Xen-users mailing list
Xen-users@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-users
Re: Xen ballooning problem. [ In reply to ]
On Tuesday, December 19, 2017 5:22:39 PM CET Jason Long wrote:
> "https://cloudcone.com/blog/kvm-vs-xen-knowing-the-differences-and-picking-> the-best/".

After reading this, I am still wondering about the actual reasons.
It sounds like Cloudcone based their decision on some random remarks and
nothing substantial.

There is no mention of actual differences and why either of the 2 would be
best. (Apart from mentioning Xen is proven technology and KVM is catching up)

--
Joost

_______________________________________________
Xen-users mailing list
Xen-users@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-users
Re: Xen ballooning problem. [ In reply to ]
On Tue, Dec 19, 2017 at 4:22 PM, Jason Long <hack3rcon@yahoo.com> wrote:
> Thank you for your reply but I mean is "KVM is also the better option for
> memory ballooning according to most users who accuse XEN of not returning
> unused RAM that has been previously shared with other VMs. KVM, unlike XEN
> is close to dedicated servers and users claim that KVM is way faster. Many
> users also admire the fact that KVM is more frequently updated which in turn
> leads to firmer security."

Jason,

A more helpful way of asking your original question would probably
have been something like this:

---
I read a blog post [1] about KVM vs Xen, which claimed that Xen
doesn't return a VM's RAM to dom0 after the VM is destroyed. Is that
true?

[1] http://blah-blah-blah
---

As someone else has said, that claim is in part based on a
misunderstanding of how Xen works.

Domain 0 is a guest like any other guest. If you're running in
'autoballoon' mode (which is the default), when you create a guest,
domain 0 may give up RAM to Xen to create the guest. When the guest
is destroyed, that memory is given back to Xen, but not given back to
domain 0 unless it asks for it back.

You can tell domain 0 to ask for it back by using the following command:
xl mem-set 0 [target megabytes]

Arguably autoballoon should do that automatically. But nobody has
ever complained *to the developers* about this before, and so it
hasn't occurred to anybody to fix it. Most of us disable autoballoon,
and assign dom0 a fixed amount of memory instead (e.g., by adding
dom0_mem=1024M to the Xen command line).

I would agree that if you just want to start a few toy VMs on your
desktop, KVM is a better choice than Xen.

I have no idea what "close to dedicated servers" is supposed to mean,
but the argument about security is completely bogus. One of the most
important things for security is to be told about security issues so
you can update, and KVM as a project doesn't do this at all.

-George

_______________________________________________
Xen-users mailing list
Xen-users@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-users