Richard W.M. Jones
2016-Jun-11 20:35 UTC
Re: [Libguestfs] [PATCH 1/2] increase the default memory size to 768 MB
On Sat, Jun 11, 2016 at 08:51:56PM +0300, Pavel Butsykin wrote:> The appliance memory size of 500 MB is insufficient in certain scenarios. In > partiuclar, semodule (which may be called by a guest tools uninstaller) often > triggers OOM (see https://bugzilla.redhat.com/426775) > > Increase it to 768 MB. > > Signed-off-by: Pavel Butsykin <pbutsykin@virtuozzo.com> > --- > src/guestfs-internal.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/src/guestfs-internal.h b/src/guestfs-internal.h > index 03f1034..1d1b996 100644 > --- a/src/guestfs-internal.h > +++ b/src/guestfs-internal.h > @@ -93,7 +93,7 @@ > > /* The default and minimum memory size for most users. */ > #ifndef DEFAULT_MEMSIZE > -# define DEFAULT_MEMSIZE 500 > +# define DEFAULT_MEMSIZE 768 > #endif > #ifndef MIN_MEMSIZE > # define MIN_MEMSIZE 128If only we had a more sensible way to allocate memory :-( Anyway, this patch needs to remove the earlier lines which set DEFAULT_MEMSIZE to 768 on __powerpc__ and __aarch64__. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-p2v converts physical machines to virtual machines. Boot with a live CD or over the network (PXE) and turn machines into KVM guests. http://libguestfs.org/virt-v2v
Richard W.M. Jones
2016-Jun-12 12:01 UTC
Re: [Libguestfs] [PATCH 1/2] increase the default memory size to 768 MB
On Sat, Jun 11, 2016 at 09:35:40PM +0100, Richard W.M. Jones wrote:> On Sat, Jun 11, 2016 at 08:51:56PM +0300, Pavel Butsykin wrote: > > The appliance memory size of 500 MB is insufficient in certain scenarios. In > > partiuclar, semodule (which may be called by a guest tools uninstaller) often > > triggers OOM (see https://bugzilla.redhat.com/426775) > > > > Increase it to 768 MB. > > > > Signed-off-by: Pavel Butsykin <pbutsykin@virtuozzo.com> > > --- > > src/guestfs-internal.h | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/src/guestfs-internal.h b/src/guestfs-internal.h > > index 03f1034..1d1b996 100644 > > --- a/src/guestfs-internal.h > > +++ b/src/guestfs-internal.h > > @@ -93,7 +93,7 @@ > > > > /* The default and minimum memory size for most users. */ > > #ifndef DEFAULT_MEMSIZE > > -# define DEFAULT_MEMSIZE 500 > > +# define DEFAULT_MEMSIZE 768 > > #endif > > #ifndef MIN_MEMSIZE > > # define MIN_MEMSIZE 128 > > If only we had a more sensible way to allocate memory :-( > > Anyway, this patch needs to remove the earlier lines which set > DEFAULT_MEMSIZE to 768 on __powerpc__ and __aarch64__.When I thought about this a bit more, I think what you want is to just increase the memory limit for virt-v2v. How about the attached? (Only compile tested.) Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com libguestfs lets you edit virtual machines. Supports shell scripting, bindings from many languages. http://libguestfs.org
Richard W.M. Jones
2016-Jun-14 09:23 UTC
Re: [Libguestfs] [PATCH 1/2] increase the default memory size to 768 MB
On Tue, Jun 14, 2016 at 11:56:16AM +0300, Pavel Butsykin wrote:> Yes, that's right, I'm just here to follow the rule - the simpler the > better :) Your solution is more correct, because it allows to go to the > next step, to make this knowledge outward. The caller may know better > need extra memory or not. For example, in the context of this issue, we > do not need additional memory for windows guests.FWIW this is the final patch I went with: https://github.com/libguestfs/libguestfs/commit/08f82f2e3d6975b72340dd59f438862e152a15ef It will allocate 800MB on x86-64. Note that actual usage should be smaller since KVM will allocate the RAM only if the guest tries to use it. Also we have a few tricks coming soon like using DAX in the next version of qemu[1]. It's difficult to make the amount vary by guest type, since virt-v2v doesn't know the guest type until it has inspected it, which happens after the appliance has been launched. Rich. [1] https://www.redhat.com/archives/libguestfs/2016-May/msg00138.html -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com libguestfs lets you edit virtual machines. Supports shell scripting, bindings from many languages. http://libguestfs.org
Apparently Analagous Threads
- [PATCH] lib: Increase default memory assigned to the appliance.
- [PATCH] lib: Increase default memory assigned to the appliance.
- [PATCH] lib: Increase default memsize to 1280 (RHBZ#1837765).
- [PATCH v2 1/9] build: Remove ./configure --enable-valgrind-daemon.
- [PATCH] [repost] build: Remove ./configure --enable-valgrind-daemon.