Instructing Linux to Prioritize Processor Resources

Hi Everyone,

So, as I've been playing with AllStar over the past four years, I've learned a lot about the Linux OS as a non-native Linux user. However, I'm wondering if someone can point me in the right direction on something that I'm sure Linux can do but I'm not sure where to start.

I have a machine, an SFF HP desktop, that will be running two MTR2000s and a set of link radios about to go live up at our main repeater site. In addition to running the AllStar platform, I have a cron job setup to do a backup of critical configuration and system files on a daily basis to a separate server at my home daily at 3 AM. The size of the backup depends on the specific day.

While it is unlikely that the repeater will be in use at 3 AM, and I would imagine the processor demand for the backup job should be minimal, I am wondering if there is a way in the command in cron that I can tell Linux to make the backup job a lesser priority than executing Asterisk demands? The idea being if the repeater were in use, AllStar/Asterisk processor needs would be prioritized over the backup job.

Thoughts???

Thanks in advance,
Tom, KI6GOA

Yes! Look for documentation on the usages of the “nice” and “ionice” commands. Wrapping the execution of the bash script or command within nice with the proper parameter will prioritize it as super important, to super unimportant.

Carl/K6CRS

Tom, I think you will need to google for that priority setting.

But you can also make it conditional based on CPU usage or other criteria.

Put it all in a bash script you call from cron.

Practically speaking, it's highly unlikely a backup copy job will be CPU-bound (i.e. consuming all CPU resources) over network IO wait. Unless you're having a demonstrable problem, messing with nice/renice/ionice is unneeded complexity.