I’ve noticed that CPU-bound background jobs, specially running on a Hangfire server with lots of workers (20+), the CPU usage on the server goes/stays as high as 60-90%. That’s not necessarily a bad thing, because CPU-bound jobs are meant to make good use of multiple cores on the server.
But I was wondering, if adding a simple
Thread.Sleep(50) in the jobs (or may be even Hangfire’s internal infinite loop) will help the system be more responsive and bring down the high CPU use. Any thoughts guys?!?