The following issue has been SUBMITTED. ====================================================================== https://www.austingroupbugs.net/view.php?id=1608 ====================================================================== Reported By: dannyniu Assigned To: ====================================================================== Project: Issue 8 drafts Issue ID: 1608 Category: Base Definitions and Headers Type: Enhancement Request Severity: Comment Priority: normal Status: New Name: DannyNiu/NJF Organization: Individual User Reference: Section: sysconf Page Number: -- Line Number: -- Final Accepted Text: ====================================================================== Date Submitted: 2022-10-14 11:27 UTC Last Modified: 2022-10-14 11:27 UTC ====================================================================== Summary: Suggesting informative texts for bug-id339 Description: Although creating as many threads as there are CPU cores is a simple way to maximize CPU usage, there are subtleties that make it not always the case. As explained in my proposed addition texts in the desired action. Desired Action: Add informative texts to appropriate sections in sysconf:
Although the queries _SC_NPROCESSORS_CONF and _SC_NPROCESSORS_ONLN provide a way for a class of "heavy-load" application to "guess" the optimal number of threads that can be created to maximize CPU usage, real-world environments have complications that affects the actual efficiency that can be achieved. For example: - there may be more than one "heavy-load" application running on the system, - the system may be battery power, and applications should co-ordinate with the system so as to ensure long-running task can pause, resume, and successfully complete even in the event of power outage. In case where a strictly standard-conforming instance of "heavy-load" application wants to avoid the use of vendor-specific APIs, they may wish to create threads based on the logical partition of the long-running task, or utilize heuristics such as the ratio between execution-time and real-time. ====================================================================== Issue History Date Modified Username Field Change ====================================================================== 2022-10-14 11:27 dannyniu New Issue 2022-10-14 11:27 dannyniu Name => DannyNiu/NJF 2022-10-14 11:27 dannyniu Organization => Individual 2022-10-14 11:27 dannyniu Section => sysconf 2022-10-14 11:27 dannyniu Page Number => -- 2022-10-14 11:27 dannyniu Line Number => -- ======================================================================