ECS: ECS에서 s3cmd를 구성하고 테스트하는 방법

Summary: 이 기술 자료 문서에서는 ECS에서 s3cmd 툴을 구성하는 방법에 대해 설명합니다.

This article applies to This article does not apply to This article is not tied to any specific product. Not all product versions are identified in this article.

Instructions

설치 및 구성

1. 추가 정보 섹션에서 s3cmd 툴을 다운로드합니다.

2. s3cmd 툴의 압축을 풀고 설치합니다.

명령:

# sudo tar xzf s3cmd-2.4.0.tar.gz
# sudo python setup.py install

3. s3cmd 구성을 실행합니다.

명령:

# s3cmd --configured

예:

Enter new values or accept defaults in brackets with Enter.
Refer to user manual for detailed description of all options.

Access key and Secret key are your identifiers for Amazon S3. Leave them empty for using the env variables.
Access Key [XXXX]: objectuser for that bucket
Secret Key [XXX]: secret key
Default Region [US]:

Use "s3.amazonaws.com" for S3 Endpoint and not modify it to the target Amazon S3.
S3 Endpoint [XXXXX]: XX,XX.XX.XXX:9020

Use "%(bucket)s.s3.amazonaws.com" to the target Amazon S3. "%(bucket)s" and "%(location)s" vars can be used
if the target S3 system supports dns based buckets.
DNS-style bucket+hostname:port template for accessing a bucket [%(bucket)s.s3.amazonaws.com]:

Encryption password is used to protect your files from reading
by unauthorized persons while in transfer to S3
Encryption password:
Path to GPG program [/usr/bin/gpg]:

When using secure HTTPS protocol all communication with Amazon S3
servers is protected from 3rd party eavesdropping. This method is
slower than plain HTTP, and can only be proxied with Python 2.7 or newer
Use HTTPS protocol [Yes]: No

On some networks all internet access must go through a HTTP proxy.
Try setting it here if you can't connect to S3 directly
HTTP Proxy server name:

New settings:
  Access Key:XXXXX
  Secret Key:  XXXXXXXXX
  Default Region: US
  S3 Endpoint: XX.XX.XX.XXX:9020
  DNS-style bucket+hostname:port template for accessing a bucket: %(bucket)s.s3.amazonaws.com
  Encryption password:
  Path to GPG program: /usr/bin/gpg
  Use HTTPS protocol: False
  HTTP Proxy server name:
  HTTP Proxy server port: 0

Test access with supplied credentials? [Y/n]
Please wait, attempting to list all buckets...
Success. Your access key and secret key worked fine :-)

Now verifying that encryption works...
Not configured. Never mind.

Save settings? [y/N] y
Configuration saved to '/home/admin/.s3cfg'

4. s3cmd를 실행하여 모든 버킷을 나열합니다.

명령:

# s3cmd ls

예:

admin@ecsnode:~/mrx> s3cmd ls
2024-06-05 06:54  s3://bucket
2024-05-01 15:46  s3://s3cmd_bucket
2024-05-09 11:56  s3://s3cmd_bucket1
2024-05-08 09:18  s3://winscp

5. 버킷의 콘텐츠를 나열합니다(구성 후 비어 있음).

명령:

admin@ecsnode:~/mrx> s3cmd ls s3://s3cmd_bucket
admin@ecsnode:~/mrx>

6. 파일을 생성하여 버킷에 업로드합니다.

명령:

# touch addressbook.xml

예:

admin@ecsnode:~/mrx> s3cmd put addressbook.xml s3://s3cmd_bucket
upload: 'addressbook.xml' -> 's3://s3cmd_bucket/addressbook.xml'  [1 of 1]
 0 of 0     0% in    0s     0.00 B/s  done

7. 버킷의 내용을 나열합니다.

명령:

# s3cmd ls s3://s3cmd_bucket

예:

admin@ecsnode:~/mrx> s3cmd ls s3://s3cmd_bucket
2024-07-03 11:36            0  s3://s3cmd_bucket/addressbook.xml
admin@ecsnode8:~/mrx>

8. 버킷에서 파일을 읽습니다.

명령:

# s3cmd get s3://s3cmd_bucket/addressbook.xml
예:
admin@ecsnode:~/mrx> s3cmd get s3://s3cmd_bucket/addressbook.xml
download: 's3://s3cmd_bucket/addressbook.xml' -> './addressbook.xml'  [1 of 1]
 0 of 0     0% in    0s     0.00 B/s  done


PUT을 사용하여 쓰기 성능 테스트.

1. 파일 생성:

명령:

# sudo fallocate -l 10G random10GB.bin

2. 파일 random10BG.bin s3cmd_bucket의 쓰기 기간을 모니터링하는 time 명령을 사용합니다.

명령:

# time ./s3cmd put <file> s3://<bucket>

예:

admin@ecsnode:~> # time ./s3cmd put random10GB.bin s3://s3cmd_bucket
outputs:
upload: 'random10GB.bin' -> 's3://s3cmd_bucket/random10GB.bin'  [part 683 of 683, 10MB] [1 of 1]
 10485760 of 10485760   100% in    0s    57.68 MB/s  done

real    3m8.872s
user    1m29.483s
sys     0m19.052s

쓰기 응답 시간을 계산하려면 다음과 같이 합니다.

  • 3분 8초 = 188초
  • 업로드 속도는 10,240MB/188 = 54MB/s(초당 메가바이트)입니다.


GET을 사용하여 성능 테스트를 읽습니다.

읽기 기간을 모니터링하는 time 명령을 사용합니다.

명령:

# s3time s3cmd get s3://<bucket/>/<file>

예:

admin@ecsnode:~> s3time s3cmd get s3://s3cmd_bucket/random10GB.bin
If 's3time' is not a typo you can use command-not-found to lookup the package that contains it, like this:
    cnf s3time
admin@ecsnode8:~> time s3cmd get s3://s3cmd_bucket/random10GB.bin
download: 's3://s3cmd_bucket/random10GB.bin' -> './random10GB.bin'  [1 of 1]
 10737418240 of 10737418240   100% in   38s   263.31 MB/s  done

real    0m39.172s
user    0m23.688s
sys     0m12.637s

읽기 응답 시간을 계산하려면 다음과 같이 합니다.

  • 39초
  • 10240MB / 39 = 262.6MB/s(초당 메가바이트)는 다운로드 속도입니다.

Additional Information

아래에서 s3cmd 툴을 다운로드하십시오.
이 하이퍼링크는 Dell Technologies 외부의 웹사이트로 연결됩니다.

https://s3tools.org/download테스트 참조:
https://geekmungus.co.uk/?p=4018이 하이퍼링크는 Dell Technologies 외부의 웹사이트로 연결됩니다.

Affected Products

ECS, ECS Appliance
Article Properties
Article Number: 000224751
Article Type: How To
Last Modified: 08 Sep 2025
Version:  2
Find answers to your questions from other Dell users
Support Services
Check if your device is covered by Support Services.