parallel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: replacement string for running jobs number(not job number{#})


From: max
Subject: Re: replacement string for running jobs number(not job number{#})
Date: Fri, 2 May 2014 20:44:08 -0400

Thanks for the reply.

I just gave that as an example. Why core2 finished more jobs than core1 is not the key point I want to point out. As the reason can be the two cores have different speed or loadings(say assigned some other jobs to core1 at the same time parallel is running), or the jobs assigned to core1 took longer time to finish than those on core2, cause the jobs could be different in their running times. Linux is quite good at managing the jobs and loads on the CPUs, but I do not want to job switch back and forth between the cores. I want to job pined to the core when it is assigned to until done.

The idea here is: Let parallel assign the jobs be assigned to a certain resource, (the resource could be hard-driver, internet port and so on, here I just used two cores: core1 or core2 as an example), and use taskset to pin that job onto the resource assigned to. ( here is the CPU core)

By doing this way, I can certainly sure that there is one and only one running job using that a certain resource(core) assigned by parallel. There is no competition for that resource any more, and when the resource is free(job done), a new job could be assigned to use it.

One way I thought could implement this feature is to have an index{##} for the slots of running jobs, and the resource can be assigned by the slot number.
say "parallel -k  -j2" , we opened two slots for the jobs to run, there could be many jobs, but no more than two jobs can run at the same time, both of them must run through either slot1 or slot2, but not both. The slot index might be useful to assign the job to certain resource.





On Fri, May 2, 2014 at 2:00 PM, Ole Tange <ole@tange.dk> wrote:
On Thu, May 1, 2014 at 7:15 PM, max <magicdirac@gmail.com> wrote:
> I am a newbee to GNU/Parallel.  this feature might have been implemented,
> but I have not found yet. So I asked it here.
>
> For example, Let's say we have 9 jobs to run on  two cores Core1 and Core2.
> we taskset command to stick the jobs on the specific cores which are
> available. Not any single core can not run two jobs at the same time.

You need to justify why.

If core2 is idle and core1 is busy, why force a job to run on core1?
UNIX in general and Linux in particular is excellent at move a running
job to an idle core.

/Ole



--
As Heaven keeps vigor through movement, a gentleman should unremittingly practice self-improvement.  --- YiJing


Faith, Hope, & Love in God.
Ask and it will be given to you;
Seek and you will find;
Knock and the door will be opened to you.
๑۩۞۩๑

reply via email to

[Prev in Thread] Current Thread [Next in Thread]