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 19:30:16 +0000 [thread overview]
Message-ID: <SN7PR14MB700057482EDE3E37825FA92193EBA@SN7PR14MB7000.namprd14.prod.outlook.com> (raw)
Jeff wrote:
> I have a program that is embarrassing parallel.
> On my older computer which has an epyc 7302 (16 cores, 32 threads) it
> scales very well using cygwin, and fully utilized all threads.
> On my new computer which has an epyc 7B13 (64 cores, 128 threads) it
> does not scale very well.
> According to the windows task manager, it only uses 74% of the cpu
> resources.
> The time it takes the program to run on windows is 166 seconds.
> Using the same hardware on a recent version of linux, I can get 100% cpu
> utilization and the program takes 100 seconds to run.
> I suspect there may be something in cygwin that doesn't scale well with
> lots of posix threads.
> I know this is a bit of an unusual situation, but you can buy a 128 core
> / 256 thread system now.
> Enclosed is the output of cygcheck.
> I updated my version of cygwin to be current as of today, Sep 2 2023.
> thanks,
> jeff
Hi Jeff,
Cygwin's memory allocation, and anything that uses it under the hood, such as some containers from the C++ standard library, don't scale well with many threads. I have observed even worse scalling than yours in my own massively multi-thread programs.
My advice would be to either rewrite your program to centralize memory allocation in a specialized thread that serves the other processing threads, or, if you don't need Posix things, compile with the Mingw cross-compiler, which produces code that uses M$ implementation for memory allocation, which scales better.
Regards,
- André Bleau
next reply other threads:[~2023-09-02 19:30 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-02 19:30 André Bleau [this message]
[not found] ` <e36d50d5-75d0-40d5-92e2-02d04092fd77@jeffunit.com>
2023-09-02 21:23 ` André Bleau
-- 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=SN7PR14MB700057482EDE3E37825FA92193EBA@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).