From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5933 invoked by alias); 6 Dec 2011 10:39:26 -0000 Received: (qmail 5865 invoked by uid 22791); 6 Dec 2011 10:39:01 -0000 X-Spam-Check-By: sourceware.org Received: from aquarius.hirmke.de (HELO calimero.vinschen.de) (217.91.18.234) by sourceware.org (qpsmtpd/0.83/v0.83-20-g38e4449) with ESMTP; Tue, 06 Dec 2011 10:38:37 +0000 Received: by calimero.vinschen.de (Postfix, from userid 500) id 31DE22C01DE; Tue, 6 Dec 2011 11:38:34 +0100 (CET) Date: Tue, 06 Dec 2011 10:39:00 -0000 From: Corinna Vinschen To: cygwin@cygwin.com Subject: Re: Machine very sluggish while compiling Message-ID: <20111206103834.GL12518@calimero.vinschen.de> Reply-To: cygwin@cygwin.com Mail-Followup-To: cygwin@cygwin.com References: <4ECEE88E.5050307@cs.utoronto.ca> <20111125154751.GP28395@trikaliotis.net> <4EDB2761.6040508@cs.utoronto.ca> <20111204100639.GA9849@calimero.vinschen.de> <4EDD44E0.7070701@cornell.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <4EDD44E0.7070701@cornell.edu> User-Agent: Mutt/1.5.21 (2010-09-15) Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com X-SW-Source: 2011-12/txt/msg00101.txt.bz2 On Dec 5 17:25, Ken Brown wrote: > On 12/4/2011 5:06 AM, Corinna Vinschen wrote: > >Anyway, stoppping the PCA service and setting its start mode to "Manual" > >does the trick for me. > > It does the trick for me too. For a long time I've been unable to > build emacs using cygport's default for parallel make (-j5 because I > have 4 cores). When I did this, I would either have the computer > freeze (and I would have to shut it down with the power button) or > else I would get a BSOD. > > Since stopping PCA, the problem seems to be gone. In the meantime I found another way how to avoid this problem. Here's an excerpt from the MSDN man page of AssignProcessToJobObject: If the process is being monitored by the Program Compatibility Assistant (PCA), it is placed into a compatibility job. Therefore, the process must be created using CREATE_BREAKAWAY_FROM_JOB before it can be placed in another job. Alternatively, you can embed an application manifest that specifies a User Account Control (UAC) level in your application and PCA will not add the process to the compatibility job. So, what I did was to change Cygwin locally to add the CREATE_BREAKAWAY_FROM_JOB flag to the CreateProcess call when execing a process. With this change, I had no problems with PCA anymore. I also tried to use an "asInvoker" side-by-side manifest for mintty, but I had no luck with it. PCA still wasted memory and CPU. So I'm wondering if we should simply add the CREATE_BREAKAWAY_FROM_JOB flag to our CreateProcess calls and be done with it. As far as I can see, and from what MSDN claims, there should be no problem doing that. Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Project Co-Leader cygwin AT cygwin DOT com Red Hat -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple