Re: how to refrain only use certain number of processors
- To: debian-user@lists.debian.org
- Subject: Re: how to refrain only use certain number of processors
- From: lee <lee@songoku.yagibdah.de>
- Date: Tue, 31 Jan 2012 23:59:00 +0000
- Message-id: <[🔎] 87wr87whiz.fsf@songoku.yagibdah.de>
- In-reply-to: <CAG9cJmnkWVkEZh_wC2505HDZzZaZ0pKuc0i9UUZeJKY0zyj79g@mail.gmail.com> (lina's message of "Mon, 30 Jan 2012 18:06:06 +0800")
- References: <CAG9cJmnkWVkEZh_wC2505HDZzZaZ0pKuc0i9UUZeJKY0zyj79g@mail.gmail.com>
lina <lina.lastname@gmail.com> writes:
> I have a script like
>
> #!/bin/bash
>
> for i in {0..108}
> do
>
> some job will run for mins &
>
> done
>
> Here I used & for some kinda of parallel.
> but there is a problem,
>
> I wished at most it only run 8 jobs simultantly, no more than 8, once
> finished, a new job can continue,
If you can use a Makefile instead of your script to get the job done,
you could use make -j8 instead.
Reply to: