Powered by Invision Power Board


  Reply to this topicStart new topicStart Poll

> Batch command, Using batch command
nauj
Posted: May 30 2005, 06:24 PM
Quote Post


Newbie
*

Group: Members
Posts: 6
Member No.: 636
Joined: 8-November 04



Hi,

I want to use batch command in order to run a group of jobs in parallel. This jobs are heavy jobs and using batch command I want that some of the jobs wait for ending of other jobs and the load of the machine get lower.

I'm submitting jobs like that:
nohup script1.sh par1 par2 &
nohup script2.sh par1 par2 &
nohup script3.sh par1 par2 &
nohup script4.sh par1 par2 &
nohup script5.sh par1 par2 &

In this way all of the jobs start at same time and machine CPU go to 100 %. Using batch commmand I want that some of the scripts waits for a percent of use of CPU lower.

Any advice will be greatly apreciatted
PMEmail Poster
Top
fishsponge
Posted: May 31 2005, 09:26 PM
Quote Post


Administrator
********

Group: Admin
Posts: 679
Member No.: 1
Joined: 13-February 03



usually, when a script runs and uses CPU, it takes the CPU up to 100% anyway... if a second script then starts, it shares the CPU with it, but if one script stops again, the other one uses the rest of the CPU, and the end result is that the CPU is at 100% regardless of how many scripts are running.

i hope that makes sense...

Basically, if you just run one of these scripts manually, does the CPU go up to 100% anyway? If not, what percentage does it go up to?
PMEmail PosterUsers WebsiteICQAOLYahooMSN
Top
nauj
Posted: Jun 1 2005, 03:19 PM
Quote Post


Newbie
*

Group: Members
Posts: 6
Member No.: 636
Joined: 8-November 04



Ok, when a script runs and uses CPU, it takes the CPU up to 100% anyway...
but when I run my 4 proceses in parallel the server si very busy, other processes (not mine) last more than usual when my processes are running, the time of the processses is five times bigger.

What I want is run the 4 processes in parallel but taking in account the load of the machine, but I don't know how to use 'batch command'

Thanks
PMEmail Poster
Top
fishsponge
Posted: Jun 1 2005, 03:23 PM
Quote Post


Administrator
********

Group: Admin
Posts: 679
Member No.: 1
Joined: 13-February 03



would it help if you set the priority of the 4 processes to be quite low, therefore allowing other, more important, processes to run faster?

you can set the priority of a process by using the 'renice' command. See 'man renice'.
PMEmail PosterUsers WebsiteICQAOLYahooMSN
Top
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:
« Next Oldest | General UNIX/Linux Forum | Next Newest »

Topic Options Reply to this topicStart new topicStart Poll

 



[ Script Execution time: 0.3271 ]   [ 12 queries used ]   [ GZIP Enabled ]




Partners: Cambridge Plus :: <Link Available> :: PIC Boot-loader Utility :: <Link Available>
Unix Man Pages / Linux Man Pages :: HiFi Forum :: SIP VoIP Phone & Provider Reviews :: UNIX/Linux Forum Archives

More info on advertising on Unix/Linux Forum