Contents

Introduction

Background Information

Prerequisites

Requirements

Components Used

Problem

Solution

Verification

Related Information

Introduction

This document describes how to configure CPU governors for SAP HANA database for maximum performance and verify that correct CPU governor is in use.

Background Information

CPU governor set to performance mode will make CPU to run at the maximum frequency even when system is idle. This document is applicable to SAP HANA database running on SuSE Linux or Red Hat Enterprise Linux (RHEL).

Prerequisites

Requirements

Cisco recommends that you have knowlege of these topics:

- General Linux Administration

Components Used

This document is not restricted to specific software and hardware versions.

The information in this document was created from the devices in a specific lab environment. All of the devices used in this document started with a cleared (default) configuration. If your network is live, make sure that you understand the potential impact of any command.

Problem

In order to check current CPU governor, run cpupower frequency-info command

server01a:~ # cpupower frequency-info

analyzing CPU 0:

driver: acpi-cpufreq

CPUs which run at the same hardware frequency: 0 1 2 3 4 5 6 7 8 9 40 41 42 43 44 45 46 47 48 49

CPUs which need to have their frequency coordinated by software: 0

maximum transition latency: 10.0 us.

hardware limits: 1.06 GHz - 2.40 GHz

available frequency steps: 2.40 GHz, 2.39 GHz, 2.26 GHz, 2.13 GHz, 2.00 GHz, 1.86 GHz, 1.73 GHz, 1.60 GHz, 1.46 GHz, 1.33 GHz, 1.20 GHz, 1.06 GHz

available cpufreq governors: conservative, userspace, powersave, ondemand, performance

current policy: frequency should be within 1.06 GHz and 2.40 GHz.

The governor "ondemand" may decide which speed to use

within this range.

current CPU frequency is 1.06 GHz (asserted by call to hardware).

boost state support:

Supported: yes

Active: yes

25500 MHz max turbo 4 active cores

25500 MHz max turbo 3 active cores

25500 MHz max turbo 2 active cores

25500 MHz max turbo 1 active cores

If governor is set to anything other than performance, follow this guide further.

Solution

In order to make CPU to run at the maximum frequency, it is required to set CPU governor to performance mode. To do it, run cpupower frequency-set -g performance command.

server01a:~ # /usr/bin/cpupower frequency-set -g performance

Setting cpu: 0

Setting cpu: 1

Setting cpu: 2

<output ommited for brevity>

To ensure that configuration persists after the host reboot, add this command to startup script.

Type this command if you use SuSE Linux.

server01a:~ # echo '/usr/bin/cpupower frequency-set -g performance' >> /etc/init.d/after.local

Type this command if you use Red Hat Enterprise Linux.

server01a:~ # echo '/usr/bin/cpupower frequency-set -g performance' >> /etc/rc.d/rc.local

Verification

Run cpufreq-info frequency-info command to ensure that performance governor is in use.

server01a:~ # cpupower frequency-info

analyzing CPU 0:

driver: acpi-cpufreq

CPUs which run at the same hardware frequency: 0 1 2 3 4 5 6 7 8 9 40 41 42 43 44 45 46 47 48 49

CPUs which need to have their frequency coordinated by software: 0

maximum transition latency: 10.0 us.

hardware limits: 1.06 GHz - 2.40 GHz

available frequency steps: 2.40 GHz, 2.39 GHz, 2.26 GHz, 2.13 GHz, 2.00 GHz, 1.86 GHz, 1.73 GHz, 1.60 GHz, 1.46 GHz, 1.33 GHz, 1.20 GHz, 1.06 GHz

available cpufreq governors: conservative, userspace, powersave, ondemand, performance

current policy: frequency should be within 1.06 GHz and 2.40 GHz.

The governor "performance" may decide which speed to use

within this range.

current CPU frequency is 2.39 GHz (asserted by call to hardware).

boost state support:

Supported: yes

Active: yes

25500 MHz max turbo 4 active cores

25500 MHz max turbo 3 active cores

25500 MHz max turbo 2 active cores

25500 MHz max turbo 1 active cores

Related Information

- Chapter 3.2 Using CPUfreq Governors in Red Hat Documentation