Go to main content

Oracle® X4 Series Servers Administration Guide

Exit Print View

Updated: April 2016
 
 

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 5.10 and 6.5 (x64-bit) or newer, based on UEK R3 (Unbreakable Enterprise Kernel Release 3).

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 15 appears as cpu15.

  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 30.

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

  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 15 logical processors per socket.

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

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

    # grep . /sys/devices/system/node*/cpulist
    
    socket 0:   0-14, 60-74
    socket 1:   15-29, 75-89
    socket 2:   30-44, 90-104
    socket 3:   45-59, 105-119
  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/cpu14/online deactivates logical processor 14.

    • echo 0 > /sys/devices/system/cpu/cpu74/online deactivates logical processor 74.

      Disabling logical processor 74 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/cpu14/online to enable logical processor 14.

      Enabling either logical processor activates the core.

    • echo 1 > /sys/devices/system/cpu/cpu74/online to enable logical processor 74.

      Logical processor 74 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/cpu14/online
    # echo 0 > /sys/devices/system/cpu/cpu74/online
    # echo 0 > /sys/devices/system/cpu/cpu29/online
    # echo 0 > /sys/devices/system/cpu/cpu89/online
    # echo 0 > /sys/devices/system/cpu/cpu44/online
    # echo 0 > /sys/devices/system/cpu/cpu104/online
    # echo 0 > /sys/devices/system/cpu/cpu59/online
    # echo 0 > /sys/devices/system/cpu/cpu119/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/cpu14/online
    # echo 1 > /sys/devices/system/cpu/cpu74/online
    # echo 1 > /sys/devices/system/cpu/cpu29/online
    # echo 1 > /sys/devices/system/cpu/cpu89/online
    # echo 1 > /sys/devices/system/cpu/cpu44/online
    # echo 1 > /sys/devices/system/cpu/cpu104/online
    # echo 1 > /sys/devices/system/cpu/cpu59/online
    # echo 1 > /sys/devices/system/cpu/cpu119/online

See Also

Understanding Elastic Computing