공유할 서비스 선택

TECH


TECH

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

페이지 정보

작성자 LeeHyongDong 아이디로 검색 전체게시물 댓글 0건 조회 8,133회 좋아요 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 목록
번호 제목 작성자 작성일 조회수
44 OS LeeHyongDong 아이디로 검색 전체게시물 06-29 1733
[Linux] ansible 설명 및 설치 방법

카테고리 : OS

1,733 0
작성자 : LeeHyongDong 21/06/29
43 OS LeeHyongDong 아이디로 검색 전체게시물 04-08 5450
[Linux] 재부팅없이 multipath 제거

카테고리 : OS

5,450 0
작성자 : LeeHyongDong 21/04/08
42 OS LeeHyongDong 아이디로 검색 전체게시물 02-23 5513
[Linux] 8버전 HA-LVM 등록

카테고리 : OS

5,513 0
작성자 : LeeHyongDong 21/02/23
41 OS LeeHyongDong 아이디로 검색 전체게시물 01-21 4008
[Linux] #2. 클러스터 OCF 및 LSB 구성

카테고리 : OS

4,008 0
작성자 : LeeHyongDong 21/01/21
40 OS LeeHyongDong 아이디로 검색 전체게시물 01-13 3940
[Linux] #1. 클러스터 OCF 및 LSB 구성

카테고리 : OS

3,940 0
작성자 : LeeHyongDong 21/01/13
39 OS LeeHyongDong 아이디로 검색 전체게시물 09-15 3783
[Linux] RedHat Insights 설명 및 설정

카테고리 : OS

3,783 0
작성자 : LeeHyongDong 20/09/15
38 OS LeeHyongDong 아이디로 검색 전체게시물 08-17 3249
[Linux] CentOS 및 Oracle linux에서 RHEL로 전환방법

카테고리 : OS

3,249 0
작성자 : LeeHyongDong 20/08/17
37 OS LeeHyongDong 아이디로 검색 전체게시물 07-28 4373
[Linux] fence loop 설명 및 방지

카테고리 : OS

4,373 0
작성자 : LeeHyongDong 20/07/28
36 OS Leesangwoo 아이디로 검색 전체게시물 07-13 7545
[Cluster] RHEL(Centos) 7 Pacemaker Network monitoring

카테고리 : OS

7,545 0
작성자 : Leesangwoo 20/07/13
35 OS Leesangwoo 아이디로 검색 전체게시물 07-02 7670
[Cluster] RHEL(Centos) 7 Pacemaker GFS2

카테고리 : OS

7,670 0
작성자 : Leesangwoo 20/07/02
Total 84건
게시물 검색

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