I have a laptop that is normally running GPU cryptocurrency mining. I want the laptop to kill this cryptocurrency mining when any intensive deep learning process is launched. So, I'm not trying to lower the priority of the GPU cryptocurrency mining; I'm actually trying to kill the process when some obviously intensive GPU process (e.g. using TensorFlow) is launched.
How might this be done? Should I have a daemon running that watches for specific processes? It feels like this might be functionality already offered in Linux.
nice
the miner? That could be enough.nice
is usable for CPU processes, when this is really a question of GPU usage. The CPU usage of the mining and the CPU usage of the deep learning both are minimal; the issue is that it needs to be one or the other using the GPU at a time.