Performance system values: Thread affinity

The Thread affinity system value is also known as QTHDRSCAFN. You can use this system value to specify whether secondary threads are grouped with the initial thread (thread level). You can use it to specify the degree to which the system tries to maintain the affinity between threads and the subset of resources they are assigned to (level of affinity).

Quick reference
Location From System i® Navigator, expand your system > Configuration and Service > System Values > Performance > Affinity.
Special authority All object (*ALLOBJ) and security administrator (*SECADM).
Default value Thread affinity: Secondary threads do not use same processors and memory as initial thread. Level of affinity: Threads use any resource.
Changes take effect Immediately, but not for jobs already started.
Lockable No.

What can I do with this system value?

You can specify whether secondary threads have affinity to the same group of processors and memory as the initial thread. You can also specify the degree to which the system tries to maintain the affinity between threads and the subset of system resources they are assigned to.

A change to this system value takes effect immediately for all jobs that become active after the change, but only if they retrieve their affinity values from the system value. Jobs and threads that are currently active will continue to run with the affinity values they were started with. New jobs and threads that get their affinity values from jobs that are currently active, (for example, batch immediate jobs or secondary threads that inherit attributes from the initial thread), will continue to use the values stored in the initiating job or thread, rather than the current system value.

In addition, use the Automatically adjust thread resources (QTHDRSCADJ) system value to distribute the use of system resources.

Thread affinity

This value specifies whether secondary threads are grouped with the initial thread. Select one of the following options:

Secondary threads use same processors and memory as initiating thread (*GROUP)
This option indicates that secondary threads have a preference for the same group of processors and memory as the initial thread. Multithreaded workloads that share data between the threads within a job might perform better when this option is used.
Secondary threads do not use same processors and memory as initiating thread (*NOGROUP)
This option indicates that secondary threads do not have a preference for the same group of processors and memory as the initial thread. Workloads that use the full processing power of a system might perform better when this option is used.

Level of affinity

This value specifies the degree to which the threads try to use the subset of system resources for which they have a preference. Select one of the following options:

Threads only use resources they have affinity to (*HIGH)
Threads will only use the subset of system resources they have affinity to, and will wait until they become available.
Threads use any resource (*NORMAL)
Threads will use any processor or memory in the system if the resources they have affinity to are not readily available.