| UNIX/Linux Forum Archives · Rules and Guidelines · Disclaimer |
Help
Search
Members
Calendar
|
| Welcome Guest ( Log In | Register ) | Resend Validation Email |
![]() ![]() ![]() |
| nauj |
Posted: May 30 2005, 06:24 PM
|
|
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 |
| fishsponge |
Posted: May 31 2005, 09:26 PM
|
|
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? |
| nauj |
Posted: Jun 1 2005, 03:19 PM
|
|
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 |
| fishsponge |
Posted: Jun 1 2005, 03:23 PM
|
|
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'. |
![]() |
![]() ![]() ![]() |