|
From: | Paolo Bonzini |
Subject: | Re: [PATCH] core-count: A new program to count the number of cpu cores |
Date: | Tue, 27 Oct 2009 20:00:54 +0100 |
User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.4pre) Gecko/20091014 Fedora/3.0-2.8.b4.fc11 Lightning/1.0pre Thunderbird/3.0b4 |
I was thinking of an additional option that would automatically decrease -n so that the requested number of processes is started (then of course the load may not be well balanced).So you mean, rather than the current situation of: $ yes . | head -n13 | xargs -n4 -P2 . . . . . . . . . . . . . xargs could try to distribute like: $ yes . | head -n13 | xargs -n4 -P2 . . . . . . . . . . . . .
No, more like seq 1 13 | xargs --parallel -P4 1 5 9 13 2 6 10 3 7 11 4 8 12 (Note there's no -n). Same for seq 1 13 | xargs --parallelon a 4-core machine. This is _by design_ rearranging files, so it requires an option.
Paolo
[Prev in Thread] | Current Thread | [Next in Thread] |