[
https://issues.apache.org/jira/browse/TS-2279?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14095701#comment-14095701
]
Brian Rectanus commented on TS-2279:
------------------------------------
Additionally, the docs in master do not match the code at all:
{noformat}
.. ts:cv:: CONFIG proxy.config.exec_thread.affinity INT 0
Bind threads to specific processing units.
===== ====================
Value Effect
===== ====================
0 assign threads to machine
1 assign threads to NUMA nodes
2 assign threads to sockets
3 assign threads to cores
4 assign threads to processing units
===== ====================
.. note::
This option only has an affect when Traffic Server has been compiled with
``--enable-hwloc``.
{noformat}
In 4.2.x, it seems to match:
{noformat}
.. ts:cv:: CONFIG proxy.config.exec_thread.affinity INT 0
Bind threads to specific CPUs or CPU cores.
===== ====================
Value Effect
===== ====================
1 assign threads to sockets
2 assign threads to real cores
3 assign threads to logical cores
0 don't assign threads to any cores
===== ====================
.. note::
This option only has an affect when Traffic Server has been compiled with
``--enable-hwloc``.
{noformat}
> proxy.config.exec_thread.affinity's values
> ------------------------------------------
>
> Key: TS-2279
> URL: https://issues.apache.org/jira/browse/TS-2279
> Project: Traffic Server
> Issue Type: Bug
> Components: Configuration
> Reporter: Igor Galić
> Assignee: Igor Galić
> Fix For: 5.2.0
>
>
> The setting of {{proxy.config.exec_thread.affinity}} only has an affect when
> traffic server was compiled with {{\-\-enable-hwloc}}. It has *no* affect at
> all, not even a warning about its being ineffectual when setting that value
> while trafficserver is *not* configured with {{--enable-hwloc}}.
> Further, mgmt/RecordsConfig.cc defines a range of {{[0-1]}}:
> {code}
> {RECT_CONFIG, "proxy.config.exec_thread.affinity", RECD_INT, "0",
> RECU_RESTART_TS, RR_NULL, RECC_INT, "[0-1]", RECA_READ_ONLY}
> {code}
> but the code uses a range of [0-3]:
> {code}
> #if TS_USE_HWLOC
> if (affinity != 0) {
> int logical_ratio;
> switch(affinity) {
> case 3: // assign threads to logical cores
> logical_ratio = 1;
> break;
> case 2: // assign threads to real cores
> logical_ratio = pu / cu;
> break;
> case 1: // assign threads to sockets
> default:
> logical_ratio = pu / socket;
> }
> {code}
> And finally, 1 is the default value, rather than issuing a warning about an
> incorrect value.
--
This message was sent by Atlassian JIRA
(v6.2#6252)