Re: [PATCH] core-count: A new program to count the number of cpu cores
From:
Pádraig Brady
Subject:
Re: [PATCH] core-count: A new program to count the number of cpu cores
Date:
Tue, 27 Oct 2009 16:46:41 +0000
User-agent:
Thunderbird 2.0.0.6 (X11/20071008)
Paolo Bonzini wrote:
> On 10/27/2009 01:16 PM, Pádraig Brady wrote:
>> I already suggested to the xargs maintainer that `xargs -P`
>> should be equivalent to xargs -P$(nproc).
>
> 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
. . . .
. . . .
. . .
. .
Hmm, it might be able to do that unconditionally?
cheers,
Pádraig.