Go to main content

Oracle® X5 Series Servers Administration Guide

Exit Print View

Updated: September 2017
 
 

Configure Elastic Computing (Oracle Linux Operating System)

Use this procedure to activate or deactivate cores using the Oracle Linux operating system. You can do this as often as you need, while the application is running.


Note -  If a core is deactivated in BIOS, it cannot be activated in the OS.

Before You Begin

This task is supported on Oracle Linux Unbreakable Enterprise Kernel.

This task requires root privileges.

Elastic computing requires Intel Speed Step, which can be enabled or disabled in the Advanced - CPU Power Management Configuration screen in the BIOS Setup Utility. This setting is enabled by default.


Note -  For Linux operating systems virtual processors are called logical processors.

In the Linux command line, logical processors are referred to as cpuNN, where NN is the logical processor number. For example, logical processor 18 appears as cpu18.

  1. To find out how many logical processors your server has, use the command:

    ls /sys/devices/system/cpu/cpu*/online | wc -l

    • If hyperthreading is enabled, this returns the number of sockets x 36.

    • If hyperthreading is disabled, this returns the number of sockets x 18.

  2. To find the logical processor mapping, use the command:

    grep . /sys/devices/system/node*/cpulist


    Note -  You can also find the logical processor and core numbers using the instructions in Calculate Socket and Core Numbers.

    This returns a list of sockets and logical processors.

    • If hyperthreading is enabled, this returns two ranges of 18 logical processors per socket.

    • If hyperthreading is disabled, this returns one range of 18 logical processors per socket.

    The following example shows a four-socket server with hyperthreading enabled:

    # grep . /sys/devices/system/node*/cpulist
    socket 0:    0-17, 72-89
    socket 1:   18-35, 90-107
    socket 2:   36-53, 108-125
    socket 3:   54-71, 126-143
  3. Use the echo 0 command to deactivate logical processors.

    For example, to deactivate the last core on the first socket on a four-socket server:

    • echo 0 > /sys/devices/system/cpu/cpu17/online deactivates logical processor 17.

    • echo 0 > /sys/devices/system/cpu/cpu89/online deactivates logical processor 89.

      Disabling logical processor 89 on a four-socket server is only necessary if hyperthreading is enabled.

  4. Use the echo 1 command to enable logical processors.

    For example, to activate the last core on the first socket on a four-socket server:

    • echo 1 > /sys/devices/system/cpu/cpu17/online to enable logical processor 17.

      Enabling either logical processor activates the core.

    • echo 1 > /sys/devices/system/cpu/cpu89/online to enable logical processor 89.

      Logical processor 89 only exists on a four-socket server if hyperthreading is enabled.

    The following sample shows the commands to deactivate the last core on every socket of a four-socket server with hyperthreading enabled:

    # echo 0 > /sys/devices/system/cpu/cpu17/online
    # echo 0 > /sys/devices/system/cpu/cpu89/online
    # echo 0 > /sys/devices/system/cpu/cpu35/online
    # echo 0 > /sys/devices/system/cpu/cpu107/online
    # echo 0 > /sys/devices/system/cpu/cpu53/online
    # echo 0 > /sys/devices/system/cpu/cpu125/online
    # echo 0 > /sys/devices/system/cpu/cpu71/online
    # echo 0 > /sys/devices/system/cpu/cpu143/online

    The following sample shows how to reverse this action and reactivate all the logical processors and cores that were deactivated in the previous example:

    # echo 1 > /sys/devices/system/cpu/cpu17/online
    # echo 1 > /sys/devices/system/cpu/cpu89/online
    # echo 1 > /sys/devices/system/cpu/cpu35/online
    # echo 1 > /sys/devices/system/cpu/cpu107/online
    # echo 1 > /sys/devices/system/cpu/cpu53/online
    # echo 1 > /sys/devices/system/cpu/cpu125/online
    # echo 1 > /sys/devices/system/cpu/cpu71/online
    # echo 1 > /sys/devices/system/cpu/cpu143/online

See Also

Understanding Elastic Computing