grpc.io icon indicating copy to clipboard operation
grpc.io copied to clipboard

Quick start: I think make -j is not a good idea

Open maxballenger opened this issue 3 years ago • 5 comments

I don't think "make -j" should be recommended in the quick start guide. I just ran this on a moderately resourced VM (4 cores, 8 GB memory) and it ran the VM out of memory, leaving it inaccessible by SSH, probably because the SSH server got starved. I logged in through VMware Workstation and was able to see that there were dozens of cc1plus processes running. "make -j nproc" would be safer I think.

https://grpc.io/docs/languages/cpp/quickstart/

maxballenger avatar Mar 29 '21 00:03 maxballenger

cc @yashykt

sanjaypujare avatar Mar 31 '21 17:03 sanjaypujare

I'll note that the instructions in the quick start guide would not work for everyone. In some cases, we do need to tweak the instructions. I am fine with removing - j from the instructions in this case. Please feel free to send a PR for this.

yashykt avatar Apr 09 '21 22:04 yashykt

Thanks all for your comments.

I'd rather not drop the -j option altogether: doing so makes the build painfully slow IMHO -- especially for a quick start. I prefer @maxballenger's suggestion of including a bound: -j some-number. Or we could add a -l/--max-load option.

@jtattermusch - any thoughts?

chalin avatar Apr 13 '21 11:04 chalin

Thanks all for your comments.

I'd rather not drop the -j option altogether: doing so makes the build painfully slow IMHO -- especially for a quick start. I prefer @maxballenger's suggestion of including a bound: -j some-number. Or we could add a -l/--max-load option.

@jtattermusch - any thoughts?

Yeah, I'd keep -j in some form (-j4 seems fair?). Leaving the resolution up to you. Btw, seeing the machine go OOM because of -j seems odd - how many paraller worker did make end up using?

jtattermusch avatar Apr 16 '21 08:04 jtattermusch

I don't know exactly how many parallel workers make ended up using but it was basically filling up the whole terminal window when I ran top. I think I saw at least 20.

On Fri, Apr 16, 2021 at 1:31 AM Jan Tattermusch @.***> wrote:

Thanks all for your comments.

I'd rather not drop the -j option altogether: doing so makes the build painfully slow IMHO -- especially for a quick start. I prefer @maxballenger https://github.com/maxballenger's suggestion of including a bound: -j some-number. Or we could add a -l/--max-load option https://www.gnu.org/software/make/manual/html_node/Parallel.html#Parallel .

@jtattermusch https://github.com/jtattermusch - any thoughts?

Yeah, I'd keep -j in some form (-j4 seems fair?). Leaving the resolution up to you. Btw, seeing the machine go OOM because of -j seems odd - how many paraller worker did make end up using?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/grpc/grpc.io/issues/740#issuecomment-821014444, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALBPTAI4E3AWL626P4EL3STTI7YWZANCNFSM4Z6TTM4Q .

maxballenger avatar Apr 16 '21 18:04 maxballenger