smtctl Command

Purpose

The smtctl command controls the enabling and disabling of processor simultaneous multithreading mode.

Syntax

smtctl [ -m off | on [ -w boot | now ]]

smtctl [-t #SMT [-w boot | now ]]

smtctl [-m suspend [-w boot ]]

smtctl [ -m limit [-t #SMT ][-w boot ]]

smtctl [ -m recommended [ -w boot | now ]]

Description

This command is provided for privileged users and applications to control utilization of processors with simultaneous multithreading support. The simultaneous multithreading mode allows processors to have thread level parallelism at the instruction level. This mode can be enabled or disabled for all processors either immediately or on subsequent boots of the system. This command controls the simultaneous multithreading options.

Each individual Simultaneous Multi-threading (SMT) thread of a physical processor core is treated as an independent logical processor by AIX®. The AIX operating system limits the combination of physical processor cores assigned and SMT modes in order to maintain symmetry across all of the physical processor cores assigned to AIX. Due to this limitation, the number of logical processor is less than or equal to 1024 for AIX 7.1 and 256 for AIX 6.1.

The POWER8® processors are capable of SMT-8 which means up to 128 cores can be used in SMT-8 mode which yields 1024 logical processors. A lower SMT mode must be used for AIX users to be able to use more than 128 POWER8 cores.
Number of thread
When booting a P8 Logical Partition (LPAR), the default number of SMT thread is 4. To increase the default number of SMT threads dynamically, enter:
smtctl -m on
smtctl -t 8
The change to SMT-8 is effective immediately and reboot is not required. If you want the setting to persist after rebooting, then you must rebuild the boot image with the bosboot command. The default SMT-4 is intended for better performance for an existing applications that are not designed or compiled for more than 4 threads.
Number of cores
If you have allocated more than 128 cores to an LPAR, by default it uses 128 cores. This is to ensure that AIX limit of maximum 1024 logical processors is not exceeded if SMT-8 is enabled (128 cores * SMT8 = 1024 total). If you want LPAR to use more than 128 cores, then you need to run a sequence of following AIX commands to establish a limit to the number of SMT threads that are available per core.
smtctl -m limit -t 4
bosboot -a
shutdown -Fr
Upon rebooting, AIX negotiates with the firmware to allow up to 256 cores because the operating system's limit of 1024 processors will not be exceeded with the specified limit of 4 SMT threads. You can exceed 256 cores if you run the smtctl command as stated above, but with a limit of 2 instead of 4. The following command suspends SMT capability allowing more cores.
smtctl -m suspend
bosboot -a
shutdown -Fr

Flags

Item Description
-m off Set the simultaneous multithreading mode to disabled. This option cannot be used with the -t flag.
-m on Set the simultaneous multithreading mode to enabled. By using the -m flag, the maximum number of threads supported per processor is enabled. This option cannot be used with the -t flag.
-t #SMT Set the number of the simultaneous threads per processor. The value may be set to one to disable simultaneous multi-threading. The value may be set to two for systems that support 2-way simultaneous multi-threading and the value may be set to four, for the systems that support 4-way simultaneous multi-threading.
-w boot Makes the simultaneous multithreading mode change effective on next and subsequent reboots if you run the bosboot command before the next system reboot.
-w now Makes the simultaneous multithreading mode change immediately but will not persist across reboot.

If the -w boot or the -w now option is specified, the mode change is made immediately and will persist subsequent reboots if you run the bosboot command before the next system reboot.

-m limit Limits the number of simultaneous multithreading threads to two, or the specified value if the -t flag is used and enables more processor nodes, if available, effective at the next reboot (running bosboot is required to rebuild the boot image). This limit cannot be dynamically changed during run time, and you must reboot to change the operating state.
-m suspend Suspends the simultaneous multithreading capability, and enables more processor nodes, if available, effective at the next reboot (running bosboot is required to rebuild the boot image). This limit cannot be dynamically changed during run time, and you must reboot to change the operating state.
start of change-m recommendedend of change Sets the number of threads to a value that provides the best performance for the most common types of workloads that are based on the underlying physical processor type. This setting takes place immediately. You can also specify next boot to start using the new value.
If no options are specified then the following simultaneous multithreading settings will be reported:
Item Description
SMT Capability Indicator that the physical or virtual processors are capable of simultaneous multithreading.
SMT Mode Current runtime simultaneous multithreading mode of disabled or enabled.
SMT Boot Mode Current boot time simultaneous multithreading mode of disabled or enabled.
SMT Threads Number of simultaneous multithreading threads per physical or virtual processor.
SMT Bound Indicator that the simultaneous multithreading threads are bound on the same physical or virtual processor.
SMT Thread Capability Maximum number of simultaneous multi-threading threads per physical or virtual processor supported by the system.

Exit Status

Item Description
0 Successfully completed the requested operation.
>0 An error occurred.

Security

Attention RBAC users and Trusted AIX users: This command can perform privileged operations. Only privileged users can run privileged operations. For more information about authorizations and privileges, see Privileged Command Database in Security. For a list of privileges and the authorizations associated with this command, see the lssecattr command or the getcmdattr subcommand.

Examples

  1. To enable simultaneous multithreading for the current boot cycle, enter:
    smtctl -m on -w now
    The system displays a message similar to the following:
    smtctl: SMT is now enabled.
  2. To enable a 2-way simultaneous multithreading on a system that supports up to 4 way, enter:
    smtctl -t 2 -w now
    The system displays a message similar to the following:
    smtctl: SMT is now enabled.
  3. To view the current simultaneous multithreading mode settings and processor information, enter:
    smtctl
    The system displays a message similar to the following:
    This system is SMT capable.
    
    This system supports up to 4 SMT threads per processor
    SMT is currently enabled.
    
    SMT boot mode is set to disabled.
    
    
    proc0 has 2 SMT threads
    Bind processor 0 is bound with proc0
    Bind processor 1 is bound with proc0
    
    
    proc2 has 2 SMT threads
    Bind processor 2 is bound with proc2
    Bind processor 3 is bound with proc2
  4. To disable simultaneous multithreading for the current boot cycle and for all subsequent boots, enter:
    smtctl -m off
    The system displays a message similar to the following:
    smtctl: SMT is now disabled. It will persist across reboots if
            you run the bosboot command before the next reboot.
    Another method to disable simultaneous multi-threading for the current boot cycle and for subsequent boots, enter:
    smtctl -t 1
    Note: The boot image must be remade with the bosboot command before the next reboot.

Location

/usr/sbin/smtctl

Files

Item Description
/usr/sbin/smtctl Contains the smtctl command.