[ 
https://issues.apache.org/jira/browse/MESOS-1082?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13937376#comment-13937376
 ] 

David Guill commented on MESOS-1082:
------------------------------------

I can't say I agree with the official documentation's recommendation that "make 
-j" (as opposed to "make -jn") should be used for building Mesos. This case 
demonstrates the primary reason.

The -j option allows make to spawn more processes to help with the build. If 
it's used with a number after (i.e. "make -j4"), it will spawn up to that many 
processes. I believe using the -j option without a number allows make to spawn 
as many processes as it wants. Limitations of memory and core count don't 
appear to be considered in its decision.

You're generally better off using "make -jn", where (# of cores) ≤ n ≤ 2*(# of 
cores). But make processes during a Mesos build generally seem to take roughly 
150 to 300 MB each, which should be considered if your system has a lot of 
cores, but not so much physical memory.

Of course, if you're compiling Mesos on a machine with 8+ cores and 6+ GB of 
physical memory, it won't make a noticeable difference if you use "make -j" 
without a number.

> Make fails on AWS Ubuntu 12.04 and 13.10
> ----------------------------------------
>
>                 Key: MESOS-1082
>                 URL: https://issues.apache.org/jira/browse/MESOS-1082
>             Project: Mesos
>          Issue Type: Bug
>          Components: build, ec2
>    Affects Versions: 0.17.0
>         Environment: AWS Instance, Ubuntu 12.04, Ubuntu 13.10
>            Reporter: Flavian Alexandru
>            Priority: Blocker
>              Labels: build
>             Fix For: 0.19.0
>
>   Original Estimate: 3h
>  Remaining Estimate: 3h
>
> Following the official guidelines for Mesos 0.17 results in a build error.
> The error occurs for :: {code} make -j {code}
> {code}
> make[9]: Leaving directory 
> `/home/ubuntu/mesos-0.17.0/build/3rdparty/libprocess/3rdparty/protobuf-2.5.0/src'
> make[8]: *** [all-recursive] Error 1
> make[8]: Leaving directory 
> `/home/ubuntu/mesos-0.17.0/build/3rdparty/libprocess/3rdparty/protobuf-2.5.0'
> make[7]: *** [all] Error 2
> make[7]: Leaving directory 
> `/home/ubuntu/mesos-0.17.0/build/3rdparty/libprocess/3rdparty/protobuf-2.5.0'
> make[6]: *** [protobuf-2.5.0-build-stamp] Error 2
> make[6]: Leaving directory 
> `/home/ubuntu/mesos-0.17.0/build/3rdparty/libprocess/3rdparty'
> make[5]: *** [all-recursive] Error 1
> make[5]: Leaving directory 
> `/home/ubuntu/mesos-0.17.0/build/3rdparty/libprocess/3rdparty'
> make[4]: *** [all] Error 2
> make[4]: Leaving directory 
> `/home/ubuntu/mesos-0.17.0/build/3rdparty/libprocess/3rdparty'
> make[3]: *** [all-recursive] Error 1
> make[3]: Leaving directory 
> `/home/ubuntu/mesos-0.17.0/build/3rdparty/libprocess'
> make[2]: *** [all-recursive] Error 1
> make[2]: Leaving directory `/home/ubuntu/mesos-0.17.0/build/3rdparty'
> make[1]: *** [all] Error 2
> make[1]: Leaving directory `/home/ubuntu/mesos-0.17.0/build/3rdparty'
> make: *** [all-recursive] Error 1
> {code}



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to