On Mon, Dec 12, 2011 at 11:53 AM, Eric Blake <eblake@xxxxxxxxxx> wrote:
With a bit of work this could achieve the desired automation. Looks like it will be in oVirt at some point as well.
On 12/11/2011 08:42 PM, Pankaj Rawat wrote:OK, so the process within the guest was killed because it used too much
> Well the process which get killed is the process running on guest trying
> to use memory , It is a simple c program having malloc function to do
> the memory requirement thing(Tested and working)
> The memory given to the guest is 400MB which is less then the maximum
> memory as specified rest of memory is with ballon
memory and triggered the OOM killer in the guest.
I don't know of any documentation that said that. Point us to any URLs
>
> Now the virsh setmem command is correctly working but this has to be
> done manually . Didn't the documentation said that this is a dynamic
> process So each time a guest is running out of memory the host will
> fetch some memory from its own or other guest memory pages and give it
> to the guest which is running out of memory.
that need corrections if you found misleading documentation.
I do know that existing documentation states that guest memory is not
backed by host memory until the guest actually touches the memory (that
is, you can oversubscribe memory among all the guests, and as long as
the guests don't touch all their memory, you won't force the host into
swap), but that is independent from the issue of the memory balloon -
the point of the balloon is that guests can only touch as much memory as
the balloon allows, and not for coordinating which host memory pages
back a guest memory page.
The guest cannot trigger the balloon to request more memory. Basically,
> Well I don't see that
> happening , instead of allocating more memory to guest VM . It is
> killing the process which is requesting more memory.
when the balloon is active, the guest can only use as much memory as is
not claimed by the balloon, and it takes host action to change the size
of the balloon to allow the guest to use more memory. Still, once you
change the size of the balloon, the memory isn't actually allocated to
the guest until the guest touches the page and forces the host to map
another page to the guest to cover that memory use.
I don't think what you are asking for is possible. If you want to
> Can you help how can I achieve such dynamic behavior from the ballon
> driver so that I don't have to run command manually In order to get more
> memory ??
dynamically size guest memory according to guest workload, then in the
host, you will have to periodically check in on guest memory usage and
make a decision in the host to manually change the balloon allocations.
With a bit of work this could achieve the desired automation. Looks like it will be in oVirt at some point as well.
--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list
-- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list