[ARVADOS] created: eee963d802ed15538d72b270938c0e1adbcfec81

git at public.curoverse.com git at public.curoverse.com
Wed Apr 30 18:26:04 EDT 2014


        at  eee963d802ed15538d72b270938c0e1adbcfec81 (commit)


commit eee963d802ed15538d72b270938c0e1adbcfec81
Author: Tim Pierce <twp at curoverse.com>
Date:   Wed Apr 30 18:26:48 2014 -0400

    Added loadtest.sh for load testing Keep.
    
    Simple load testing script, launches multiple ab tests in the background
    for GET and PUT on randomly generated 64MB files. Refs #2580.

diff --git a/services/keep/loadtest.sh b/services/keep/loadtest.sh
new file mode 100755
index 0000000..c503f7e
--- /dev/null
+++ b/services/keep/loadtest.sh
@@ -0,0 +1,51 @@
+#! /bin/sh
+
+# Stress test for Keep.
+#
+# This test generates a specified number of 64MB data files of random
+# data, then starts a Keep server on localhost and launches a number
+# of concurrent ab requests against it.
+#
+# Configuration settings:
+#   NUMREQUESTS
+#       Total number of iterations to perform for each
+#       request. (-n option to ab)
+#   MAXCONCURRENT
+#       Maximum number of concurrent requests per process.
+#       (-c option to ab)
+#   NUMFILES
+#       Number of data files to generate for the test.
+
+NUMREQUESTS=100
+MAXCONCURRENT=5
+NUMFILES=3
+
+DATADIR=$HOME/keeploadtest.$$
+mkdir $DATADIR || exit 1
+
+# Generate random data files.
+for i in $(seq 1 $NUMFILES)
+do
+    echo "Generating file #$i..."
+    head --bytes=64M /dev/urandom > $DATADIR/data
+    md5=$(md5sum $DATADIR/data | awk '{print $1}')
+    mv $DATADIR/data $DATADIR/$md5
+done
+
+# start keep
+keep1=$HOME/keepdir.$$.1
+keep2=$HOME/keepdir.$$.2
+mkdir $keep1
+mkdir $keep2
+echo "Starting keep..."
+bin/keep -volumes=$keep1,$keep2 > /tmp/keep.log 2>&1 &
+
+# run benchmarks
+for loc in $(ls $DATADIR)
+do
+    # PUT request
+    ab -u $DATADIR/$loc -n $NUMREQUESTS -c $MAXCONCURRENT http://localhost:25107/$loc &
+    # GET request
+    ab -n $NUMREQUESTS -c $MAXCONCURRENT http://localhost:25107/$loc &
+done
+

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list