I have a Threadripper 1950X based workstation with 16 cores and 32 threads and plenty of memory. Running 64-bit R 3.6.0 (patched) on Windows 10, I frequently run parallel code in R using the doParallel library and the foreach command, frequently setting it to use 26-30 threads.
Recently, I checked out the task manager. As doParallel started spooling up all its processes, I wasn't surprised to find its CPU usage going up. But very strangely, Windows Defender (Microsoft's antivirus default) started spooling up too, and very aggressively, climbing to as high as 70% usage (it is listed as Antimalware Service Executable). Here's a screenshot of what I mean. When the R code completes, Defender goes back down to insignificant CPU usage.
I have read posts online on Defender's high CPU usage, but this seems extremely tied to parallel operations in R. I have tried to set the exclusions as per posts like this but it doesn't improve matters.
Should I be concerned that Windows Defender is constantly crowding out R when I run parallel code with lots of threads set?