
On Mon, Jan 07, 2013 at 11:25:47AM +1100, Trent W. Buck wrote:
Craig Sanders <cas@taz.net.au> writes:
yeah, don't underestimate the usefulness of 'make -j' - multicore
Note: trying this (without specifying a number) in a project like busybox, without ulimits, is a good way to fork-bomb yourself.
yep, 'make -j N' where N ~= the number of cpus/cores you want to use. other useful tools to make full use of multi-core systems include the -P or --max-procs option of xargs: --max-procs=max-procs -P max-procs Run up to max-procs processes at a time; the default is 1. If max-procs is 0, xargs will run as many processes as possible at a time. Use the -n option with -P; otherwise chances are that only one exec will be done. depending on exactly what you're trying to do, this can result in enormous speedups of 'find ... | xargs ...' and imilar common idioms. and, of course, there is GNU parallel which can be used as a substitute for xargs (the command line options are deliberately the same), or even as a #!/usr/bin/parallel script. craig -- craig sanders <cas@taz.net.au> BOFH excuse #267: The UPS is on strike.