본문 바로가기
카테고리 없음

리눅스 서버 최적화를 위한 필수 설정: tuned 주요 기능, 서버 성능튜닝, 오라클 성능튜닝

by 기본기를 다지는 블로그 2025. 2. 25.

 

 

tuned란 리눅스OS에서 제공하는 동적 시스템 튜닝 데몬으로, 시스템 성능을 최적화하기 위해 다양한 프로파일(Profile) 을 제공하는 도구입니다. CPU, 메모리, 디스크 I/O, 네트워크 관련 커널 파라미터 설정 등을 자동으로 조정하여 서버 또는 데스크톱 환경에서 최적의 성능을 발휘할 수 있도록 지원합니다.

 

tuned의 주요 기능

사전 정의된 성능 프로파일 예시 (더욱 많은 정보는 # tuned-adm list 에서 확인)
throughput-performance : 내 서버가 높은 처리량을 위한 최적화하고자 할 때
latency-performance : 내 서버가 낮은 지연 시간을 위한 최적화하고자 할 때 
powersave : 내 서버(데스크톱) 전력 절감을 위한 설정( 데스크톱등 개인환경등에서 사용 권장)
network-latency : 내 서버가 네트워크 지연 시간을 최소화하고자 할 때 

virtual-guest: 내 서버가 가상머신이고 해당 환경의 최적화가 필요할 때

 

oracle tuned 추가 패키지 설치시

oracle : 오라클 DB 사이드에 최적화된 성능튜닝이 필요할 때
 

실시간 튜닝
시스템 상태를 모니터링하고 동적으로 설정 조정 가능
 

사용자 정의 프로파일
필요에 따라 커스텀 프로파일을 생성하여 특정 워크로드에 맞게 조정 가능
 

자동 감지 및 적용
하드웨어 및 사용 환경을 감지하여 적절한 프로파일 자동 추천

 

설치 및 기본 사용법
1. Tuned 설치

# dnf install tuned tuned-profiles-oracle  # RHEL, CentOS, Fedora
# apt install tuned tuned-profiles-oracle # Ubuntu, Debian
# 오라클의 기본적인 성능튜닝을 하기 위해 tuned-profiles-oracle 패키지 설치 필요

 

2. Tuned 활성화 및 시작

# systemctl enable --now tuned

 

3. 사용 가능한 프로파일 확인

# tuned-adm list
Available profiles:
- accelerator-performance     - Throughput performance based tuning with disabled higher latency STOP states
- aws                         - Optimize for aws ec2 instances
- balanced                    - General non-specialized tuned profile
- balanced-battery            - Balanced profile biased towards power savings changes for battery
- desktop                     - Optimize for the desktop use-case
- hpc-compute                 - Optimize for HPC compute workloads
- intel-sst                   - Configure for Intel Speed Select Base Frequency
- 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, foc
used on low latency network performance
- network-throughput          - Optimize for streaming network throughput, generally only necessary on older CPUs or 4
0G+ networks
- optimize-serial-console     - Optimize for serial console use.
- oracle                      - Optimize for Oracle RDBMS
- powersave                   - Optimize for low power consumption
- throughput-performance      - Broadly applicable tuning that provides excellent performance across a variety of comm
on server workloads
- virtual-guest               - Optimize for running inside a virtual guest
- virtual-host                - Optimize for running KVM guests
Current active profile: virtual-guest

 

4. 시스템에 추천되는 프로파일 확인 - 저의 환경은 가상환경이고 해당 환경에서 아래 명령을 수행했을 때 추천 프로필로 virtual-guest 프로필이 나왔습니다.

# tuned-adm recommend
virtual-guest

 

5. 추천된 프로파일 적용

# tuned-adm profile $(tuned-adm recommend)
virtual-guest

 

6. 현재 적용된 프로파일 확인

# tuned-adm active
Current active profile: virtual-guest

 

7. tuned에서 설정한 profile의 설정 파일은 아래 경로에 모여 있습니다.

# cd /usr/lib/tuned/
# ls
accelerator-performance  desktop      latency-performance      oracle                  virtual-guest
aws                      functions    network-latency          powersave               virtual-host
balanced                 hpc-compute  network-throughput       recommend.d
balanced-battery         intel-sst    optimize-serial-console  throughput-performance

 

그중에서 oracle DB환경에서 적용할 성능튜닝에 대한 정보를 아래와 같이 확인해보겠습니다.

oracle profile의 기본 베이스도 throughput-performance 프로필을 참조하는군요, 

오라클은 hugepage를 사용하므로 맨 아래에  THP( Transparent Huge Pages) 또한  권장대로 never(비활성)으로 설정해주네요.

[root@navix95 /usr/lib/tuned/oracle]# cat tuned.conf 
# tuned configuration

[main]
summary=Optimize for Oracle RDBMS
include=throughput-performance

[sysctl]
vm.swappiness = 10
vm.dirty_background_ratio = 3
vm.dirty_ratio = 40
vm.dirty_expire_centisecs = 500
vm.dirty_writeback_centisecs = 100
kernel.shmmax = 4398046511104
kernel.shmall = 1073741824
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 6815744
fs.aio-max-nr = 1048576
net.ipv4.ip_local_port_range = 9000 65499
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
kernel.panic_on_oops = 1
kernel.numa_balancing = 0

[vm]
transparent_hugepages=never

 

oracle profile을 선택한 경우, 위의 oracle tune.conf에 명시된 파라미터로 sysctl 설정을 활성화합니다.

 

이와 같이 Tuned는 시스템 성능을 최적화하는 강력한 도구로, 다양한 환경에서 손쉽게 사용할 수 있습니다. 특히 서버 환경이나 고성능 컴퓨팅(High-Performance Computing, HPC) , 네트워크 지연을 최소화해야하는 금융권 등 현업에서 필수적으로 활용되며, 적절한 프로파일을 선택하면 성능 개선 또는 전력 절감 효과를 극대화할 수 있습니다.

 

 

리눅스 OS를 환경에 맞게 튜닝하고자 할 때 어디서부터 설정을 해야할지 고민되신다면 tuned 툴을 적극 추천드립니다 ^^

 

참고사이트

https://docs.redhat.com/ko/documentation/red_hat_enterprise_linux/8/html/monitoring_and_managing_system_status_and_performance/static-and-dynamic-tuning-in-tuned_getting-started-with-tuned

 

2.11. TuneD의 정적 및 동적 튜닝 | Red Hat Product Documentation

예 2.2. 워크스테이션에서 정적 및 동적 튜닝 일반적인 사무실 워크스테이션에서 이더넷 네트워크 인터페이스는 대부분의 시간이 비활성 상태입니다. 몇 개의 이메일만 들어오거나 일부 웹 페이

docs.redhat.com