I'm running a large multithreaded java job on a 64-core machine. The program has been running for days and I would like to change the priority of some threads created by java (not of the main thread), but without cancelling and restarting the program, as that would be a large waste of time and computing resources.
Are there any ways to change thread priority at runtime, from the OS (linux)? I know the renice
command in linux can renice the entire process, but I'm looking for a way to change the priority of the created threads at runtime (which doesn't seem to happen with just a renice).