-1

Our background application which is built using Quartz causes Services and Controller App (services.exe) to use a high CPU. The application itself uses an acceptable range of CPU (0-1% when idle, 3-4% when jobs triggered) and memory (max 200MB). But whenever jobs are triggered, services.exe CPU usage gets increased and causes problems on the server such prevents other services to restart.

Some insights from the application:

  • Around 75 jobs, 5-10 of them are 2 mins interval, the rest to run at midnight. (Issue happens all the time)
  • quartz.threadPool.threadCount = 10
  • quartz.scheduler.batchTriggerAcquisitionMaxCount = 100
  • Uses RAMJobStore
  • Used singleton pattern with IoC Container.

Any help appreciated.

1 Answers1

0

Found the problem with our application and writing here whoever passes by this issue. At least it may give some ideas where to look.

Findings:

  • Quartz .Net does not any relation with the issue.
  • Our logger enricher was trying to query the service name for each log.
  • This action was causing service.exe to respond and thus the reason for the high CPU.

I have tried a couple of windows profiler but unfortunately, none of them provided enough or easy to understand information. Finally, tried dotTrace which showed me the hot spot in the application, and after that making a correlation between my application and services.exe was easy.

Personal learning:

  • I was trying to make a correlation between my application and services.exe which there had to be one. But my mistake was to focus on Quartz .Net and how manages threads on the operating system.
  • Even though the issue was different, pursuing to make a correlation was the key point for me. No fire, no smoke.

Thanks.