You can use the nice(1) and renice(1) commands to change the priority of your process, but that might not be what you want. I was trying to do something similar recently - I wanted a process to use less than the resources available to it, cos the machine ran too hot otherwise. The solution was to micro-sleep. See the
Time::HiRes module and the documentation for the
select built-in function.