OS Kernel parameter 가 총 몇개 인가요? 왜 매번 다르죠? #RHEL9.7 #kernel #boot
페이지 정보
작성자 OSworker 아이디로 검색 전체게시물 댓글 0건 조회 90회 좋아요 1회 작성일 25-11-29 23:58본문
안녕하세요 이제 겨울이네요.
오늘은 고객으로 부터 온 질문을 정리해드리려고합니다.
질문) 왜 서버마다 커널파라미터값이 조금씩 다릅니다. 왜 그런가요?
그리고 추가된 최신 커널 파라미터값을 알려주세요~
- 리눅스 커널 파라미터는 크게 적용 시점과 관리 방식에 따라 2가지 계열로 나눕니다.
1. Boot-time Kernel Parameters
✔ 커널 부팅 시(boot loader 단계) 적용
✔ OS가 올라오기 전에 커널 행동을 변경
✔ 수정 방법: /etc/default/grub → GRUB_CMDLINE_LINUX에 추가 → grub2-mkconfig
| 카테고리 | 설명 | 예시 |
|---|---|---|
| 하드웨어/드라이버 제어 | 특정 장치 활성화/비활성화, 드라이버 옵션 | nouveau.modeset=0, intel_iommu=on/off |
| 메모리/NUMA 제어 | 메모리 사이즈 제한, hugepage, numa 정책 | mem=32G, hugepages=128, numa=off |
| 콘솔/로그 설정 | 커널 메시지 출력, serial, quiet 등 | console=ttyS0,115200n8, quiet, loglevel=7 |
| 파일시스템 제어 | 부팅 FS 마운트 옵션, debug, integrity | rootflags=, fsck.mode=force |
| 보안/커널 보호 | 커널 보안 기능 제어 | selinux=1/0, apparmor=1/0, efi=disable_early_pci_dma |
| 커널 기능 스위치 | 부팅 단계에서 서브시스템 활성화 | cgroup_enable=memory, systemd.unified_cgroup_hierarchy=1 |
| Crash/Debug 설정 | kdump/crashkernel/디버깅 | crashkernel=1G-4G:192M,4G-64G:256M |
| 네트워크 초기화 | early TCP, ip 설정 등 | ip=dhcp, ipv6.disable=1 |
| 카테고리 | 설명 | 경로 Prefix | 예시 |
|---|---|---|---|
| 네트워크 스택(TCP/IP) | 연결/버퍼/타임아웃/보호 | net.ipv4, net.ipv6, net.core | net.ipv4.tcp_max_syn_backlog, net.core.rmem_max |
| 커널 일반 동작 | panic, pid, hostname, core dump 등 | kernel. | kernel.panic=10, kernel.core_pattern |
| 가상메모리/Swap 제어 | 메모리 reclaim, dirty cache, swappiness | vm. | vm.swappiness=10, vm.dirty_ratio |
| 파일시스템 | inode/dentry/cache, nfs, xfs, ext4 옵션 | fs. | fs.file-max, fs.inotify.max_user_watches |
| 사용자 리소스 제한 | 최대 프로세스/FD/메모리 핸들 | kernel., fs. | kernel.threads-max, fs.nr_open |
| cgroup/컨테이너 | cgroup 기능 동작 tuning | user. net. 등 | user.max_user_namespaces |
| 보안/Hardening | ASLR, ptrace, unprivileged namespace 등 | kernel. user. | kernel.kptr_restrict, kernel.yama.ptrace_scope |
| 디스크/IO 세팅 | I/O 스케줄러 parameter | block. kernel. | kernel.sched_latency_ns |
| 스케줄러/프로세스 관리 | CFS, RT, task scheduling | kernel.sched_* |
kernel.sched_min_granularity_ns |
요약
-
Boot 파라미터: GRUB에서 수정, 초기 동작/하드웨어 제어
-
Sysctl: /proc 기반 runtime tuning, 네트워크/메모리/limits
firewalld에 관련된 커널파라미터가 있었다가, disable 한후 없어진 상황입니다.
결론, sysctl -a 로 보는 파라미터는 설치된 패키지 그리고 활성화된 서비스등에 따라 파라미터가 생기고 없어집니다.
그래서 정확하게 OS별 비교를 하려면 패키지 및 서비스가 모두 동일한 상태에서 확인을 해야합니다.
> 두번째로 Boot 파라미터에 대해 알아보겠습니다.
버전에 따라 Boot 파라미터가 변경되는 경우들이 있습니다. 이것은 문서로 정리되어있어서 찾아보기가 매우 쉽습니다.
- 아래 경로에 따라 보시면 Boot 파라미터를 확인할수있습니다.
# cat /usr/share/doc/kernel-doc-5.14.0-611.9.1/Documentation/admin-guide/kernel-parameters.txt
accept_memory= [MM]
Format: { eager | lazy }
default: lazy
By default, unaccepted memory is accepted lazily to
avoid prolonged boot times. The lazy option will add
some runtime overhead until all memory is eventually
accepted. In most cases the overhead is negligible.
For some workloads or for debugging purposes
accept_memory=eager can be used to accept all memory
at once during boot.
acpi= [HW,ACPI,X86,ARM64]
Advanced Configuration and Power Interface
Format: { force | on | off | strict | noirq | rsdt |
copy_dsdt }
force -- enable ACPI if default was off
on -- enable ACPI but allow fallback to DT [arm64]
off -- disable ACPI if default was on
noirq -- do not use ACPI for IRQ routing
strict -- Be less tolerant of platforms that are not
strictly ACPI specification compliant.
rsdt -- prefer RSDT over (default) XSDT
copy_dsdt -- copy DSDT to memory
For ARM64, ONLY "acpi=off", "acpi=on" or "acpi=force"
are available
See also Documentation/power/runtime_pm.rst, pci=noacpi
...................
.............
이렇게 볼수있으니 마이너 버전이 바뀌고, 메이저 버전이 바뀌면 이 문서를 비교하여 Boot 파라미터가 어떻게 바뀌었는지 확인할수가 있습니다.
혹, 더 궁금한 사항 있으시면 언제든 글 남겨주세요~
감사합니다.
댓글목록
등록된 댓글이 없습니다.


Top