X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0A23D385843E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1693689807; bh=Mi7yu8g2S1O090T0s8h6tpw98ju9lJnJQuUmJ0oEaKA=; h=To:Subject:Date:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=lPkBDUrexz4x2soH5lyWqFB0zpFt6eJm4tzZFRE8/VbP7hTfsWLGeC8YK85Lc4pMf p2xFGenrVOLymg4ZqEelCvFSVwIw3sFLijptxX3A+0kpQhWtjptqYzW0pyMtL96Fk+ YvQjrFEty4BFm+XtsCcZs5nnfQhr+Q3vDuqDsjdY= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 400623858CD1 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WZP9TYVs6E3LXTxP2+FZRUrHhZYA4gOqbGMTXqgVErbIxYu1DuCTN8RPnQY3hLPg7thbgRWglsna/lfZRoaQfMpz9R/EtNKMzHzEtx8GZAbusLzRSWqUGZLwv2bbIkv0CLtKiqpTJG4Y6ZRhu62wtiMsCIX4HVLTIaOYSwCu1T+Exaem63PEbo8tpfUyvyKg0xzwAysm8TdYqM4Lm95YBX5iUpmJ+Hak3fzZkGxQGvNCzEbG7qBvzRH+Jv5uI4zk7PJ/3Nd+75TxxSD0WSxbkNHhyJFXw3NcSf0XBddPR1Vea1FIlbIlHTKVKxiHK9v5kD5PCuOLFKzZfR0dCegFZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=DU37klNrr2FJluQfF2D0h2003GZAQgdGyN2DoEkvYMs=; b=a6AC1NKY5O1REc+6zMHM5DLn1uSnBGSy1QWdtlEMiUfGI1EGHXT/CS/9Vgf2R01yd3eSj+R89v4p/WIINBbFTNTy2TDOvUoVqgvlPqGy6uV2C1awjOoqv9dHQHt4WK6mh4yhI/tfNc+EtsnWKftdg+WgOckewffZnBkewXUye4GxnT223jNqiOHoQm2i4v/R4W51ASCQRA1z9VS6/Cm6k4q8+pA6+nQWIkS5h6vPjfvGO3E4BRV1FjEfap1loCwllQ7w4X7xoHc1Uk0/V5+J76jvSEwY7mYyHmn2/lnS3gp/8xR+cYHt2TvruEGe9GOHqBR5/bEhQ/h6agOeviVK4g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none To: "cygwin AT cygwin DOT com" Subject: Re: posix thread scaling issue Thread-Topic: posix thread scaling issue Thread-Index: AQHZ3dPAE/RVWXqTpkamsR5tXy0XwLAH796AgAAYQuM= Date: Sat, 2 Sep 2023 21:23:08 +0000 Message-ID: References: In-Reply-To: Accept-Language: fr-CA, en-US Content-Language: fr-CA X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: x-ms-exchange-messagesentrepresentingtype: 1 x-tmn: [wrXa/uz29a9TC1zygU8FX1vrdhFCYJLJ] x-ms-publictraffictype: Email x-ms-traffictypediagnostic: SN7PR14MB7000:EE_|DS7PR14MB6953:EE_ x-ms-office365-filtering-correlation-id: 70f491fb-3827-407f-ee5e-08dbabfacde9 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: kRGzC698P4igFky7ga3EpVCXVokEXEboqFCKYlfPEU/dh4/o1B2GoikRxZtjwee4Oq4RUm3dbc0B+8Epq8qt7exzhq4zUxznGxbkEM1a/aiP6Zw00tBC2hX6ole1Pb8/6wM3hU4nHo96brJzCKF8Da7zNO+aqc4IWXdBF576jmfLaptW7+jeZYLg8+PAoXmi4hkuEx24VIvHOtz+bpChE6whzTesaspieOMRD+4BZfsIkDSMUi57gQ70mtUxkHpgdEXxYw7OH2sLcjXPxRy0ajCngzz0MnfrQn7uJickMTdyXp8v3oktnn10G1kGKpOtuql4pCVpca3rZjN/k6HmarmhQNnl1P0gCF9SoAD5aKClQJM2xZJdrnV6M0FttOa2nlmW1qudi3fGVsHKP68UWHq06H+kn75fFawV3AkVetV5+eoios3C/FI8y++rer5+fUVCWzxQGMiksJXm15voXspKh1RERhHXHMD4E6kYvybIS83kUaMEx5j2rYzOeOGkVuonnc8E31j17FZjweubpbK0q2dxNo3p2ASauE+pVYy7qDlfunkg2QcKcQKKjX8O x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?Q?YAOqN69e8tI1DaH9LzfsFn7cJUQHutlDMUbhRteZXmL4cJT9s0lPt4VZpt?= =?iso-8859-1?Q?rmcrjkjBcK0n1UmED8GszzcoY3UVkx7OXEGWmaMz8Nx1NJxdtOzUn78aM+?= =?iso-8859-1?Q?rgnPc8Wwkzs1xOJUwz7vyINAXZgtJJYZZcIBVheaUFE73FBS5kgBNHYcdb?= =?iso-8859-1?Q?GGgPRW8UiVWDolGaXJaaRbSEajmvNg0w8Tz2K/ybWJrM/2r4uw5FTIVHSn?= =?iso-8859-1?Q?xeIhb5GQk/d39r4b/72K+jXhUJ6NCen+ijNRiy6QMSmvBR82avtqGRlmb1?= =?iso-8859-1?Q?SYti0ODrF/4uxp2i4fKE3SWdff2LfO/kdG8GnqDoRebwI35d5ggsGXkspt?= =?iso-8859-1?Q?/NO0D//CRMED8tBJrBKDHoe0uzx0sZx7DdpJHFL+zllVlvr3L5vs4ZjFxM?= =?iso-8859-1?Q?vxAkKIwCOOJ/ril/J2vbDWc/RubK0Cc81L7fu+tu1MMXWK+Av8K0ayY3OV?= =?iso-8859-1?Q?A4wPpGhJcAhLulyPGnCQCds2p+MGRQ2bMJOYId+Wobutx7kcASJlZlXb+j?= =?iso-8859-1?Q?rh54rT92qsUS/DG+AxSXsMSCRXh8Xbo+zH49W2/G8fqV8kV00zNLlVwkgT?= =?iso-8859-1?Q?MEpoQSL3SQL887LPQq8arru/ZKGgaFyT9GroP7u2DFw7Gl/nCexIf7W02i?= =?iso-8859-1?Q?HYK3IetcdzfIrZNoaqM12J0Zgl1yh1iAWrWCNM1hQpJuleK9t3vJlcNrDQ?= =?iso-8859-1?Q?81RumMwnW4cgL7E2L9KW6fcFR+k2wh2q06D5dfJGCxw60IgAF4ycgsyLJQ?= =?iso-8859-1?Q?ZAqYcuIIfD1uKr0ygFtSzRWWLvbgkgNhVxj/BEM7vizR92HWdDkt4vWPW/?= =?iso-8859-1?Q?wIuKW5kBWpaNdml8qqxs2BrNfXHUhDDBTfZ95cjGz8MEK5XrQQAhW1Fn2X?= =?iso-8859-1?Q?57aOFEGgTpjcd8cz0hYHKvkeNd9QGf26bd5VIYfsTTJk+wNRK2iBLZ/Obx?= =?iso-8859-1?Q?CxmRncy7kOeKlBSOLN0M1uSLv9ie9qMFN8HqhuTHrYyA7oQkCPquvVBEZu?= =?iso-8859-1?Q?5QY9Q/UEQ9n90vN0DWNFMpakDJ0tuEWauaQsX0ZUT1GZlUdBdvuS/hn5l9?= =?iso-8859-1?Q?+YsAlDreYKRrknQWPr0sh0+lcys0XmT+W67ZNZjmnw8z2qlN1lel4gZgYZ?= =?iso-8859-1?Q?iPVTPvHviGPdwa4/Eo9/kjs75kKVTS4tIo1uEDX0LKzOKT7h9vRdRYUchk?= =?iso-8859-1?Q?GKSzf2C6Qud+HCBaP1/O4fNIP+HjukTbt6ow7HY1rfHgT0Frort8IYzc+o?= =?iso-8859-1?Q?g5vWwqJqMcDyT3DQr4VA=3D=3D?= MIME-Version: 1.0 X-OriginatorOrg: sct-15-20-4755-11-msonline-outlook-cd57b.templateTenant X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SN7PR14MB7000.namprd14.prod.outlook.com X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-Network-Message-Id: 70f491fb-3827-407f-ee5e-08dbabfacde9 X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Sep 2023 21:23:08.7817 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR14MB6953 X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, SPF_HELO_PASS, 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 X-BeenThere: cygwin AT cygwin DOT com X-Mailman-Version: 2.1.30 List-Id: General Cygwin discussions and problem reports List-Archive: List-Post: List-Help: List-Subscribe: , From: =?utf-8?q?Andr=C3=A9_Bleau_via_Cygwin?= Reply-To: =?iso-8859-1?Q?Andr=E9_Bleau?= Content-Type: text/plain; charset="iso-8859-1" Sender: "Cygwin" Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id 382LNSOB004538 Jeff wrote: > Thanks. I am doing the memory allocation in a single thread. > The compute uses all the threads I can get, and the compute isn't > scaling very well with cygwin. > It does work well on my 16 core 32 thread processor, so for most people > the posix threading is fine. > jeff For the multi-threaded program that I wrote, with up to 64 threads, I compile each file with: x86_64-w64-mingw32-c++ -O3 -c file.cpp and link with: x86_64-w64-mingw32-c++ -o program *.o -static-libgcc -static-libstdc++ -Wl,-Bstatic -lstdc++ -lpthread -Wl,-Bdynamic And I get could results. 100% CPU use; I even need to lower the priority of the program to keep a snapy Windows UI. You may try the same to see if it improves the performance of your program. Regards, - André Bleau -- 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