View Issue Details

IDProjectCategoryView StatusLast Update
0001608Issue 8 draftsBase Definitions and Headerspublic2024-06-11 09:12
Reporterdannyniu Assigned To 
PrioritynormalSeverityCommentTypeEnhancement Request
Status ClosedResolutionAccepted As Marked 
Product VersionDraft 2.1 
NameDannyNiu/NJF
OrganizationIndividual
User Reference
Sectionsysconf
Page Number--
Line Number--
Final Accepted Text0001608:0006008
Summary0001608: Suggesting informative texts for bug-id339
DescriptionAlthough 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 ActionAdd 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.
Tagsissue8

Relationships

related to 0000339 Closedajosey 1003.1(2008)/Issue 7 Add _SC_NPROCESSORS_CONF / _SC_NPROCESSORS_ONLN to sysconf(3) / unistd.h 

Activities

geoffclare

2022-10-20 15:58

manager   bugnote:0006008

After D2.1 page 2061 line 66817 section sysconf(), add:
Although the queries _SC_NPROCESSORS_CONF and _SC_NPROCESSORS_ONLN provide a way for a class of "heavy-load" application to estimate the optimal number of threads that can be created to maximize throughput, real-world environments have complications that affect 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 on battery power, and applications should co-ordinate with the system to ensure that a long-running task can pause, resume, and successfully complete even in the event of a power outage.


In case a portable "heavy-load" application wants to avoid the use of extensions, its developers may wish to create threads based on the logical partition of the long-running task, or utilize heuristics such as the ratio between CPU 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 => --
2022-10-20 15:42 geoffclare Relationship added related to 0000339
2022-10-20 15:58 geoffclare Note Added: 0006008
2022-10-20 15:59 geoffclare Final Accepted Text => 0001608:0006008
2022-10-20 15:59 geoffclare Status New => Resolved
2022-10-20 15:59 geoffclare Resolution Open => Accepted As Marked
2022-10-20 15:59 geoffclare Tag Attached: issue8
2022-11-08 14:45 geoffclare Status Resolved => Applied
2024-06-11 09:12 agadmin Status Applied => Closed