Big amount of RAM used when building 1.1.16

Hi.

With the last release (1.1.16), I remarked the build process is taking
a lot of RAM, ranging from 1800MB to 3500-4000MB.

Thanks my main build machine has 16GB of RAM, but my mips and mipsel
build machines (QEMU VMs) only have 256MB of RAM. So the systems went on
to crash with an oomkiller. So to be able to build it, I added up to 4GB
of swap space.

I remarked this issue in the following architectures : x86 (32 and 64
bits), powerpc, armel, armhf, mips and mipsel (all the architectures I
currently use).

It occurs for every flavor of the Debian package (light, full and
extras) and the memory usage starts to grow when building
objs/ngx_modules.c like here with nginx-full : gcc -c -Wall -g -O2 -I
src/core -I src/event -I src/event/modules -I src/os/unix -I
/usr/include/libxml2 -I objs -o objs/ngx_modules.o objs/ngx_modules.c

A table summing up the modules present in every nginx flavour is
available here : Nginx - Debian Wiki

So for the moment, this issue is blocking a build in the debian
buildds, and may block many others.

I’m available to do more tests and provide more information if needed.

Thanks.


Cyril “Davromaniak” Lavier
KeyID 59E9A881
http://www.davromaniak.eu

On Wed, Mar 7, 2012 at 9:08 PM, Cyril LAVIER
[email protected] wrote:


It occurs for every flavor of the Debian package (light, full and extras)
and the memory usage starts to grow when building objs/ngx_modules.c like
here with nginx-full : gcc -c -Wall -g -O2 -I src/core -I src/event -I
src/event/modules -I src/os/unix -I /usr/include/libxml2 -I objs -o
objs/ngx_modules.o objs/ngx_modules.c

Note that Logs from Debian buildd are available at:
https://buildd.debian.org/status/fetch.php?pkg=nginx&arch=mipsel&ver=1.1.16-1&stamp=1330873573


Kartik M. | IRC: kart_
{0x1f1f, kartikm}.wordpress.com

On 07.03.2012, at 19:38, Cyril LAVIER wrote:

Hi.

With the last release (1.1.16), I remarked the build process is taking a lot of
RAM, ranging from 1800MB to 3500-4000MB.

Hi,

In current version of rules you have added -j$(NUMJOBS) flag to make,
but NUMJOBS is not defined. make -j without args
do not limit number of jobs. So it looks like a fork bomb.

http://anonscm.debian.org/viewvc/collab-maint/deb-maint/nginx/trunk/debian/rules?r1=19814&r2=19817

On 03/07/2012 05:26 PM, Sergey B. wrote:

On 07.03.2012, at 19:38, Cyril LAVIER wrote:

Hi.

With the last release (1.1.16), I remarked the build process is taking a lot of
RAM, ranging from 1800MB to 3500-4000MB.
Hi,
Hi.
In current version of rules you have added -j$(NUMJOBS) flag to make, but
NUMJOBS is not defined. make -j without args
do not limit number of jobs. So it looks like a fork bomb.

http://anonscm.debian.org/viewvc/collab-maint/deb-maint/nginx/trunk/debian/rules?r1=19814&r2=19817
Thanks for pointing me this error, I didn’t see it when I moved the “-j”
out of the NUMJOBS variable.

So now, if NUMJOBS is not defined, I set it to 1.

Kartik, I will perform the needed commit in the next hours, time for me
to write a clean solution :).

Thanks.

I’m available to do more tests and provide more information if needed.
[email protected]
nginx Info Page


nginx mailing list
[email protected]
nginx Info Page


Cyril “Davromaniak” Lavier
KeyID 59E9A881
http://www.davromaniak.eu