-
[ AWS ] S3 전송시 성능 조정 옵션 (max_concurrent_requests - CPU 스레드 조정)AWS Infra 2022. 2. 28. 02:22
S3 고용량 파일을 전송할 때, 리소스를 사용하게 되는데, CPU를 과도하게 점유하게 되면, 옵션을 통해 조정이 가능하다.
테스트 환경은 t2.small로 해본다.
우선 테스트용 고용량 파일 준비 (fallocate 명령어를 활용)
$ fallocate -l 25g test_file .... .... 26843545600 Feb 27 16:09 test_file
옵션설정을 하지 않고, 기본적으로 전송해본다.
약 14분 소요되었고, CPU의 경우 특정구간에서 100%를 사용하였다.
max_concurrent_requests (CPU 스레드 조정)
- 기본값 : 10
- 이 값을 낮추면 S3 전송 명령이 리소스를 덜 사용하지만, S3 전송을 완료하는 데 시간이 오래 걸릴 수 있다.
- 설정방법
# 기본프로필 설정 (값을 1 하였을 때) $ aws configure set default.s3.max_concurrent_requests 1 # 사용자 프로필 설정 $ aws configure set s3.max_concurrent_requests 1 --profile [사용자프로필] # 세팅확인 $ cat .aws/config
약 17분 소요되었고, CPU의 경우 50% 이하를 유지하였다.
https://docs.aws.amazon.com/cli/latest/topic/s3-config.html
AWS CLI S3 Configuration — AWS CLI 1.22.63 Command Reference
Note: You are viewing the documentation for an older major version of the AWS CLI (version 1). AWS CLI version 2, the latest major version of AWS CLI, is now stable and recommended for general use. To view this page for the AWS CLI version 2, click here. F
docs.aws.amazon.com
'AWS Infra' 카테고리의 다른 글
[ AWS ] RDS mysql Slow Query Monitoring ( Cloudwatch ) (0) 2022.06.29 [ AWS ] EventBridge cron expressions (0) 2022.03.21 [ AWS ] EC2 인스턴스 Type 변경후 재시작 (0) 2022.03.16 [ AWS CLI ] describe-subnets (0) 2022.03.14 [ AWS ] Amazon-Linux EC2 인증키 변경 (로그인 상태) (0) 2022.02.26 [ AWS ] boto3를 이용한 보안그룹 Any 점검 (0) 2022.02.20 [ AWS ] AWS Transfer Family (Serverless SFTP) 구축 (0) 2022.02.13 [ AWS ] Amazon Linux 2에 python 3.8 설치 (0) 2022.02.02