# Big amount of RAM used when building 1.1.16

**URL:** <https://www.ruby-forum.com/t/big-amount-of-ram-used-when-building-1-1-16/217650>\
**Category:** NGINX\
**Created:** [March 7, 2012, 4:39pm UTC](https://www.ruby-forum.com/t/big-amount-of-ram-used-when-building-1-1-16/217650 "2012-03-07T16:39:16Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![luislavena](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/0ea827/32.png) [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Post date:** [March 7, 2012, 4:39pm UTC](https://www.ruby-forum.com/t/big-amount-of-ram-used-when-building-1-1-16/217650/1 "2012-03-07T16:39:16Z")

</div>

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](http://wiki.debian.org/Nginx)

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](http://www.davromaniak.eu)

---

<div class="post-metadata">

**Author:** ![Cyril\_LAVIER](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/dec6dc/32.png) [@Cyril\_LAVIER](https://www.ruby-forum.com/u/Cyril_LAVIER)\
**Post date:** [March 7, 2012, 4:43pm UTC](https://www.ruby-forum.com/t/big-amount-of-ram-used-when-building-1-1-16/217650/2 "2012-03-07T16:43:01Z")

</div>

On Wed, Mar 7, 2012 at 9:08 PM, Cyril LAVIER  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) 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](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

---

<div class="post-metadata">

**Author:** ![Cyril\_LAVIER](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/dec6dc/32.png) [@Cyril\_LAVIER](https://www.ruby-forum.com/u/Cyril_LAVIER)\
**Post date:** [March 7, 2012, 5:27pm UTC](https://www.ruby-forum.com/t/big-amount-of-ram-used-when-building-1-1-16/217650/3 "2012-03-07T17:27:21Z")

</div>

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](http://anonscm.debian.org/viewvc/collab-maint/deb-maint/nginx/trunk/debian/rules?r1=19814&r2=19817)

---

<div class="post-metadata">

**Author:** ![Cyril\_LAVIER](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/dec6dc/32.png) [@Cyril\_LAVIER](https://www.ruby-forum.com/u/Cyril_LAVIER)\
**Post date:** [March 7, 2012, 7:14pm UTC](https://www.ruby-forum.com/t/big-amount-of-ram-used-when-building-1-1-16/217650/4 "2012-03-07T19:14:27Z")

</div>

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](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.  
> > [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> > [mailman.nginx.org archive](http://mailman.nginx.org/mailman/listinfo/nginx)
> 
> * * *
> 
> nginx mailing list  
> [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> [mailman.nginx.org archive](http://mailman.nginx.org/mailman/listinfo/nginx)

–  
Cyril “Davromaniak” Lavier  
KeyID 59E9A881  
[http://www.davromaniak.eu](http://www.davromaniak.eu)
