D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] How to run a task with a higher priority?

 

Sam Grabham wrote:
> Hi
>  
> is there a way of running a bash script with a higher priority than normal?
>  
> I have used "renice" a few times to help matters but would like to do
> this without having to renice the task.

If the task runs as root (or is started by root) you can just use "nice".

> This is to ensure that DAT tape job extracts data before other task try
> and use the data files,

Sounds like you want a lock, or a check on the files completeness or
even incron, not priority. Priority just ensures more CPU as I
understand it, by changing the scheduling.

Most tape restores will be I/O bound (unless you are binding a lot of
tape decks together). Waiting on I/O is usually a good reason to kick a
shell script out of core for a few clock cycles, so it might appear the
script isn't running much, or is low priority, when you are just waiting
for the tape drive.

> This is a Oracle box which uses most of the servers resources.

What resource do you think you need more of?

-- 
The Mailing List for the Devon & Cornwall LUG
http://mailman.dclug.org.uk/listinfo/list
FAQ: http://www.dcglug.org.uk/linux_adm/list-faq.html