public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: jeff <jeff@jeffunit.com>
To: cygwin@cygwin.com
Subject: Re: posix thread scaling issue
Date: Sat, 2 Sep 2023 13:04:10 -0700	[thread overview]
Message-ID: <076456ca-2c5d-4bb3-a64b-97ed4bdd26ce@jeffunit.com> (raw)
In-Reply-To: <07386659-68b3-a35d-1402-22684f8e5755@Shaw.ca>

On 9/2/2023 12:59, Brian Inglis wrote:
> On 2023-09-02 12:27, jeff via Cygwin wrote:
>> On 9/2/2023 10:56, Brian Inglis wrote:
>>> 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.
>
> Both Windows and Cygwin support multiple processor groups, as some 
> developers, maintainers, and users need support on such systems, and 
> the process and thread support has been added to Cygwin.
>
>>>> 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.
>
>> I am running windows 10 professional. Using the task manager, 64 
>> cores and 128 threads shows up for my processor.
>
> As the linked AnandTech article shows and explains with Task Manager/ 
> Performance tab, Win 10 Pro may think you have dual sockets, that 
> limits the maximum thread parallelism you can achieve:
According to the task manager, it says 'Sockets: 1'.

jeff



  reply	other threads:[~2023-09-02 20:04 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
2023-09-02 18:27   ` jeff
2023-09-02 19:59     ` Brian Inglis
2023-09-02 20:04       ` jeff [this message]
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=076456ca-2c5d-4bb3-a64b-97ed4bdd26ce@jeffunit.com \
    --to=jeff@jeffunit.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).