-
IBM AIX SMT(Threads) 설정 하는 방법System of Infra/Unix System 2021. 11. 4. 23:43728x90반응형
IBM AIX SMT(Threads) 설정하는 방법
[TEST_SVR01:root]/>prtconf | grep -i processors Number Of Processors: 1 [TEST_SVR01:root]/>lsdev -Cc processor proc0 Available 00-00 Processor
▶ SMT를 활용하기 전에 물리적인 cpu가 1개인 것을 확인합니다.
* SMT = Simultaneous Multithreading mode[TEST_SVR01:root]/>smtctl This system is SMT capable. This system supports up to 4 SMT threads per processor. SMT is currently disabled. SMT boot mode is set to disabled. SMT threads are bound to the same virtual processor. proc0 has 1 SMT threads. Bind processor 0 is bound with proc0
▶ smtctl을 통해서 SMT기능은 현재 disabled가 되어 있는 상태이며, 4 SMT threads를 지원한다는 메시지가 출력됩니다. 또한 Processor가 1 core로 사용되고 있는 것을 확인할 수 있습니다.
[TEST_SVR01:root]/>lparstat System configuration: type=Shared mode=Uncapped smt=Off lcpu=1 mem=8192MB psize=30 ent=0.20 %user %sys %wait %idle physc %entc lbusy vcsw phint %nsp %utcyc ----- ----- ------ ------ ----- ----- ------ ----- ----- ----- ------ 0.1 0.2 0.0 99.7 0.00 0.6 0.2 434692460 6055 101 0.72 [TEST_SVR01:root]/>lparstat | grep -i smt | awk '{print $5}' smt=Off
▶ lparstat의 명령어를 통해서 현재 시스템의 CPU 성능분석치를 자세하게 볼 수 있고 smt=Off라는 것을 확인할 수 있습니다. awk문 5번째 필드를 통해 간략하게 smt만 사용 여부를 확인할 수도 있습니다.
[TEST_SVR01:root]/>smtctl -m on smtctl: SMT is now enabled. It will persist across reboots if you run the bosboot command before the next reboot.
▶ SMT 기능을 사용하기 위해서 활성화를 시켜주도록 합니다.
[TEST_SVR01:root]/>smtctl This system is SMT capable. This system supports up to 4 SMT threads per processor. SMT is currently enabled. SMT boot mode is set to enabled. SMT threads are bound to the same virtual processor. proc0 has 4 SMT threads. Bind processor 0 is bound with proc0 Bind processor 1 is bound with proc0 Bind processor 2 is bound with proc0 Bind processor 3 is bound with proc0
▶ 처음과 다르게 SMT기능은 현재 enabled가 된 상태이며, threads가 default로 4로 지정이된것을 확인할 수 있습니다. 1 cpu에서 4개의 병렬로 처리를 하는 하이퍼스레딩을 생각하시면 될 꺼같습니다.
[TEST_SVR01:root]/>lparstat System configuration: type=Shared mode=Uncapped smt=4 lcpu=4 mem=8192MB psize=30 ent=0.20 %user %sys %wait %idle physc %entc lbusy vcsw phint %nsp %utcyc ----- ----- ------ ------ ----- ----- ------ ----- ----- ----- ------ 0.1 0.2 0.0 99.7 0.00 0.6 0.2 434527839 6054 101 0.72 [TEST_SVR01:root]/>lparstat | grep smt= | awk '{print $5}' smt=4
▶ lparstat의 명령어를 통해서 현재 시스템의 CPU 성능분석치를 자세하게 볼 수 있고 smt=ON으로 변경된 것을 확인할 수 있습니다. awk문 5번째 필드를 통해 간략하게 smt만 사용 여부를 확인할 수도 있습니다.
[TEST_SVR01:root]/>bindprocessor -q The available processors are: 0 1 2 3
▶ 현재 프로세스에서 4개의 threads로 설정이 되어 있습니다.
[TEST_SVR01:root]/>smtctl -t 8 -w now smtctl: The value given for the -t flag is invalid.
▶ threads를 조금더 늘려서 병렬 처리를 더 하기 위해 해당 명령어를 수행할 경우 불가능하다는 호출 메시지가 나오게 됩니다. 이 경우는 2가지로 해석이 됩니다.
1. SMT 8 모드는 IBM Power8 모델 이후부터 지원이 가능합니다.(Power6,7모델의 경우 지원 불가)
2. Power8 모델 기준으로 AIX 7.1 TL03 SP03이상 부터 지원이 가능합니다. Power8 버전이면서 OS 버전이 해당 버전보다 낮으면 안 됩니다.▶ 해당 명령어를 통해서 2로 변경이 되는지 확인할 합니다. 보통 SMT4 또는 SMT8을 사용하고 2 모드는 사용하지 않지만, 변경 값을 확인하기 위해 테스트한 결과를 보여줍니다.
* 옵션 -w는 즉시 적용을 하지만 리부팅 후에는 초기화가 됩니다.[TEST_SVR01:root]/>smtctl This system is SMT capable. This system supports up to 4 SMT threads per processor. SMT is currently enabled. SMT boot mode is set to enabled. SMT threads are bound to the same virtual processor. proc0 has 2 SMT threads. Bind processor 0 is bound with proc0 Bind processor 1 is bound with proc0
▶ 해당 CPU에서 threads가 2개로 변경된 것을 확인할 수 있습니다.
[TEST_SVR01:root]/>smtctl -t 4 -w now smtctl: SMT is now enabled.
▶ 해당 시스템의 threads를 4 모드로 원복 하고 -w 옵션의 경우 현재 적용이기 때문에 리부팅 후에도 영구적으로 적용되기 위해서 옵션을 변경해주도록 합니다.
[TEST_SVR01:root]/>smtctl -t 4 -w boot smtctl: SMT will be enabled on the next reboot if you run the bosboot command before the next reboot.
▶ 맨 끝에 now를 boot로 변경하게 되면 리부팅 후에도 모드가 지속적으로 적용이 되는 설정을 말합니다.
[TEST_SVR01:root]/>bosboot -ad /dev/hdisk0 bosboot: Boot image is 61468 512 byte blocks. [TEST_SVR01:root]/>bosboot -a bosboot: Boot image is 61468 512 byte blocks.
▶smtctl -t 4 -w boot 후에 부팅 이미지를 심어주도록 합니다.
PS. 포스팅의 내용은 제 기준으로 작성한 것이기 때문에 참고해서 보시면 감사하겠습니다.
포스팅 과정의 오류 및 오타 그리고 궁금한 점에 대해서는 댓글 남겨주세요.
728x90반응형'System of Infra > Unix System' 카테고리의 다른 글
IBM AIX Curl & Wget 오픈소스 명령어 설치하기 (4) 2024.01.31 IBM AIX MPIO 구성 정보 확인 방법 (8) 2022.09.22 IBM AIX GPFS NSD 및 신규 파일시스템 추가 하는 방법 (0) 2021.09.27 IBM AIX SDD PCM 활용하는 방법 (0) 2021.08.08 IBM AIX ERROR LOGGING BUFFER OVERFLOW 에러 해결 방법 (0) 2021.08.08