From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from omta001.cacentral1.a.cloudfilter.net (omta001.cacentral1.a.cloudfilter.net [3.97.99.32]) by sourceware.org (Postfix) with ESMTPS id CC1E33858CDA for ; Sat, 2 Sep 2023 17:56:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org CC1E33858CDA Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=Shaw.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=shaw.ca Received: from shw-obgw-4001a.ext.cloudfilter.net ([10.228.9.142]) by cmsmtp with ESMTP id cP5pqNSSFLAoIcUrOqQpgy; Sat, 02 Sep 2023 17:56:38 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=shaw.ca; s=s20180605; t=1693677398; bh=ZRoTNnO2DZO3Xd61Rql8FKVnaHioc9wEkvM1T8FXV9Y=; h=Date:Reply-To:Subject:To:References:From:Cc:In-Reply-To; b=MJ3o6VaqN1CH83HxljAYxY9MLs9/YGm+3QjnK3YH6oSawjXwbbrgx0jgx6s7GvrOo oe3dSZAnD3VXH/b2PFAkHQA99nuVg+q40IlwrW2Y0pVAuqBFUFMJJnxvLmnf//tTPK JOpkbyH36Qy3MdduB9NfoSzbOED220xWNFJnpIl9Lgc3q/tbE2YyR9mbfihv8AmuQW QI8f2ag9QtliggxsQ0pQNZ0RPIoj3wbUfLtOZdyA3rXZjuCjq7IFiDHuBNtEj6hwcU e/HXMWJg0Ihzns+cNkdH9hHlurkeB/iHPsbWAhmR2sHi/FLMDIjUUGOz5nymzC8Dwc 8KkeFuKafXqeQ== Received: from [10.0.0.5] ([184.64.102.149]) by cmsmtp with ESMTP id cUrNqmloJHFsOcUrNqQGNF; Sat, 02 Sep 2023 17:56:38 +0000 X-Authority-Analysis: v=2.4 cv=XZqaca15 c=1 sm=1 tr=0 ts=64f37756 a=DxHlV3/gbUaP7LOF0QAmaA==:117 a=DxHlV3/gbUaP7LOF0QAmaA==:17 a=IkcTkHD0fZMA:10 a=6whCB0ajAAAA:8 a=8yAGy4MYwIvsohbVvR0A:9 a=QEXdDO2ut3YA:10 a=yGKlR3sVXOPn9h0UBopn:22 Message-ID: <2cfbcf8d-911f-a64b-8916-12b005c9f6f6@Shaw.ca> Date: Sat, 2 Sep 2023 11:56:37 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.15.0 Reply-To: cygwin@cygwin.com Subject: Re: posix thread scaling issue Content-Language: en-CA To: cygwin@cygwin.com References: <550e8950-8f7a-4765-b23e-57d0e710fde0@jeffunit.com> From: Brian Inglis Organization: Inglis Cc: jeff In-Reply-To: <550e8950-8f7a-4765-b23e-57d0e710fde0@jeffunit.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-CMAE-Envelope: MS4xfOWleDmtvUf0/aqVeiE0zQaOzelI/qe89sPLjgHheNboz01koU/X5feuR+CKA6FjK4YqipTxwVIuqByTpMjYv2z0oB1duk+tT1f0slIc5cgfsRomwk2x gjYKnrsn4Kx1yNt2+aG3W1OZiGLBbbZt5r2RHrEl5Clt2neSSW5GKE+pdu4xSjg1TCjB2Sy2Kn7u7JVSHz+UXom12yCvbwrTsrM= X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: 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