From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-x635.google.com (mail-pl1-x635.google.com [IPv6:2607:f8b0:4864:20::635]) by sourceware.org (Postfix) with ESMTPS id A7B773858D39 for ; Sat, 2 Sep 2023 18:27:12 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A7B773858D39 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=jeffunit.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=avicarmi.com Received: by mail-pl1-x635.google.com with SMTP id d9443c01a7336-1c0c6d4d650so1052025ad.0 for ; Sat, 02 Sep 2023 11:27:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jeffunit-com.20230601.gappssmtp.com; s=20230601; t=1693679231; x=1694284031; darn=cygwin.com; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:to:subject:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=hn/D+wPl3Hgh/bDnyPd7d3ZCn5ZYHvRjycF6bfxAVpw=; b=H/ch5wi2MvbYw891mqGe6ZdnDlrsVL3wnEW3ZPsqQnU59037S+DtIBFvlgmIU6CLys 1yvdRRBAFs8ggVh3Vms0Q4VsJV6nx5NXVKBLEV7lPFoNOLC25u2HgyeJ3yoOChEP2VkP Qo3Uhp4LVXYdcoszPIiYgJ48dIy1UzxcvRg4yPo3ggulzDNSXAE6hxPZ5T2J9lV3vCid 0dAKinpSo/krjJpGmhVHtJ6VfiETeRv2vODEQgLCAWLD0+TFFXe7l2q4PDeXn9HzQf22 MPOYf/DdvVZuLqQ4SJr8VcN+yU2NnVUIHHUp6x9t1a4O/sAGHLpnx/mOBoxpviNTi7Xh WGXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693679231; x=1694284031; 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=hn/D+wPl3Hgh/bDnyPd7d3ZCn5ZYHvRjycF6bfxAVpw=; b=VfybzUsNzyukBXlSfJNMr+yYBchQ/MK/7kPQyhBfEWWRrjEeuSaFdhz0yuoj7XLIFY fzbWUy5gHO6wqbMBV6dgFkwT69CAytkpldzGF8szOVyKqA0a4aG0SkWtKGh2nWY+E0YJ A3eeRv7ijWkMmFrztmQdWMiR5pgS5aEouu3ftVRVx8JXDyus94xctko7WOuxQKndQ66V JuG51nw2f0nOdiRDadfgLW6iGMU6z9tMHg8PMjrO//p93BMFDfLf0KT+iCvHKSiG1miz HvsJkQOXqnwcrgwdO9en8bPVo2asOAl3MIw5/C6gGanjoSWzsaF9OP0LAg2hIz7lW1I2 Wmbw== X-Gm-Message-State: AOJu0YzTeoxlr0wDySku3+kd5yxk/ARJjqtjoQHYMerwgRADDRDokigV Auq6iQvH4yNGNofiRYUfno6rnrs/tQD1TahQgCc= X-Google-Smtp-Source: AGHT+IHojf+zsQZu4ULp/N2Aa6LjTvvpzhb+C56fhom3lsSBdZkR/8PIHBsXVjjEsF6hnBcafG5QIg== X-Received: by 2002:a17:902:e5c7:b0:1c3:2af5:19ea with SMTP id u7-20020a170902e5c700b001c32af519eamr1634051plf.28.1693679231169; Sat, 02 Sep 2023 11:27:11 -0700 (PDT) Received: from ?IPV6:2603:8001:833f:6440:2008:c9bc:a358:68c? (2603-8001-833f-6440-2008-c9bc-a358-068c.res6.spectrum.com. [2603:8001:833f:6440:2008:c9bc:a358:68c]) by smtp.gmail.com with ESMTPSA id bd10-20020a170902830a00b001bd99fd1114sm4910442plb.288.2023.09.02.11.27.10 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 02 Sep 2023 11:27:10 -0700 (PDT) Message-ID: Date: Sat, 2 Sep 2023 11:27:09 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: posix thread scaling issue To: cygwin@cygwin.com References: <550e8950-8f7a-4765-b23e-57d0e710fde0@jeffunit.com> <2cfbcf8d-911f-a64b-8916-12b005c9f6f6@Shaw.ca> Content-Language: en-US From: jeff Autocrypt: addr=jeff@jeffunit.com; keydata= xsFNBFFKfi0BEACrMpYE2LikN1PK/gcaqARn7RYzGX6MNgwYwzkNJH9kO3EUp+zWlsiPkSJs iojDBWuel1KySD1YPU1a3D4j5IsDlsuL1qAfU2pWszdR4m5wQtYNSMBTcWbAzeTuadcsuDsp 7NqjA+J2sbOJ5p1VUW+lsdqVaR3xYhAemyyFouqsCyvsbghkmp+/MHLUaFFGETyrDBYhzyrF N2ZDUpsVsnSiMEWToC2TR6kdXnKOnTcNteyUR6QbpXopPj7oTrIqodetrqwH0Tx/zr4CvURG g5XR7D5yGEbUEt4WIBBFNRD1yNdUYb1iqcpwZ2CD5AfG7Dh0/I3i5ECSmMDmFYyLh41IElvy MELxK8DpMxCw42vcyPcAvWDr9F5AoMQTxj8SNa42WAHicp/vqa0d+OF7IYMBz0BrN2Ry3NzD mmMMdSw+tY7eqjFUC9KEIbUlryIshZEMbAHfAmMUXVrxTYDf+48ZhBNbAuPcca5Sd/qhfSF2 8+KL7UY79/wZ0VCuuQbV4cjCj1wu97sVVwcXwV4hgdfa17TF476pc7ZjGLpK4sXKRlANSnd5 AIhMx9MV8tf1lOt8GIWE07X2iufoMvXG8GkRQ7qX+VIdAmox0FackOnBWzJYB1l+eHTWQpA5 gAm6eJ7jmiw8+RS+0lzMYD3iKgaWWMRmTa8TYySIZ6xNvjxd9wARAQABzR9KZWZmIERlaWZp ayA8amVmZkBqZWZmdW5pdC5jb20+wsF3BBMBAgAhBQJRSn4tAhsDBgsJCAcDAgYVCAIJCgsD FgIBAh4BAheAAAoJECzT/SfdIo+7segP/iqmAM6JdnQz+S6gp4xOCDpUcaq+FzlRaLBfb7H2 KCjFAaPt5T1LdAHC8OM3TS05qfLKX2XIk0jKhC43LSiKNkbOeMKNUG2TuNNjqSY2ANe+pJan POsxbcsASFYD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1Z2ThQ7x9wxXAnRaAAACmUm2K72sy25NdVV+rmEym7+Xk3HSWtQb87iH3EAiBA1y uqP8bhrjLGhWEhtbbB/SE0F6rLF7evIJcHrpt7t4duBfychvD3D0dcEh8fs9KWRDh8Y/PTVh HWxontkFufnG2JTbW7xc8r5I7riVON8DdVQYCW1ySGm0+QARAQABwsFfBBgBAgAJBQJRSn4t AhsMAAoJECzT/SfdIo+7EcYP/2++R3u/JtD0xRGnpaPxrHhWiBUoBc7m93E7pLVWND1KBxQd whbvQFZiKel4+t4huT3Yziu/kVFZDVkhExUTD4xKKL3MuyYe0tK3kEHGbc9xLA+btzWrjwJa vB+c/TBeZzto/+So+bga8ldpYzmhy65u2f7cKUgNfB65ber2WRjXErfwcWsnM/DpGR6eGCnm nkpFh5E51k3fovd0ArNAzQBPzcCh/28F0nEiiRAYUhIb9YvM2jVjCiTpib9VQldqWHJlL5tf 5lD2pN2WdAhFi2d5GwjcWytLTTIfeLEEf9Gp2iRFAEpXVbfiTia18O5f9R954byYke1+FgOo b2yZ5IFeBtKsQnSEF0K0ravSqYXsiVZgDCSXLWMP3J8vdhJtAvajXs4Mpa34ckRBOg2Cwd07 Eav6e1A1qk4l1wnoXijQOkXVW78aQ4CCJP4cSXPJnkbr13sCsOwzj0A1NO71Qtzf5sst3d5h QDnSPe9uLLlhuN0CsJtS77qpz7+tklLTamOl87bJXlIG6hFkYl+ihXlKz9z2nNgA/kf7nREY lWKxc6dL37LdzkRF0TH1Ga/eNlYxbkPsBwA3zSudZOjNIntxyLgOgimxeBvSuseohZ6KxYUM DbaOL/wbvdgYz5IAgBn84By+TXS5wUjNrr9m7kaZIIY2L413mUGjZgBrFhVS In-Reply-To: <2cfbcf8d-911f-a64b-8916-12b005c9f6f6@Shaw.ca> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 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 List-Id: 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. >> 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. Here is the output of your regex:     SystemRoot    REG_SZ    C:\Windows     BaseBuildRevisionNumber    REG_DWORD    0x1     BuildBranch    REG_SZ    vb_release     BuildGUID    REG_SZ    ffffffff-ffff-ffff-ffff-ffffffffffff     BuildLab    REG_SZ    19041.vb_release.191206-1406     BuildLabEx    REG_SZ    19041.1.amd64fre.vb_release.191206-1406     CompositionEditionID    REG_SZ    Enterprise     CurrentBuild    REG_SZ    19045     CurrentBuildNumber    REG_SZ    19045     CurrentMajorVersionNumber    REG_DWORD    0xa     CurrentMinorVersionNumber    REG_DWORD    0x0     CurrentType    REG_SZ    Multiprocessor Free     CurrentVersion    REG_SZ    6.3     EditionID    REG_SZ    Professional     EditionSubManufacturer    REG_SZ     EditionSubstring    REG_SZ     EditionSubVersion    REG_SZ     InstallationType    REG_SZ    Client     InstallDate    REG_DWORD    0x61e2300a     ProductName    REG_SZ    Windows 10 Pro     ReleaseId    REG_SZ    2009     SoftwareType    REG_SZ    System     UBR    REG_DWORD    0xcfc     PathName    REG_SZ    C:\Windows     ProductId    REG_SZ    00330-80000-00000-AA073     DisplayVersion    REG_SZ    22H2     RegisteredOwner    REG_SZ    jdeifik     RegisteredOrganization    REG_SZ     InstallTime    REG_QWORD    0x1d809b6d4ce7b09 In practice, but the new and old processors typically run at about 3ghz when under load. When idling, both processors use about the same amount of power. I have 128gb of ram, in 4 slots. Using that configuration, I can get 100% load and significant faster performance on linux. Therefore I conclude the issue is either with windows or cygwin, and is not a hardware issue. When I run cinebench, I can get to 100% cpu utulization (at around 3ghz) on windows. As for what the processors are 'designed' for, I really don't care. I want a reliable, fast computer with ECC memory, and I can get that with an EPYC processor. If a workload needs more than 128gb of memory, you pretty much need to use server processors. I can put in up to 2tb of memory in my system, if I have the need for that. jeff