# Number of tasks vs. number of workers, idle workers at the end?

8 views

### Commander Kinsey

Feb 28, 2022, 12:05:27 PM2/28/22
to
If 200 jobs need to be done, varying in time from 400 to 4000 seconds each, can anybody see why it would be disadvantageous to have an odd number of workers doing these tasks?

I don't think it matters due to the randomness. But someone who shall remain nameless said that I should have an even number of workers to prevent an idle one at the end while the last job is finished.

### Barry Schwarz

Feb 28, 2022, 7:56:27 PM2/28/22
to
It depends on the definition of advantageous. If the objective is
that no one should ever by idle, then 1 worker is the most

Furthermore, the assertion that an even number of workers will prevent
an idle worker makes no sense.

Even with two workers, unless the last two jobs end simultaneously,
one worker will be idle while the other finishes.

With 200 workers, everyone except those working on 4000 second jobs
will be idle at the end.

--
Remove del for email

### John Francis

Mar 1, 2022, 1:10:36 AM3/1/22
to
In article <op.1ia8e...@ryzen.lan>,
If all the tasks take the same amount of time then the minimum-elapsed-time solution avoids any idle workers if the number of workers is a factor of 200. This has two odd factors, so there are never any idle workers if the worker pool has 5 or 25 workers.

Another case where there is no way to avoid idle time with an even number of workers is if 198 of the 200 jobs require 4000 seconds,
one requires 3000, and one requires 1000.

### Commander Kinsey

Mar 2, 2022, 1:33:37 AM3/2/22
to
On Tue, 01 Mar 2022 00:56:23 -0000, Barry Schwarz <schw...@delq.com> wrote:

> On Mon, 28 Feb 2022 17:05:23 -0000, "Commander Kinsey"
> <C...@nospam.com> wrote:
>
>> If 200 jobs need to be done, varying in time from 400 to 4000 seconds each, can anybody see why it would be disadvantageous to have an odd number of workers doing these tasks?
>>
>> I don't think it matters due to the randomness. But someone who shall remain nameless said that I should have an even number of workers to prevent an idle one at the end while the last job is finished.
>
> It depends on the definition of advantageous. If the objective is
> that no one should ever by idle, then 1 worker is the most

The definition in this case is getting the jobs all done as quickly as possible. Which is equal to having the least total idle man-hours.

> Furthermore, the assertion that an even number of workers will prevent
> an idle worker makes no sense.

Agreed. But someone programming for a very famous place disagrees.

> Even with two workers, unless the last two jobs end simultaneously,
> one worker will be idle while the other finishes.

Indeed.

> With 200 workers, everyone except those working on 4000 second jobs
> will be idle at the end.

Also indeed.

### Barry Schwarz

Mar 2, 2022, 1:57:53 AM3/2/22
to
On Wed, 02 Mar 2022 06:33:33 -0000, "Commander Kinsey"
<C...@nospam.com> wrote:

>On Tue, 01 Mar 2022 00:56:23 -0000, Barry Schwarz <schw...@delq.com> wrote:
>
>> On Mon, 28 Feb 2022 17:05:23 -0000, "Commander Kinsey"
>> <C...@nospam.com> wrote:
>>
>>> If 200 jobs need to be done, varying in time from 400 to 4000 seconds each, can anybody see why it would be disadvantageous to have an odd number of workers doing these tasks?
>>>
>>> I don't think it matters due to the randomness. But someone who shall remain nameless said that I should have an even number of workers to prevent an idle one at the end while the last job is finished.
>>
>> It depends on the definition of advantageous. If the objective is
>> that no one should ever by idle, then 1 worker is the most
>
>The definition in this case is getting the jobs all done as quickly as possible. Which is equal to having the least total idle man-hours.

Not at all.

should equal the number of jobs. That will result in all the jobs
being finished at the end of 4000 seconds.

To have the least total idle man-hours, use only one worker. That
will result in 0 idle man-hours

>> Furthermore, the assertion that an even number of workers will prevent
>> an idle worker makes no sense.
>
>Agreed. But someone programming for a very famous place disagrees.

As you state below, you acknowledge that his disagreement is at odds
with the facts. Why would the notoriety of the workplace make his
ill-reasoned disagreement worth mentioning.

>> Even with two workers, unless the last two jobs end simultaneously,
>> one worker will be idle while the other finishes.
>
>Indeed.
>
>> With 200 workers, everyone except those working on 4000 second jobs
>> will be idle at the end.
>
>Also indeed.

### Commander Kinsey

Mar 2, 2022, 3:00:05 AM3/2/22
to
On Wed, 02 Mar 2022 06:57:49 -0000, Barry Schwarz <schw...@delq.com> wrote:

> On Wed, 02 Mar 2022 06:33:33 -0000, "Commander Kinsey"
> <C...@nospam.com> wrote:
>
>> On Tue, 01 Mar 2022 00:56:23 -0000, Barry Schwarz <schw...@delq.com> wrote:
>>
>>> On Mon, 28 Feb 2022 17:05:23 -0000, "Commander Kinsey"
>>> <C...@nospam.com> wrote:
>>>
>>>> If 200 jobs need to be done, varying in time from 400 to 4000 seconds each, can anybody see why it would be disadvantageous to have an odd number of workers doing these tasks?
>>>>
>>>> I don't think it matters due to the randomness. But someone who shall remain nameless said that I should have an even number of workers to prevent an idle one at the end while the last job is finished.
>>>
>>> It depends on the definition of advantageous. If the objective is
>>> that no one should ever by idle, then 1 worker is the most
>>
>> The definition in this case is getting the jobs all done as quickly as possible. Which is equal to having the least total idle man-hours.
>
> Not at all.
>
> should equal the number of jobs. That will result in all the jobs
> being finished at the end of 4000 seconds.
>
> To have the least total idle man-hours, use only one worker. That
> will result in 0 idle man-hours

Yawn.... but consider those workers could be doing something else.

In this case it's about countless 200-job groups of work. The question is, is it better to have groups of 8 workers on each 200 block, or groups of 7? In that 200 is divisible by 8 but not 7.

>>> Furthermore, the assertion that an even number of workers will prevent
>>> an idle worker makes no sense.
>>
>> Agreed. But someone programming for a very famous place disagrees.
>
> As you state below, you acknowledge that his disagreement is at odds
> with the facts. Why would the notoriety of the workplace make his
> ill-reasoned disagreement worth mentioning.

I can hardly understand you. Are you foreign?