Skip to content

Instantly share code, notes, and snippets.

@Brainiarc7
Forked from luctrudeau/loadtest.sh
Last active July 13, 2018 04:09
Show Gist options
  • Save Brainiarc7/13fd8a6a7319e65aa7bf2b2752e8c4bd to your computer and use it in GitHub Desktop.
Save Brainiarc7/13fd8a6a7319e65aa7bf2b2752e8c4bd to your computer and use it in GitHub Desktop.
Load Test Script (tuned for Kabylake i7 8750H on the Eurocom Q6)
#!/bin/bash
JOBS=(1 3 6 12 24 48 96)
ENCODE_THREADS=(1 3 6)
NUM_CPU_THREADS=12
for NUM_ENCODE_THREADS in ${ENCODE_THREADS[*]}; do
for NUM_JOBS in ${JOBS[*]}; do
STEP=$(($NUM_CPU_THREADS/$NUM_JOBS))
echo "Jobs" $NUM_JOBS "Enc Threads" $NUM_ENCODE_THREADS "(Seconds)"
for (( i=0; i<5; i+=1 )); do
START_TIME=$SECONDS
for (( COUNTER=0; COUNTER<$NUM_CPU_THREADS; COUNTER+=$STEP )); do
vpxenc --threads=$NUM_ENCODE_THREADS --good --cpu-used=2 --codec=vp9 --psnr -v -o test${COUNTER}.webm ~/Videos/objective-1-fast/ducks_take_off_1080p50_60f.y4m 2> cpu${COUNTER}.out &
pids[${COUNTER}]=$!
done
for pid in ${pids[*]}; do
wait $pid
done
ELAPSED_TIME=$(($SECONDS - $START_TIME))
echo -n ${ELAPSED_TIME}" "
done
printf "\n"
done
done
@Brainiarc7
Copy link
Author

Notes:

Fetch test material:

mkdir -p ~/Videos/objective-1-fast
cd ~/Videos/objective-1-fast
wget -c -v -nc https://people.xiph.org/~tdaede/sets/objective-1-fast/ducks_take_off_1080p50_60f.y4m

Then run the script above.

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