that is also the point I want to make. I think we should add some more description on man-page of "make -j" parameters, for example: - If the -j option is given without an argument, make will not limit the number of jobs that can run simultaneously. + If the -j option is given without an argument, make will not limit the number of jobs that can run simultaneously, + but which is easy to cause the system overload and hang. It’s not recommended.
btw there is an internal limit, which is 4096 jobs, either on my mainframe or PC. If I use "-j 4097" it will complain: [root@lion linux-3.3.0-0.20.el7]# make -j 4097 make: More parallel jobs (-jN) than this platform can handle requested. make: Resetting to single job (-j1) mode. however this limit number is far too large, easily brings my machine down ... Thanks, -Warner -----Original Message----- From: Eli Zaretskii [mailto:e...@gnu.org] Sent: 2012年12月14日 PM 11:07 To: psm...@gnu.org Cc: Wang, Warner; Bug-make@gnu.org Subject: Re: need help on "make -j" parameter, it will let the system hung easily. > From: Paul Smith <psm...@gnu.org> > Date: Fri, 14 Dec 2012 09:59:31 -0500 > Cc: "Bug-make@gnu.org" <Bug-make@gnu.org> > > This basically says that if you use "-j" with no arguments, make will > run as many jobs as the _makefile_ allows (defined by your > prerequisite rules). It pays no attention to the limits of your system. > > So in an environment (like the Linux kernel) where there are tons of > source files that need to be compiled and they do not depend on each > other, using "-j" with no limit means make will attempt to fork all of > them at the same time. That could be, in a large codebase, 100's of > compiles all trying to run at the same time. Does it even make sense to use -j with no arguments? Should we perhaps remove that possibility, or have some internal sane limit, like twice the number of cores, say? _______________________________________________ Bug-make mailing list Bug-make@gnu.org https://lists.gnu.org/mailman/listinfo/bug-make