

# SUS05-BP04 하드웨어 기반 컴퓨팅 액셀러레이터의 사용 최적화
<a name="sus_sus_hardware_a5"></a>

가속 컴퓨팅 인스턴스의 사용을 최적화하여 워크로드의 물리적 인프라 요구를 줄입니다.

 **일반적인 안티 패턴:** 
+  GPU 사용을 모니터링하지 않습니다.
+  특별히 구축된 인스턴스가 더 높은 성능, 더 낮은 비용 및 더 나은 와트당 성능을 제공함에도 불구하고 워크로드에 범용 인스턴스를 사용합니다.
+  CPU 기반 대안을 사용하는 것이 더 효율적인 작업에 하드웨어 기반 컴퓨팅 액셀러레이터를 사용합니다.

 **이 모범 사례 확립의 이점:** 하드웨어 기반 액셀러레이터의 사용을 최적화하여 워크로드의 물리적 인프라 요구를 줄일 수 있습니다.

 **이 모범 사례가 확립되지 않을 경우 노출되는 위험 수준:** 중간 

## 구현 지침
<a name="implementation-guidance"></a>

 높은 처리 용량이 필요한 경우, 그래픽 처리 디바이스(GPU) 및 Field-Programmable Gate Array(FPGA)와 같은 하드웨어 기반 컴퓨팅 액셀러레이터에 대한 액세스를 제공하는 가속 컴퓨팅 인스턴스 사용의 이점을 활용할 수 있습니다. 이러한 하드웨어 액셀러레이터는 CPU 기반 대안보다 더 효율적인 그래픽 처리 또는 데이터 패턴 일치와 같은 특정 기능을 수행합니다. 렌더링, 트랜스코딩, 기계 학습 등 많은 가속 워크로드는 리소스 사용 면에서 매우 가변적입니다. 필요한 시간 동안만 이 하드웨어를 실행하고 필요하지 않은 경우 자동화를 통해 이를 폐기하여 리소스 사용을 최소화합니다.

## 구현 단계
<a name="implementation-steps"></a>
+  **컴퓨팅 가속기 탐색:** 요구 사항을 해결할 수 있는 [가속 컴퓨팅 인스턴스](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/accelerated-computing-instances.html)를 식별합니다.
+  **목적별 하드웨어 사용:** 기계 학습 워크로드의 경우 [AWS Trainium](https://aws.amazon.com/machine-learning/trainium/), [AWS Inferentia](https://aws.amazon.com/machine-learning/inferentia/) 및 [Amazon EC2 DL1](https://aws.amazon.com/ec2/instance-types/dl1/)과 같이 워크로드에 적합한 목적별 하드웨어의 장점을 활용합니다. AWS Inferentia 인스턴스(예: Inf2 인스턴스)는 [동급 Amazon EC2 인스턴스에 비해 최대 50% 더 우수한 와트당 성능](https://aws.amazon.com/machine-learning/inferentia/)을 제공합니다.
+  **사용량 지표 모니터링:** 가속 컴퓨팅 인스턴스의 사용량 지표를 수집합니다. 예를 들어, [Amazon CloudWatch의 NVIDIA GPU 지표 수집](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Agent-NVIDIA-GPU.html)에서와 같이 CloudWatch 에이전트를 사용하여 GPU에 대한 `utilization_gpu` 및 `utilization_memory`와 같은 지표를 수집할 수 있습니다.
+  **적정 크기로 조정:** 코드, 네트워크 운영 및 하드웨어 액셀러레이터 설정을 최적화하여 기본 하드웨어가 반드시 제대로 활용되도록 해야 합니다.
  +  [GPU 설정 최적화](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/optimize_gpu.html) 
  +  [GPU Monitoring and Optimization in the Deep Learning AMI](https://docs.aws.amazon.com/dlami/latest/devguide/tutorial-gpu.html) 
  +  [Optimizing I/O for GPU performance tuning of deep learning training in Amazon SageMaker AI](https://aws.amazon.com/blogs/machine-learning/optimizing-i-o-for-gpu-performance-tuning-of-deep-learning-training-in-amazon-sagemaker/) 
+  **최신 상태 유지:** 최신 고성능 라이브러리 및 GPU 드라이버를 사용합니다.
+  **불필요한 인스턴스 해제:** 자동화를 사용하여 사용하지 않는 GPU 인스턴스 사용을 해제합니다.

## 리소스
<a name="resources"></a>

 **관련 문서:** 
+  [가속 컴퓨팅](https://aws.amazon.com/ec2/instance-types/#Accelerated_Computing) 
+ [ Let's Architect\$1 Architecting with custom chips and accelerators ](https://aws.amazon.com/blogs/architecture/lets-architect-custom-chips-and-accelerators/)
+ [ 워크로드에 적합한 EC2 인스턴스 유형을 선택하려면 어떻게 해야 하나요? ](https://aws.amazon.com/premiumsupport/knowledge-center/ec2-instance-choose-type-for-workload/) 
+  [Amazon EC2 VT1 Instances](https://aws.amazon.com/ec2/instance-types/vt1/) 
+ [ Choose the best AI accelerator and model compilation for computer vision inference with Amazon SageMaker AI ](https://aws.amazon.com/blogs/machine-learning/choose-the-best-ai-accelerator-and-model-compilation-for-computer-vision-inference-with-amazon-sagemaker/)

 **관련 비디오:** 
+ [AWS re:Invent 2021 - How to select Amazon EC2 GPU instances for deep learning ](https://www.youtube.com/watch?v=4bVrIbgGWEA)
+  [AWS Online Tech Talks - Deploying Cost-Effective Deep Learning Inference](https://www.youtube.com/watch?v=WiCougIDRsw) 
+ [AWS re:Invent 2023 - Cutting-edge AI with AWS and NVIDIA](https://www.youtube.com/watch?v=ud4-z_sb_ps)
+ [AWS re:Invent 2022 - [NEW LAUNCH\$1] Introducing AWS Inferentia2-based Amazon EC2 Inf2 instances](https://www.youtube.com/watch?v=jpqiG02Y2H4)
+ [AWS re:Invent 2022 - Accelerate deep learning and innovate faster with AWS Trainium](https://www.youtube.com/watch?v=YRqvfNwqUIA)
+ [AWS re:Invent 2022 - Deep learning on AWS with NVIDIA: From training to deployment](https://www.youtube.com/watch?v=l8AFfaCkp0E)