Open Bug 1326362 Opened 8 years ago Updated 6 months ago

Detect and alert for Razer Game Scanner service

Categories

(Firefox Build System :: General, defect)

defect

Tracking

(Not tracked)

People

(Reporter: gps, Unassigned)

References

(Blocks 1 open bug)

Details

I was looking at process explorer when performing a Firefox build on my home desktop and noticed a "GameScannerService" consuming double digit CPU percentage usage throughout the build. Loading up Process Monitor, it appears this service (GameScannerService.exe) appears to be intercepting new process creation events and scanning all binaries that are opened/executed. It doesn't appear smart enough to cache results, as it is opening cl.exe, python.exe, mozmake.exe, and other files dozens or hundreds of times during a build. A search of the Internets reveals pages like http://blog.ultimateoutsider.com/2016/02/razers-terrible-game-scanner-service.html opining about Razer's game scanning service sucking performance out of machines. I can't believe my mouse software is slowing down my Firefox build. Anyway, we already have monitoring during the build for Finder.app consuming high levels of CPU. We should add monitoring for GameScannerService.exe and recommend people disable it if it is sucking CPU.
I restarted the Game Scanner Service through the Services control panel after running `mach configure` then kicked off a build with `mach build`. After the build completed, Process Explorer says GameScannerService.exe consumed ~3:27 (207s) of CPU time, or ~820,000,000,000 cycles on my i7-6700K (nominally clocked at 4.0GHz). Profiling GameScannerService.exe with xperf and analyzing sampled stacks in Windows Performance Analyzer reveals ~46% of sampled stacks in KernelBase.dll!GetFileVersionInfoSizeA(), which is called from some unknown symbol in RzProcessManager.dll. It appears GetFileVersionInfoSizeA is calling KernelBase.dll!LoadLibraryExW() which calls KernelBase.dll!BasepLoadLibraryAsDataFile(). BasepLoadLibraryAsDataFile() is accounting for ~40% of stack samples. ~12.8% of total samples are in ntdll.dll!NtQueryAttributesFile. So basically this service is loading executables into memory over and over without relent. The more processes I execute, the more work GameScannerService.exe performs and the more impact it has on system performance. FWIW, another Razer service (RzSynapse.exe) has consumed ~6 minutes of CPU time since my machine was started ~7 days ago. (I was out of town and not physically using this computer for ~6 of those days.) IMO that's pretty bad for a background service to support my mouse. I find myself questioning my continued use of a Razer mouse (which is a shame because I love the physical ergonomics of this mouse).
Product: Core → Firefox Build System
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.