X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Date: Thu, 9 Aug 2012 10:17:20 +0200 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: App runs 8x slower on dual core machine (with test case to replicate issue) Message-ID: <20120809081720.GQ31757@calimero.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com On Aug 9 18:07, Zach Saw wrote: > Hi all, > > While trying to compile my multithreaded app written for Linux on > Cygwin to run on Windows, I discovered the app would perform 8x slower > on a machine with the same specs. I then went on to triage the issue > and found that if I set CPU affinity of that process to 1 (i.e. single > core), I'd get it to speed up to almost the speed I'd get under Linux > (set to single core too). > > I dug deeper and had my suspicion on a Cygwin bug. I suspected a > problem in its thread singalling (condvar). So to test my hypothesis, > I created a minimal test case to show case this issue. This minimal > test case compiled on MSVC++ too and the difference is staggering. > What you'll find is if you started the process with CPU Aff = 1, > you'll get it to run >8x as fast as the default. > > On my machine, it took 4300ms to run in dual core mode, 460ms to run > when CPU Aff = 1. Thanks for the testcase, but... would you mind to change it to take the boost lib out of the picture, by using just plain pthread functions, if possible in plain C? Thanks, 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