1827810 Members
1903 Online
109969 Solutions
New Discussion

Maximum multiprocessing.

 
Vibhor Kumar Agarwal
Esteemed Contributor

Maximum multiprocessing.

Hi,

I have a long script which does many jobs.
Some of them are very long like build, backup, etc.

None of them are interdependent.

How can i customise my script that max things run in parallel.
Vibhor Kumar Agarwal
7 REPLIES 7
RAC_1
Honored Contributor

Re: Maximum multiprocessing.

nohup max job1 &
nohup max job2 &

Should be ok with you.
There is no substitute to HARDWORK
Arunvijai_4
Honored Contributor

Re: Maximum multiprocessing.

Modularize and put it in background with "&".Using "wait" may not useful.

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Muthukumar_5
Honored Contributor

Re: Maximum multiprocessing.

You have to run jobs in parrallel mode with & like,

build()
{

..
}

backup()
{

...
}

build &
backup &

You can manage those process ID with $! for build & sub process and backup & sub process.

hth.
Easy to suggest when don't know about the problem!
Vibhor Kumar Agarwal
Esteemed Contributor

Re: Maximum multiprocessing.

These things will make it hard coded.

I was looking for something flexible which will vary with time.

If load is less, do more jobs, if more carry on serially.
Vibhor Kumar Agarwal
RAC_1
Honored Contributor

Re: Maximum multiprocessing.

Then you need a meachnism to decide if load is high or not. (and by the way just load on the system is not correct way determining how system is performing. The priority queue is very important.)

Before you develop a mechanism/procedure to decide how system is doing, how are your jobs?? Like build process more cpu bount and backup disk bound. So is it going to be overall system performance or just cpu load/disk load??

Glance can give you global priority run queue.
There is no substitute to HARDWORK
Vibhor Kumar Agarwal
Esteemed Contributor

Re: Maximum multiprocessing.

Its a mixture of all.
Vibhor Kumar Agarwal
Ted Buis
Honored Contributor

Re: Maximum multiprocessing.

Use what has already been mention and use nice to lower the priority of the jobs that are less important to you. The only limitation would be extra page out/in if you don't have enough RAM to keep all the parallel jobs in memory. Process Resource Manager and Workload Manager from HP are even better tools but they cost extra dollars, unless you have Enterprise OE or Mission Critical OE respectively.
Mom 6