Is there a way to disable MsMpEng.exe from monitoring file access during parallel computing operations? [duplicate]
I am using Windows 7 and have a 4-core Intel CPU, and was recently running a 4-kernel parallel computation written in Wolfram Mathematica that accesses a directory on an external hard drive containing several million files. I noticed the parallel computation was proceeding slower than expected, and isolated the problem to be due to the Security Essentials process "MsMpEng.exe"; see the following screenshot:
The MathKernel objects are sharing CPU resource with MsMpEng.exe, which is presumably scanning the files imported by the MathKernel objects as the computation proceeds.
This is unacceptable, and has also caused some other resource complications which are not really worth delving into, but it suffices to say that I am wondering whether it is possible to temporarily disable "MsMpEng.exe" while running computations, or at least tell it to not scan files located in a specific directory when another program (in this case, Mathematica) tries to open them.
EDIT: I restarted and disabled real-time protection, and the process so far seems to be gone; I'll post later if it pops up again and causes trouble.
There's two ways to handle this. You can temporarily disable real-time protection, or if your files are contained to a handful of known paths, you can exclude them from real-time protection scanning (this is the better option).
Disabling Real-Time Protection
Microsoft Security Essentials only performs this operation when Real-time Protection is enabled. You can disable it by opening MSE, clicking the Settings tab, selecting Real-time protection, and unchecking the box.
Warning! This disables real time protection! Just in case you weren't aware... or something...
Excluding from Real-Time protection
From the settings panel, select 'Excluded files and locations' and add the appropriate paths:
Wait, can you really exclude from real-time protection?
I had thought initially that 'Excluded files and locations' only affected scans, not real-time protection. There's plenty of arguments online about it but no documentation that says either way (that I could find). The verbiage seems to indicate it only affects scans:
So I popped open Process Monitor, limited it to the MsMpEng.exe process and path I wanted to test, and ran Get-Content in the directory to make it go nuts:
And once I excluded the directory:
So yes, using excluded files and locations does exclude it from real-time protection as well as scans!
Interestingly enough, I had a hard time getting MsMpEng.exe to consistently scan anything, even after switching directories... Makes me wonder about its reliability.