This is an automated email from the ASF dual-hosted git repository. markusthoemmes pushed a commit to branch wrk-load in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk-performance.git
commit 4ca4d79513c95dd7014f363d939ec8719a391a82 Author: Markus Thoemmes <markus.thoem...@de.ibm.com> AuthorDate: Thu Sep 7 11:03:01 2017 +0200 Moving from 'loadtest' to 'wrk' for better loadtest performance Signed-off-by: Christian Bickel <cbic...@de.ibm.com> --- .travis.yml | 2 +- README.md | 2 +- tests/post.lua | 1 + tests/throughput.sh | 18 ++++++++++++++---- 4 files changed, 17 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6f256d3..422fcc5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,4 +11,4 @@ install: script: - ./tests/latency.sh "http://172.17.0.1:10001" "$(cat openwhisk/ansible/files/auth.guest)" - - ./tests/throughput.sh "http://172.17.0.1:10001" "$(cat openwhisk/ansible/files/auth.guest)" 4 \ No newline at end of file + - ./tests/throughput.sh "http://172.17.0.1:10001" "$(cat openwhisk/ansible/files/auth.guest)" 4 2 2m \ No newline at end of file diff --git a/README.md b/README.md index 5e35629..50bdb15 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ A few simple but efficient performance test suites for Apache OpenWhisk. Determi - Limits are set to 999999 each, for the test's load that means: No throttling at all. - The deployment uses a docker setup as proposed by the OpenWhisk development team: `overlay` driver and HTTP API enabled via a UNIX port. -The load is driven by the beautiful [`loadtest`](https://www.npmjs.com/package/loadtest) module. +The load is driven by either the beautiful [`loadtest`](https://www.npmjs.com/package/loadtest) module or the blazingly fast [`wrk`](https://github.com/wg/wrk). ### Travis' machine setup The [machine provided by Travis](https://docs.travis-ci.com/user/ci-environment/#Virtualization-environments) has ~2 CPU cores (likely shared through virtualization) and 7.5GB memory. diff --git a/tests/post.lua b/tests/post.lua new file mode 100644 index 0000000..e3e664c --- /dev/null +++ b/tests/post.lua @@ -0,0 +1 @@ +wrk.method = "POST" \ No newline at end of file diff --git a/tests/throughput.sh b/tests/throughput.sh index 743e8a7..b6e0c92 100755 --- a/tests/throughput.sh +++ b/tests/throughput.sh @@ -9,12 +9,22 @@ credentials=$2 # concurrency level of the throughput test: How many requests should # open in parallel. concurrency=$3 -# How many samples to create by the test. Default: 10000 -samples=${4:-10000} +# How many threads to utilize, directly correlates to the number +# of CPU cores +threads=${4:-4} +# How long to run the test +duration=${5:-30s} action="noopThroughput" "$currentDir/create.sh" "$host" "$credentials" "$action" # run throughput tests -encodedAuth=$(echo "$credentials" | base64 -w 0) -docker run --rm markusthoemmes/loadtest loadtest -n "$samples" -c "$concurrency" -k -m POST -H "Authorization: basic $encodedAuth" "$host/api/v1/namespaces/_/actions/$action?blocking=true" \ No newline at end of file +encodedAuth=$(echo "$credentials" | base64) +docker run --pid=host --userns=host --rm -v $(pwd):/data williamyeh/wrk \ + --threads "$threads" \ + --connections "$concurrency" \ + --duration "$duration" \ + --header "Authorization: basic $encodedAuth" \ + "$host/api/v1/namespaces/_/actions/$action?blocking=true" \ + --latency \ + --script post.lua \ No newline at end of file -- To stop receiving notification emails like this one, please contact "commits@openwhisk.apache.org" <commits@openwhisk.apache.org>.