리눅스 환경에서 하드디스크에 저장한 가상 머신을 동시에 2개 이상 운용시 시스템 전체가 멈추는 현상이 있습니다.
검색 결과의 대부분이 가상 메모리 이슈 또는 커널 버그라고 하지만 watch -n 0.1 free
명령어로 확인 했을 때 메모리 부족 현상은 발생하지 않았고 롤링 릴리즈를 채택한 배포판이라 최신 커널을 사용하고 있어 이 문제 또한 아닌 것 같습니다.
일단 아래 과정으로 어느정도 해소할 수 있으나 완전히 해결하진 못했습니다.
가상 메모리 사용 최소화하기
vm.swappiness
키는 메모리가 많은 환경일 때만 낮게 설정해주세요.etc/sysctl.conf
또는 /etc/sysctl.d
디렉터리에 설정 파일 생성 후 넣어주시면 됩니다.
vm.swappiness=1
vm.vfs_cache_pressure=50
vm.dirty_background_ratio=1
vm.dirty_ratio=2
vm.dirty_writeback_centisecs=100
하드디스크 IO 스케줄러 BFQ 로 변경하기
Improving performance - ArchWiki
This article provides information on basic system diagnostics relating to performance as well as steps that may be taken to reduce resource consumption or to otherwise optimize the system with the end-goal being either perceived or documented improvements
wiki.archlinux.org
BFQ IO Scheduler
리눅스(안드로이드포함)의 디스크 IO는 스케쥴러라는 것을 통해 처리되며, 커널에서 옵션을 수정하여 변경이 가능합니다. 이카루스 SpeedMod Kernel에 사용한 IO Scheduler 는 BFQ, CFQ, Deadline 입니다. 삼성에..
icarus21.tistory.com
$ cat /sys/block/sda/queue/scheduler
[mq-deadline] kyber bfq none
대괄호로 감싸진 스케줄러가 현재 사용 중인 스케줄러입니다.
위 스케줄러를 bfq
로 변경해주시면 됩니다.
# echo bfq > /sys/block/sda/queue/scheduler
읽어보면 좋은 글들
Linux large transfers freeze system high I/O
Hello, so has anyone ever been able to fix system freezes with big file transfers on Hard Disk? I've found a solution, so let me...
www.reddit.com
'Fine : 컴퓨터와 네트워크 > 리눅스' 카테고리의 다른 글
Grub 메뉴 숨기기 (0) | 2019.10.02 |
---|