Skip to content

hperf usage

Allan Roger Reid edited this page Sep 27, 2024 · 2 revisions

On servers, setup hperf in server mode using clush

More clush details in https://github.com/allanrogerr/public/wiki/clush-(MacOS) or https://github.com/allanrogerr/public/wiki/clush-(Linux)

~/.local/bin/clush --conf /Users/allanreid/Documents/MinIO/clush/conf --hostfile /Users/allanreid/Documents/MinIO/clush/hosts-acme "sudo apt update -y && sudo apt upgrade -y && sudo apt install -y build-essentials && sudo apt install -y golang-go"

~/.local/bin/clush --conf /Users/allanreid/Documents/MinIO/clush/conf --hostfile /Users/allanreid/Documents/MinIO/clush/hosts-acme "git clone https://github.com/minio/hperf.git"

~/.local/bin/clush --conf /Users/allanreid/Documents/MinIO/clush/conf --hostfile /Users/allanreid/Documents/MinIO/clush/hosts-acme "cd ~/hperf && git config pull.rebase true && git pull && cd cmd/hperf && go build"

~/.local/bin/clush --conf /Users/allanreid/Documents/MinIO/clush/conf --hostfile /Users/allanreid/Documents/MinIO/clush/hosts-acme "cd ~/hperf/cmd/hperf && sudo ./hperf server --address 0.0.0.0:10010"

On client, perform similar tasks

Install golang

export version=1.22.6
wget https://go.dev/dl/go${version}.linux-amd64.tar.gz
sudo rm -rf /usr/local/go && sudo tar -C /usr/local -xzf go${version}.linux-amd64.tar.gz
cat <<EOF >> $HOME/.profile 
export PATH=$PATH:/usr/local/go/bin:~/go/bin
EOF
cat $HOME/.profile 
source $HOME/.profile
go version

Install hperf

cd github
rm -rf hperf/
git clone https://github.com/minio/hperf.git
cd hperf/
cd cmd/hperf && go build
cat << EOF > hosts
10.212.97.233
10.212.97.18
10.212.97.170
10.212.97.164
10.212.97.107
10.212.97.42
10.212.97.56
10.212.97.240
10.212.97.100
10.212.97.74
10.212.97.194
10.212.97.32
EOF

Test hperf list

./hperf list --help
./hperf list --hosts file:hosts --port 10010
./hperf list --hosts 10.212.97.233 --port 10010
./hperf list --hosts 10.212.97.233,10.212.97.18,10.212.97.170,10.212.97.164,10.212.97.107,10.212.97.42,10.212.97.56,10.212.97.240,10.212.97.100,10.212.97.74,10.212.97.194,10.212.97.32 --port 10010
#     ID                             Time                           
0     latency-test-1                 27/09/2024 12:02 PM            
1     http-test-2                    27/09/2024 11:45 AM            
2     http-test-3                    27/09/2024 11:44 AM            
3     http-test-1                    27/09/2024 11:35 AM

requests sends as many requests as possible - with data

./hperf requests --hosts file:hosts --id http-test-1 --duration 5 --concurrency 12 --port 10010
where

duration in seconds concurrency in number of simultaneous requests sent

Created  Local           Remote          PMSH PMSL TTFBH TTFBL TX        #TX    #ERR   #Dropped  MemUsed CPUUsed 
12:22:33 0.0.0.0         10.212.97.18    614  0    73    0     0 B/s     58     0      0         12      0       
12:22:33 0.0.0.0         10.212.97.170   991  0    69    0     0 B/s     20     0      0         12      0       
12:22:33 0.0.0.0         10.212.97.164   698  0    80    0     0 B/s     43     0      0         12      0       
where
PMSH=packets millisecond high
PMSL=packets millisecond low
TTFBH=time to first byte high
TTFBL=time to first byte low
TX=transfer rate
#TX=number of transfers
#ERR=number of errors
#Dropped=number of packets dropped
MemUsed=memory user
CPUUsed=CPUUsed
Note

It takes some time for TX to change from zero since this requires two points in time to be established High concurrency=high CPU.TTBF and PMS will also be high with high concurrency

stat replays the output for a specifc list id

./hperf list --hosts file:hosts --port 10010
./hperf stat --help
./hperf stat --hosts file:hosts --id http-test-1 --port 10010 > hperf-1.out
less hperf-1.out 
11:35:41 0.0.0.0         10.212.97.194   661  0    429   0     0 B/s     43     0      0         11      35      
11:35:41 0.0.0.0         10.212.97.32    573  0    108   0     0 B/s     52     0      0         11      35      
11:35:41 0.0.0.0         10.212.97.233   825  0    48    0     0 B/s     44     0      0         10      33      
11:35:41 0.0.0.0         10.212.97.18    842  0    428   0     0 B/s     32     0      0         15      32  

latency - sends small files infrequently. There is no bandwidth. test runs for 5 minutes. 10 requests per second (request-delay 100ms).

./hperf latency --concurrency 1 --request-delay 100 --duration 360 --buffer-size 8000 --payload-size 8000 -id latency-test-1 --port 10010 --hosts file:hosts
Created  Local           Remote          PMSH PMSL #TX    #ERR   #Dropped  MemUsed CPUUsed 
11:56:20 0.0.0.0         10.212.97.233   18   0    9      0      0         5       5       
11:56:20 0.0.0.0         10.212.97.233   13   0    9      0      0         4       0       
11:56:20 0.0.0.0         10.212.97.233   17   0    9      0      0         4       0       
11:56:20 0.0.0.0         10.212.97.233   9    0    9      0      0         4       0       
11:56:20 0.0.0.0         10.212.97.18    16   0    9      0      0         5       5       
...
11:59:00 0.0.0.0         10.212.97.74    0    0    1594   1      0         5       3       
11:59:00 0.0.0.0         10.212.97.194   0    0    1592   1      0         5       3       
11:59:00 0.0.0.0         10.212.97.32    0    0    1591   1      0         5       3       
11:59:00 0.0.0.0         10.212.97.18    0    999  1512   1      0         5       1       
...
Note

10.212.97.18 was disconnected to demo Low CPU/Mem consumption PMSL is 999 indicating timeout Errors steadily creep up Once 10.212.97.18 was reconnected, errors diminished

listen listens to an ongoing test at whatever point it is at the time

./hperf listen --hosts 10.212.97.233 --port 10010 --id latency-test-1

Bandwidth pipes as much data as possible

Clone this wiki locally