달력

22025  이전 다음

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28

1. 설정 확인 - 현재 CPU 설정
# cpupower frequency-info
analyzing CPU 0:
  driver: intel_pstate
  CPUs which run at the same hardware frequency: 0
  CPUs which need to have their frequency coordinated by software: 0
  maximum transition latency:  Cannot determine or is not supported.
  hardware limits: 1.20 GHz - 3.20 GHz
  available cpufreq governors: performance powersave
  current policy: frequency should be within 1.20 GHz and 3.20 GHz.
                  The governor "powersave" may decide which speed to use
                  within this range.
  current CPU frequency: 2.66 GHz (asserted by call to hardware)
  boost state support:
    Supported: yes
    Active: yes
-> 설정 가능한 옵션은 performance, powersave
-> 현재 설정된 옵션은 powersave

2. 현재 CPU 상태 확인
# grep -E '^model name|^cpu MHz' /proc/cpuinfo
model name      : Intel(R) Xeon(R) CPU E5-2630 v3 @ 2.40GHz
cpu MHz                     : 1711.148
model name      : Intel(R) Xeon(R) CPU E5-2630 v3 @ 2.40GHz
cpu MHz                     : 16126.503
model name      : Intel(R) Xeon(R) CPU E5-2630 v3 @ 2.40GHz
cpu MHz                     : 1561.171
model name      : Intel(R) Xeon(R) CPU E5-2630 v3 @ 2.40GHz
cpu MHz                     : 2020.708
 
# watch -n1 lscpu
-> 각 Core당 현재 CPU Speed 확인하여 CPU 사양보다 낮은지 확인
-> watch -n1 lscpu로 1초마다 갱신되는 CPU MHz 값 확인

3. CPU Speed 및 tuned 설정 적용
# tuned-adm list
Available profiles:
- balanced                    - General non-specialized tuned profile
- desktop                     - Optimize for the desktop use-case
- latency-performance         - Optimize for deterministic performance at the cost of increased power consumption
- network-latency             - Optimize for deterministic performance at the cost of increased power consumption, focused on low latency network performance
- network-throughput          - Optimize for streaming network throughput, generally only necessary on older CPUs or 40G+ networks
- powersave                   - Optimize for low power consumption
- throughput-performance      - Broadly applicable tuning that provides excellent performance across a variety of common server workloads
- virtual-guest               - Optimize for running inside a virtual guest
- virtual-host                - Optimize for running KVM guests
Current active profile: balanced
-> throughput-performance 아닐 경우 tuned-adm profile throughput-performance 적용
-> 적용 이후 1,2번 항목 재차 확인하여 available cpufreq governors, CPU MHz 값 확인

3.1 tuned-adm 적용 후에도 변화 없을 시
# vi /usr/lib/tuned/throughput-performance/tuned.conf
[cpu]
governor=performance
energy_perf_bias=performance
min_perf_pct=100
-> governor 값 확인 시 performance로 변경 후 tuned-adm profile throughput-performance 재 적용

3.2 cpupower 설정으로 적용
# cpupower frequency-set --governor performance
Setting cpu: 0
Setting cpu: 1
Setting cpu: 2
Setting cpu: 3
-> 적용 이후 1,2번 항목 재 확인(CPU 설정)

<참고사이트>
https://www.certdepot.net/rhel7-get-started-cpu-governor/

 

 

 

 

Posted by 짜꾸미의골골몽
|