공유할 서비스 선택

TECH


TECH

OS [Linux] 커널 파라미터 설정

페이지 정보

작성자 LeeHyongDong 아이디로 검색 전체게시물 댓글 0건 조회 8,132회 좋아요 0회 작성일 19-10-11 17:10

본문

커널 파라미터 설정 

 

     • 커널 파라미터는 sysctl명령어로 설정 가능하며 rhel 6.2버전부터 포함된 명령어입니다. 

 

     • 커널 파라미터는 부팅시 RHEL의 동작을 사용자 정의 할수 있습니다

     • 즉 사용자가 원하는대로 잘 안쓰는곳엔 제한을 낮추고 자주 쓰는 곳에 집중시켜줌으로 성능 향상을 시킬수 있습니다.

 

     • 오라클 권장 파라미터를 기준으로 설명드리겠습니다.

 

     • 오라클을 설치할때 권장 파라미터로 변경하는 인수들을 설명드리겠습니다.

 

     shm 세그먼트를 정의두는것

     sem 세마포어 관련 파라미터

     fs.file-max 사용가능한 파일 핸들 최대개수

     net.ipv4.ip_local_port_range 접속 포트 범위 설정 오라클 권장범위는 1024~65000까지 입니다.

     net.core.rmem_default , net.core.rmem_max 대용량 서빙을 위한 설정 

     net.core.wmem_default , net.core.wmem_max 소켓 출력 큐의 기본값 입니다.

 

     설정하는 명령어를 설명드리겠습니다. 


# sysctl -a | grep shm
kernel.shm_next_id = -1
kernel.shm_rmid_forced = 0
kernel.shmall = 18446744073692774399
kernel.shmmax = 18446744073692774399
kernel.shmmni = 4096
sysctl: reading key "net.ipv6.conf.all.stable_secret"
sysctl: reading key "net.ipv6.conf.bond0.stable_secret"
sysctl: reading key "net.ipv6.conf.default.stable_secret"
sysctl: reading key "net.ipv6.conf.ens256.stable_secret"
sysctl: reading key "net.ipv6.conf.eth0.stable_secret"
sysctl: reading key "net.ipv6.conf.eth1.stable_secret"
sysctl: reading key "net.ipv6.conf.lo.stable_secret"
sysctl: reading key "net.ipv6.conf.virbr0.stable_secret"
sysctl: reading key "net.ipv6.conf.virbr0-nic.stable_secret"
vm.hugetlb_shm_group = 0


       sysctl -a 모든 파라미터값을 불러오는 명령어입니다. grep과 같이 사용해 원하는 값만 가져올수 있습니다.

 

#  sysctl -w kernel.sem="250 32000 100 128"
kernel.sem = 250 32000 100 128
# sysctl -a | grep sem
kernel.sem = 250        32000   100     128
kernel.sem_next_id = -1

      sysctl -w 는 커널 파라미터 값을 일시적으로 변경하는 명령어입니다    

      일시적인 변경이기때문에 변경후 리붓을 하게될경우 변경값이 다시 돌아가게됩니다.

 

# vim /etc/sysctl.conf
# sysctl settings are defined through files in
# /usr/lib/sysctl.d/, /run/sysctl.d/, and /etc/sysctl.d/.
#
# Vendors settings live in /usr/lib/sysctl.d/.
# To override a whole file, create a new file with the same in
# /etc/sysctl.d/ and put new settings there. To override
# only specific settings, add a file with a lexically later
# name in /etc/sysctl.d/ and put new settings there.
#
# For more information, see sysctl.conf(5) and sysctl.d(5).
 
fs.file-max = 6815744
kernel.shmall = 2897152
kernel.shmmax = 4294967295
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576

      영구적용 방법입니다. 

      /etc/sysctl.conf 밑에 설정을 넣게 되면 시스템이 시작될 때 이 파일의 내용을 참조하여 시작 됩니다. 

      내용을 즉시 적용 시키고 싶으면 sysctl -p 를 입력하면

      내용이 즉시 참조 됩니다.

 

1
2
3
4
5
6
7
8
9
10
11
# sysctl -p
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 4294967295
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
cs

     • /etc/sysctl.conf 파일의 내용이 적용된걸 확인하실수 있습니다.

 

● 관련 링크 


ulimit

http://www.chlux.co.kr/bbs/board.php?bo_table=board02&wr_id=58&page=2

댓글목록

등록된 댓글이 없습니다.

TECH - 좋아요글 총 건전체보기 >

  • 게시물이 없습니다.
TECH - 좋아요글 더보기
TECH 목록
번호 제목 작성자 작성일 조회수
10 OS LeeHyongDong 아이디로 검색 전체게시물 02-24 4762
[Linux] 한글설정 및 배너설정

카테고리 : OS

4,762 0
작성자 : LeeHyongDong 20/02/24
9 OS LeeHyongDong 아이디로 검색 전체게시물 01-31 8269
[Linux] Kernel Patch

카테고리 : OS

8,269 0
작성자 : LeeHyongDong 20/01/31
8 OS LeeHyongDong 아이디로 검색 전체게시물 01-22 9433
[Linux] Network 설정 및 인터페이스명 변경

카테고리 : OS

9,433 0
작성자 : LeeHyongDong 20/01/22
7 OS LeeHyongDong 아이디로 검색 전체게시물 01-06 6407
[Linux] Sosreport & Syslog

카테고리 : OS

6,407 0
작성자 : LeeHyongDong 20/01/06
6 OS LeeHyongDong 아이디로 검색 전체게시물 12-26 9222
[Linux] raw device 소개 및 설정

카테고리 : OS

9,222 0
작성자 : LeeHyongDong 19/12/26
5 OS LeeHyongDong 아이디로 검색 전체게시물 12-06 11259
[Linux] Chronyd ...

카테고리 : OS

11,259 0
작성자 : LeeHyongDong 19/12/06
4 OS LeeHyongDong 아이디로 검색 전체게시물 11-22 4365
[Linux] NTP ...

카테고리 : OS

4,365 0
작성자 : LeeHyongDong 19/11/22
3 OS LeeHyongDong 아이디로 검색 전체게시물 11-01 4341
[Linux] ulimit ...

카테고리 : OS

4,341 0
작성자 : LeeHyongDong 19/11/01
열람중 OS LeeHyongDong 아이디로 검색 전체게시물 10-11 8133
열람중
[Linux] 커널 파라미터 설정

카테고리 : OS

8,133 0
작성자 : LeeHyongDong 19/10/11
1 OS LeeHyongDong 아이디로 검색 전체게시물 09-30 7538
[Linux] LVM 소개 및 설정

카테고리 : OS

7,538 0
작성자 : LeeHyongDong 19/09/30
Total 30건
게시물 검색

주식회사 클럭스| 대표 : 이찬호| 사업자등록번호 : 107-87-27655
주소 : 서울특별시 영등포구 국회대로 800, 여의도파라곤
E-mail : sales@chlux.co.kr
Copyright © 클럭스 www.chlux.co.kr All rights reserved.
상단으로Top