public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: "André Bleau" <andre_bleau@hotmail.com>
To: "cygwin@cygwin.com" <cygwin@cygwin.com>
Subject: Re: posix thread scaling issue
Date: Sat, 2 Sep 2023 21:23:08 +0000	[thread overview]
Message-ID: <SN7PR14MB70001030AA3D18CA25B36D9593EBA@SN7PR14MB7000.namprd14.prod.outlook.com> (raw)
In-Reply-To: <e36d50d5-75d0-40d5-92e2-02d04092fd77@jeffunit.com>

Jeff wrote:

> Thanks. I am doing the memory allocation in a single thread.
> The compute uses all the threads I can get, and the compute isn't 
> scaling very well with cygwin.
> It does work well on my 16 core 32 thread processor, so for most people 
> the posix threading is fine.

> jeff


For the multi-threaded program that I wrote, with up to 64 threads, I compile each file with:

x86_64-w64-mingw32-c++ -O3 -c file.cpp

and link with:

x86_64-w64-mingw32-c++ -o program *.o -static-libgcc -static-libstdc++ -Wl,-Bstatic -lstdc++ -lpthread -Wl,-Bdynamic

And I get could results. 100% CPU use; I even need to lower the priority of the program to keep a snapy Windows UI.

You may try the same to see if it improves the performance of your program.

Regards,

- André Bleau

  parent reply	other threads:[~2023-09-02 21:23 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-02 19:30 André Bleau
     [not found] ` <e36d50d5-75d0-40d5-92e2-02d04092fd77@jeffunit.com>
2023-09-02 21:23   ` André Bleau [this message]
  -- strict thread matches above, loose matches on Subject: below --
2023-09-02 14:57 jeff
2023-09-02 17:56 ` Brian Inglis
2023-09-02 18:27   ` jeff
2023-09-02 19:59     ` Brian Inglis
2023-09-02 20:04       ` jeff
2023-09-03  6:13         ` ASSI
2023-09-03  3:50       ` Mark Geisert
2023-09-03  4:13         ` Mark Geisert

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=SN7PR14MB70001030AA3D18CA25B36D9593EBA@SN7PR14MB7000.namprd14.prod.outlook.com \
    --to=andre_bleau@hotmail.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).