LoginSignup
0

More than 5 years have passed since last update.

awscliでs3コマンドが使用する最大帯域幅をコントロール

Posted at

概要

AWS CLI S3 Configuration

  • 1秒あたりのバイト数で値を定義できる
  • 1048576だと最大帯域幅使用量を1MB/sに設定
  • レートサフィックスは、KB/s、MB/s、GB/s
[profile development]
aws_access_key_id=foo
aws_secret_access_key=bar
s3 =
  max_concurrent_requests = 20
  max_queue_size = 10000
  multipart_threshold = 64MB
  multipart_chunksize = 16MB
  max_bandwidth = 50MB/s
  use_accelerate_endpoint = true
  addressing_style = path

検証

  • 100MBのダミーファイルをローカルからS3にUploadする その時の帯域幅制限は10MB/sとする

設定

~/.aws/credentials
(snip)
s3 =
  max_bandwidth = 10MB/s
(snip)

結果

$ time aws s3 cp 100mb.txt s3://<bucket-name>/<folder-name>/
upload: ./100mb.txt to s3://<bucket-name>/<folder-name>/100mb.txt

real    0m11.222s
user    0m2.199s
sys 0m0.508s
  • 帯域幅は9MB/sで頭打ちになりました

考察

くそでかい大きなファイルを頻繁にやりとりするような要件があれば、Fitしますね

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0