Disable stealing CPU/GPU cycles from other apps when a window is in focus

  • Thread starter Nicolas Chaumont
  • Start date
N

Nicolas Chaumont

Hello all,


I'm running 2 instances of the same GPU-bound python script. The editor I'm using (IDLE), starts each script inside a terminal console and the scripts open up their own window to view a camera feed (using OpenCV). Here is what I observe:

  • When no window that show a camera feed is in focus, both apps run at the same speed, i.e. the frame rate is ~7.5fps.
  • When I click on any of these two windows, its frame rate is suddenly bumped up to ~12fps, and the other's drops down to ~4fps.


Again, when I click on any other window, both run at the same frame rate. I changed the priority in Task Manager to high and low, but the performance is the same and my issue remains. This is an issue because I need to do things (video tracking/recording, store to DB) that require a sustained, near constant speed, and a random user-induced change in frame rate of a factor of 1-3 is unacceptable. Is there a way to disable this effect? Maybe by switching an option somewhere in the Windows settings to not change a window's priority while in focus? Or maybe invoke the script in the Windows shell/powershell with a setting that makes an app immune to changes in CPU allocation when in/out of focus?


FYI, here is a summary of my configuration:

  • OS: Windows 10 64-bit Pro v1803
  • CPU: Intel I9-7920X@2.9GHz (CPU usage: 100%)
  • RAM: 64GB (memory usage: 45%)
  • GPU: Nvidia GeForce RTX 2080Ti (GPU usage: 5%)
  • CUDA 10.1/CUDNN 7.6.3.30
  • Nvidia Driver 436.48 (release date 10/01/2019)
  • OpenPose 1.5.1
  • OpenCV 4.1.1
  • python 3.6.8
  • Video source: 2 USB cameras, 1920x1080 @ 30fps


Thank you in advance!

Nicolas

Continue reading...
 
Back
Top Bottom