public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: App runs 8x slower on dual core machine (with test case to replicate issue)
Date: Thu, 09 Aug 2012 09:22:00 -0000	[thread overview]
Message-ID: <20120809081720.GQ31757@calimero.vinschen.de> (raw)
In-Reply-To: <CAFY+UmUspDUbo4JaW9NDG1zf1oY2rgS5g3zO7q-qnby3tJqrSg@mail.gmail.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

  reply	other threads:[~2012-08-09  8:17 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-09  8:17 Zach Saw
2012-08-09  9:22 ` Corinna Vinschen [this message]
2012-08-10  3:39   ` Zach Saw
2012-08-10  3:45     ` Daniel Colascione
2012-08-10  4:04       ` Zach Saw
2012-08-10 16:37         ` Andrew DeFaria
2012-08-11  1:14           ` Zach Saw
2012-08-11  2:32             ` Christopher Faylor
2012-08-10  3:52     ` Larry Hall (Cygwin)
2012-08-10  4:10       ` Zach Saw
2012-08-10  3:56     ` Linda Walsh
2012-08-10  4:13       ` Zach Saw
2012-08-10  6:31         ` Zach Saw
2013-01-22  4:51 ` Zach Saw
2013-01-22  8:51   ` Corinna Vinschen
2012-08-09 13:03 Zach Saw

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120809081720.GQ31757@calimero.vinschen.de \
    --to=corinna-cygwin@cygwin.com \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).