Skip to content

Instantly share code, notes, and snippets.

@fwessels
Last active March 1, 2024 00:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fwessels/ca33f20854f91ea6ae45dbfc76cac182 to your computer and use it in GitHub Desktop.
Save fwessels/ca33f20854f91ea6ae45dbfc76cac182 to your computer and use it in GitHub Desktop.

Client Instructions

Introduction

These instructions should be run on the client. There are the following stages:

  • Download executables
  • Prepare objects on the server
  • Test the server
  • Clean up on server

Download executables

$ wget https://s3-us-west-2.amazonaws.com/minio-ppc64le/ppc64le/jq
$ wget https://s3-us-west-2.amazonaws.com/minio-ppc64le/ppc64le/mc
$ wget https://s3-us-west-2.amazonaws.com/minio-ppc64le/ppc64le/parallel-put
$ wget https://s3-us-west-2.amazonaws.com/minio-ppc64le/ppc64le/siege
$ wget https://s3-us-west-2.amazonaws.com/minio-ppc64le/ppc64le/siege.config
$ chmod +x jq mc parallel-put siege siege.config
$ # setup configuration for siege 
$ ./siege.config 

Prepare mc (minio client)

$ # Replace ENDPOINT ACCESSKEY SECRETKEY with values as reported by server
$ ./mc config host add myminio ENDPOINT ACCESSKEY SECRETKEY
Added `myminio` successfully.
$ # create bucket 
$ ./mc mb myminio/bucket
$ # list bucket on server 
$ ./mc ls myminio/bucket
$ 
$ # (no objects yet)

Prepare Server

Upload 128 MB size objects to the server:

$ # TOTAL is total number of objects uploaded to server
$ # CONCURRENCY is number of concurrent uploads
$ TOTAL=1000 CONCURRENCY=10 ENDPOINT=http://192.168.240.200:9000 ACCESSKEY=XXX SECRETKEY=YYY BUCKET=bucket ./parallel-put

Make sure that the objects have been created on the server:

$ ./mc ls myminio/bucket
[2019-03-06 15:40:29 CST] 128MiB object-1551908415677309367-1
[2019-03-06 15:41:14 CST] 128MiB object-1551908456624384034-2
...
[2019-03-06 15:42:04 CST] 128MiB object-1551908506766140079-1000

Measure Read Throughput

Create list of urls

$ ./mc share download --json myminio/bucket | ./jq -r '.share' > urls.txt
$ wc -l urls.txt
1000
$

Test the server

$ ./siege -c 25 -q -i -b --time=60s --file="urls.txt" --log="siege.log"

You can expect output like this (numbers will vary):

Lifting the server siege... done.

Transactions:              19826 hits
Availability:             100.00 %
Elapsed time:               9.46 secs
Data transferred:       99130.00 MB
Response time:    	        0.01 secs
Transaction rate:	       2095.77 trans/sec
Throughput:             10478.86 MB/sec
Concurrency:      	       24.94
Successful transactions:   19826
Failed transactions:           0
Longest transaction:        0.03
Shortest transaction:       0.00

Experiment

You can increase the number of concurrent clients via -c parameter and/or the duration of the test via --time. Probably we need to set the concurrent clients to at least 50 or 100.

Try and find out at what level of concurrency the throughtput maxes out at. siege.log will contain a list of all tests performed.

$ more siege.log
Date & Time,  Trans,  Elap Time,  Data Trans,  Resp Time,  Trans Rate,  Throughput, Concurrent, OKAY, Failed
2019-03-06 15:50:24, 19826, etc. 

Dropping the caches (server side)

In case the total size of the objects is small, you may want to clear the (DRAM) caches on the server side. You can do this as follows (it can take up to several seconds on servers which considerable amounts of RAM, eg. 256 GB or more):

$ echo 3 > /proc/sys/vm/drop_caches

(or when permission denied)

sudo sh -c "/usr/bin/echo 3 > /proc/sys/vm/drop_caches"

Clean up

$ mc rm --recursive --force myminio/bucket
$ # recreate bucket for next test
$ mc mb myminio/bucket

Vary object size

TBD

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment