X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 276C43858017 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1693685090; bh=LqQe32qWo1ZCUTLnfGaKzJo2DEXvb4j8OT2MaYSj6EM=; h=Date:Subject:To:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=udhA9I6J3swWYJTpfPPfSYW/bJEssZGKjvhAxxlnAZq6tf1fgHALSjZ5D8+PI83UO zVnzNZim7iY7sCnSUWYVQkCQCJPrBew//XDg0pTD6yqyA4qOrO99YStMzP7sGWXHEE 08AHh2i++yIuTgwDgey6fYQYfMERq2BtP2H6mJeg= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 22B403858CDA X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693685052; x=1694289852; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:to:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=AjZN+g9kL5AwgCQBhaGqQ85XYjqqW7hpzFz5AYHuOyk=; b=e+pd6Lc7OUAjD/fi7y5DWoUM1mYmz03WWdmhulchjTinn40NO3bWSSqK5bORxBR8hF 87T0Y/Hj2Vhn8SPQ9QRlTrW/QQssTZw+Bj69gP7Mtj3mebNNGIhjdvE92YpP9HfyDzna zXEV5HJJGAa0nv4fQH4GJR5KcElLEmZCDnpV84uIBzk084BvgAOyoJ0O5QKEa24rhLYh 2Vy/kA6WUsn81UONge+fw/ifIcEknqj5OpSZgzjAGqHd+zEkRw62H+56vl3CPS6s91Jq TgxNNvsmU6eGWmy8uD/mhOEIR8ikIXaLO2T8Z64A4k2qp65O0YNOqYuvNlU0w30BxHFy d0EQ== X-Gm-Message-State: AOJu0YxYOkaDUtEA9IY60EeTCMivfNJNE3LGH88yiNQ2zKpTdfkHU1QM uiu7GsnKG2Ub3R1jA8rjpN3OdGVc/fHdUXO52Yg= X-Google-Smtp-Source: AGHT+IGbBum8hfVjFUpFxpbUVK2NAI63FopKwAW/OmXnmF559pV+jErL9F8A7L4BeKb3+kRbXFu5Zw== X-Received: by 2002:a05:6e02:11b0:b0:346:d51:9922 with SMTP id 16-20020a056e0211b000b003460d519922mr5820597ilj.13.1693685052147; Sat, 02 Sep 2023 13:04:12 -0700 (PDT) Message-ID: <076456ca-2c5d-4bb3-a64b-97ed4bdd26ce@jeffunit.com> Date: Sat, 2 Sep 2023 13:04:10 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: posix thread scaling issue To: cygwin AT cygwin DOT com References: <550e8950-8f7a-4765-b23e-57d0e710fde0 AT jeffunit DOT com> <2cfbcf8d-911f-a64b-8916-12b005c9f6f6 AT Shaw DOT ca> <07386659-68b3-a35d-1402-22684f8e5755 AT Shaw DOT ca> Content-Language: en-US Autocrypt: addr=jeff AT jeffunit DOT com; keydata= xsFNBFFKfi0BEACrMpYE2LikN1PK/gcaqARn7RYzGX6MNgwYwzkNJH9kO3EUp+zWlsiPkSJs iojDBWuel1KySD1YPU1a3D4j5IsDlsuL1qAfU2pWszdR4m5wQtYNSMBTcWbAzeTuadcsuDsp 7NqjA+J2sbOJ5p1VUW+lsdqVaR3xYhAemyyFouqsCyvsbghkmp+/MHLUaFFGETyrDBYhzyrF N2ZDUpsVsnSiMEWToC2TR6kdXnKOnTcNteyUR6QbpXopPj7oTrIqodetrqwH0Tx/zr4CvURG g5XR7D5yGEbUEt4WIBBFNRD1yNdUYb1iqcpwZ2CD5AfG7Dh0/I3i5ECSmMDmFYyLh41IElvy MELxK8DpMxCw42vcyPcAvWDr9F5AoMQTxj8SNa42WAHicp/vqa0d+OF7IYMBz0BrN2Ry3NzD mmMMdSw+tY7eqjFUC9KEIbUlryIshZEMbAHfAmM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SXLWMP3J8vdhJtAvajXs4Mpa34ckRBOg2Cwd07 Eav6e1A1qk4l1wnoXijQOkXVW78aQ4CCJP4cSXPJnkbr13sCsOwzj0A1NO71Qtzf5sst3d5h QDnSPe9uLLlhuN0CsJtS77qpz7+tklLTamOl87bJXlIG6hFkYl+ihXlKz9z2nNgA/kf7nREY lWKxc6dL37LdzkRF0TH1Ga/eNlYxbkPsBwA3zSudZOjNIntxyLgOgimxeBvSuseohZ6KxYUM DbaOL/wbvdgYz5IAgBn84By+TXS5wUjNrr9m7kaZIIY2L413mUGjZgBrFhVS In-Reply-To: <07386659-68b3-a35d-1402-22684f8e5755@Shaw.ca> X-Spam-Status: No, score=-0.2 required=5.0 tests=BAYES_00, BODY_8BITS, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: cygwin AT cygwin DOT com X-Mailman-Version: 2.1.30 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: jeff via Cygwin Reply-To: jeff Content-Type: text/plain; charset="utf-8"; Format="flowed" Errors-To: cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com Sender: "Cygwin" Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 382K4oiQ013443 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 -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple