How to test performance in AWS - cniackz/public GitHub Wiki

  1. Open the drive:
  1. Go to 1Password and Look for Amazon/Gmail Email

  2. Login in AWS: https://signin.aws.amazon.com/signin?redirect_uri=https%3A%2F%2Fus-east-1.console.aws.amazon.com%2Fec2%2Fhome%3Fregion%3Dus-east-1%26state%3DhashArgs%2523ConnectToInstance%253AinstanceId%253Di-0cadb3a7d270662bc%26isauthcode%3Dtrue&client_id=arn%3Aaws%3Aiam%3A%3A015428540659%3Auser%2Fec2&forceMobileApp=0&code_challenge=26uHRDXPKLr5k4bJucwTiSowHRCE4CIVg0xmNZYk-vg&code_challenge_method=SHA-256

  3. Connect via SSH to your machine:

cd /Users/cniackz/minio
ssh -i "key.pem" [email protected]
cd /Users/cniackz/minio
ssh -i "key.pem" [email protected]
  1. Become root user:
sudo su
  1. Get the minio and mc version you need for testing:
# Quita la version viejita o existente
rm -rf /usr/local/bin/minio
# Ve a donde guardas las versiones internamente
cd /root/minio
# Pon la version que te interesa
## Latest:
wget https://dl.min.io/server/minio/release/linux-amd64/minio
## From Archive:
wget https://dl.min.io/server/minio/release/linux-amd64/archive/minio_20230609073212.0.0_amd64.deb
wget https://dl.min.io/server/minio/release/linux-amd64/archive/minio_20220103182258.0.0_amd64.deb
wget https://dl.min.io/server/minio/release/linux-amd64/archive/minio_20220901235336.0.0_amd64.deb
cp RELEASE.2023-06-02T23-17-26Z /usr/local/bin/minio
# O puede ser:
dpkg -i minio_20230504214430.0.0_amd64.deb 
# Quita la version preexistente de mc
rm -rf /usr/local/bin/mc
# Ve a mc folder
cd /root/mc
# Pon la version ahi sino esta
### Latest:
wget https://dl.min.io/client/mc/release/linux-amd64/mc
### From Archive:
wget https://dl.min.io/client/mc/release/linux-amd64/archive/mc.RELEASE.2023-05-30T22-41-38Z
wget https://dl.min.io/client/mc/release/linux-amd64/archive/mc.RELEASE.2022-08-28T20-08-11Z
  1. Review proper versions are in place:
minio --version
mc --version
  1. Execute the test:
rm -rf /data1/.minio.sys/
rm -rf /data2/.minio.sys/
rm -rf /data3/.minio.sys/
rm -rf /data4/.minio.sys/
MINIO_ROOT_USER=minio MINIO_ROOT_PASSWORD=minio123 minio server /data{1...4} --address :9000 --console-address :9001
mc support perf object myminio/ --airgap --size 5MiB
mc admin speedtest myminio/ --size 5MiB 

Automation:

function clean_minio {
  rm -rf /data1/.minio.sys/
  rm -rf /data2/.minio.sys/
  rm -rf /data3/.minio.sys/
  rm -rf /data4/.minio.sys/
}

function remove_minio_version {
  sudo rm -rf /usr/local/bin/minio
}

function remove_mc_version {
  sudo rm -rf /usr/local/bin/mc
}

function run_minio_version_2022_01_03 {
  clean_minio
  remove_current_versions
  cd /root/minio
  dpkg -i minio_20220103182258.0.0_amd64.deb
  minio --version
  MINIO_ROOT_USER=minio MINIO_ROOT_PASSWORD=minio123 minio server /data{1...4} --address :9000 --console-address :9001
}

function run_mc_version_2022_01_05 {
  remove_current_versions
  cd /root/mc
  cp mc.RELEASE.2022-01-05T23-52-51Z /usr/local/bin/mc
  mc --version
  mc alias set myminio http://localhost:9000 minio minio123
  mc admin speedtest myminio/ --size 100KiB
}

2022 September:

function run_minio_version_2022_09_01 {
  clean_minio
  remove_current_versions
  cd /root/minio
  dpkg -i minio_20220901235336.0.0_amd64.deb
  minio --version
  MINIO_ROOT_USER=minio MINIO_ROOT_PASSWORD=minio123 minio server /data{1...4} --address :9000 --console-address :9001
}
function run_mc_version_2022_08_28 {
  remove_mc_version
  cd /root/mc
  cp mc.RELEASE.2022-08-28T20-08-11Z /usr/local/bin/mc
  mc --version
  mc alias set myminio http://localhost:9000 minio minio123
  mc support perf object myminio/ --size 100KiB
}

Python:

#!/usr/bin/env python3

import os

### Diccionario de Python para mapear las versiones:
mapping = {}
mapping['2022-01-03'] = {}
mapping['2022-01-03']['minio'] = "https://dl.min.io/server/minio/release/linux-amd64/archive/minio.RELEASE.2022-01-03T18-22-58Z"
mapping['2022-01-03']['mc']    = "https://dl.min.io/client/mc/release/linux-amd64/archive/mc.RELEASE.2021-12-29T06-52-55Z"

DATE='2022-01-03'
os.system("rm -rf /urs/local/bin/minio")
os.system("rm -rf /urs/local/bin/mc")
os.system("rm -rf {}".format(mapping[DATE]['minio'].split('/')[-1]))
os.system("rm -rf {}".format(mapping[DATE]['mc'].split('/')[-1]))
os.system("wget {}".format(mapping[DATE]['minio']))
os.system("wget {}".format(mapping[DATE]['mc']))
os.system("chmod +x {}".format(mapping[DATE]['minio'].split('/')[-1]))
os.system("chmod +x {}".format(mapping[DATE]['mc'].split('/')[-1]))
os.system("mv {} /usr/local/bin/minio".format(mapping[DATE]['minio'].split('/')[-1]))
os.system("mv {} /usr/local/bin/mc".format(mapping[DATE]['mc'].split('/')[-1]))
os.system("minio --version")
os.system("mc --version")

WARP:

export WARP_ACCESS_KEY=minioadmin
export WARP_SECRET_KEY=minioadmin
warp get --host host1:9000 --duration 300s --obj.size 100KiB