On Sun, Mar 26, 2017 at 11:56 PM, Jean-Yves Avenard <jyaven...@mozilla.com> wrote:
> Hi. > > I have received the new Dell XPS 15 9560 and got very puzzled as to why > compiling central was so slow on this machine. > This is comparing against a Gigabyte Aero 14 with a gen 6 intel CPU > (2.6Ghz i7-6600HQ) vs Dell's 7th gen (2.8Ghz i7-7700HQ) > On the Aero 14, compiling central takes 24 minutes. On the XPS 15, first > go 38 minutes. > The XPS 15 came with McAfee anti-virus and Windows Defender is disabled. > An exclusion list made almost no difference. Disabling entirely McAfee: the > time dropped to 28 minutes.Uninstalling McAfee completely, enabling Windows > defender with an exclusion list as mentioned in the first post: 26.5 minutes > Now disabling Windows Defender: not just an exclusion list saw the time > dropped to 25 minutes.Interestingly, on the Aero disabling Windows Defender > or having just an exclusion list made almost no difference in compilation > time. I can't explain the reason. Maybe because big brother is watching all > the time! > The way that A/V scanning typically works on Windows is that the A/V software inserts a "file system filter driver" into the kernel. This driver sees pretty much all I/O operations and has the opportunity to change their behavior, delay their fulfillment (by calling out into a blocking API in userland), etc. The file system filter driver for A/V is always installed. Exclusion list processing needs to be handled by that driver. So just having the driver installed means there is some overhead. If the exclusion list processing code is slow, this will slow down I/O, even if a path is in the exclusion list. From your numbers, I suspect McAfee may have a less optimal exclusion list processor than Microsoft. That wouldn't surprise me. You can see which file system filters are loaded by running `fltmc.exe filters`. Note: you'll have to do this from a command prompt with administrator access. You'll likely have to plug the names into a search engine to figure out what they do. I'm not sure about McAfee, but Windows Defender scans files during the CloseHandle() API. But only if the file was written or appended to. This scanning makes CloseHandle() go from ~1us to ~1ms. When you are writing thousands of files, this scanning can add up! FWIW, Mercurial mitigates this by having a thread pool that just sits around closing file descriptors. This change made fresh `hg update` operations on Windows >60s faster IIRC. I recommend using Process Monitor to record system call times. That's how I discovered that Windows Defender was mucking about with CloseHandle(). If you find system calls that other A/V (like McAfee) is mucking with, we could potentially mitigate their impact in the build system similar to what Mercurial has done. > After following the instructions listed there: http://www. > ultrabookreview.com/14875-fix-throttling-xps-15/ > Compilation time dropped to 23.8 minutes.The main factor was adding > thermal pads to the MOSFETs. > Undervolting the CPU by 125mV added 50s of compilation time, but dropped > the processor temperature by 10C (max 78C vs 68C) and my guess will also > add quite a lot of battery life. > I'll be blunt: you should not be performing full builds on a laptop because of issues like thermal throttling. Laptops are OK for limited uses (like traveling). But if you are paid to hack on Gecko, Mozilla should buy you a desktop. Firefox Desktop developers (who can use artifact builds) can get away with a laptop for building. > So if you're in a hurry, you may want to try disabling Windows Defender > completely. > FWIW: on those same machines running Linux Ubuntu 16.10;Aero 14: 14 > minutesXPS 15: 13 minutes.That's out of the box, no tweaks of any kinds. > JY > ------- > If it ain't broken, please fix it > > > > > On Fri, Mar 17, 2017 at 4:26 AM +0100, "Ben Kelly" <bke...@mozilla.com> > wrote: > > > > > > > > > > > Hi all, > > I'm trying to configure my new windows build machine and noticed that > builds were still somewhat slow. I did: > > 1) Put it in high performance power profile > 2) Made sure my mozilla-central dir was not being indexed for search > 3) Excluded my mozilla-central directory from windows defender > > Watching the task monitor during a build, though, I still saw MsMpEng.exe > (antivirus) running during the build. > > I ended up added some very broad exclusions to get this down close to > zero. I am now excluding: > > - mozilla-central checkout > - mozilla-build install dir > - visual studio install dir > - /users/bkelly/appdada/local/temp > - /users/bkelly (because temp dir was not enough) > > I'd like to narrow this down a bit. Does anyone have a better list of > things to exclude from virus scanning for our build process? > > Thanks. > > Ben > _______________________________________________ > dev-platform mailing list > dev-platform@lists.mozilla.org > https://lists.mozilla.org/listinfo/dev-platform > > > > > > _______________________________________________ > dev-platform mailing list > dev-platform@lists.mozilla.org > https://lists.mozilla.org/listinfo/dev-platform > _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform