public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Brian Inglis <Brian.Inglis@Shaw.ca>
To: cygwin@cygwin.com
Cc: jeff <jeff@jeffunit.com>
Subject: Re: posix thread scaling issue
Date: Sat, 2 Sep 2023 11:56:37 -0600	[thread overview]
Message-ID: <2cfbcf8d-911f-a64b-8916-12b005c9f6f6@Shaw.ca> (raw)
In-Reply-To: <550e8950-8f7a-4765-b23e-57d0e710fde0@jeffunit.com>

On 2023-09-02 08:57, jeff via Cygwin 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.

What Windows edition and version are you running?
For details run:

$ reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion" \
| sed '/^\s\+\.*\s/!d;/^.\{80,\}/d'

Some retail editions limit you to 64 threads and that seems to be your case:

	NUMBER_OF_PROCESSORS = '64'

To make full use of your processors, you may have to upgrade your Windows to a 
commercial licence (and installation) of Windows 10/11 Pro for Workstations, 
enabling server features on non-server "Worskations" ~ HEDTs (High-End 
DeskTops); see:

https://www.anandtech.com/show/15483/amd-threadripper-3990x-review/3

or just run Linux!

Watch out for terms misused like processor == socket on some sites!

Also, you have to consider these are server systems, mainly designed for VM not 
HPC (High Performance Computing) parallelism.

Your older system has higher base and boost/turbo clocks 3.0-3.3GHz: your newer 
system has lower clocks 2.25-2.65/3/3.5GHz which seems to depend on OEM target.

You may also need to upgrade your memory, as each core could run ~10GB/s 
instructions, and these workstations are often provisioned with 128-256GB 
(2-4GB/core), so that may also need a Windows edition upgrade.

-- 
Take care. Thanks, Brian Inglis              Calgary, Alberta, Canada

La perfection est atteinte                   Perfection is achieved
non pas lorsqu'il n'y a plus rien à ajouter  not when there is no more to add
mais lorsqu'il n'y a plus rien à retirer     but when there is no more to cut
                                 -- Antoine de Saint-Exupéry

  reply	other threads:[~2023-09-02 17:56 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-02 14:57 jeff
2023-09-02 17:56 ` Brian Inglis [this message]
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
2023-09-02 19:30 André Bleau
     [not found] ` <e36d50d5-75d0-40d5-92e2-02d04092fd77@jeffunit.com>
2023-09-02 21:23   ` André Bleau

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=2cfbcf8d-911f-a64b-8916-12b005c9f6f6@Shaw.ca \
    --to=brian.inglis@shaw.ca \
    --cc=cygwin@cygwin.com \
    --cc=jeff@jeffunit.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).