Richard W.M. Jones
2018-May-16 12:43 UTC
[Libguestfs] [PATCH] lib: Increase default memory assigned to the appliance.
Alternate way to fix test-255-disks.sh running out of memory. See previous discussion here: https://www.redhat.com/archives/libguestfs/2018-May/msg00082.html Rich.
Richard W.M. Jones
2018-May-16 12:43 UTC
[Libguestfs] [PATCH] lib: Increase default memory assigned to the appliance.
With recent Linux kernels, adding and partitioning 255 disks causes the appliance to run out of memory. This causes a test failure in tests/disks/test-255-disks.sh. This change gives the appliance enough memory to complete the test. --- lib/guestfs-internal.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/guestfs-internal.h b/lib/guestfs-internal.h index adeb9478a..83eaebe75 100644 --- a/lib/guestfs-internal.h +++ b/lib/guestfs-internal.h @@ -94,7 +94,7 @@ * creating device nodes. */ #ifdef __powerpc__ -# define DEFAULT_MEMSIZE 768 +# define DEFAULT_MEMSIZE 1024 # define MIN_MEMSIZE 256 #endif @@ -104,16 +104,16 @@ * common on aarch64, treat this like the ppc case above. */ #ifdef __aarch64__ -# define DEFAULT_MEMSIZE 768 +# define DEFAULT_MEMSIZE 1024 # define MIN_MEMSIZE 256 #endif /* 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 +# define MIN_MEMSIZE 256 #endif /* Timeout waiting for appliance to come up (seconds). -- 2.15.1
Richard W.M. Jones
2018-May-16 12:47 UTC
Re: [Libguestfs] [PATCH] lib: Increase default memory assigned to the appliance.
On Wed, May 16, 2018 at 01:43:09PM +0100, Richard W.M. Jones wrote:> With recent Linux kernels, adding and partitioning 255 disks causes > the appliance to run out of memory. This causes a test failure in > tests/disks/test-255-disks.sh. This change gives the appliance enough > memory to complete the test. > --- > lib/guestfs-internal.h | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/lib/guestfs-internal.h b/lib/guestfs-internal.h > index adeb9478a..83eaebe75 100644 > --- a/lib/guestfs-internal.h > +++ b/lib/guestfs-internal.h > @@ -94,7 +94,7 @@ > * creating device nodes. > */ > #ifdef __powerpc__ > -# define DEFAULT_MEMSIZE 768 > +# define DEFAULT_MEMSIZE 1024 > # define MIN_MEMSIZE 256We could also remove this definition of MIN_MEMSIZE, and ...> #endif > > @@ -104,16 +104,16 @@ > * common on aarch64, treat this like the ppc case above. > */ > #ifdef __aarch64__ > -# define DEFAULT_MEMSIZE 768 > +# define DEFAULT_MEMSIZE 1024 > # define MIN_MEMSIZE 256... this one too since it will be set below.> #endif > > /* 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 > +# define MIN_MEMSIZE 256 > #endifRich. -- 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
Pino Toscano
2018-May-23 08:27 UTC
Re: [Libguestfs] [PATCH] lib: Increase default memory assigned to the appliance.
On Wednesday, 16 May 2018 14:43:09 CEST Richard W.M. Jones wrote:> With recent Linux kernels, adding and partitioning 255 disks causes > the appliance to run out of memory. This causes a test failure in > tests/disks/test-255-disks.sh. This change gives the appliance enough > memory to complete the test.TBH raising the amount of memory only for those tests is the solution IMHO, since they are very corner cases, and thus it makes sense for them to require extra work. In any case, the current default of memory seems fine for the majority of the use cases, so I'd delay the default change only if strictly needed to work in "usual workloads". -- Pino Toscano
Apparently Analagous Threads
- Re: [PATCH 1/2] increase the default memory size to 768 MB
- [PATCH] lib: Increase default memory assigned to the appliance.
- [PATCH] [repost] build: Remove ./configure --enable-valgrind-daemon.
- [PATCH] lib: Increase default memsize to 1280 (RHBZ#1837765).
- [PATCH v2] lib: Use qemu-img info -U option to avoid locking error.