diff --git a/README.md b/README.md index 502eac1..09cf7b0 100644 --- a/README.md +++ b/README.md @@ -18,3 +18,51 @@ The following is an example running a test against a remote Fedora deployed unde ```bash ./jmeter -Dfedora_4_server=52.90.98.146 -Dfedora_4_context=fcrepo/rest -n -t fedora.jmx ``` + +### Running specific performance tests + +This JMeter configuration can be used for several of the [test plans](https://wiki.duraspace.org/display/FF/Performance+and+Scalability+Test+Plans) + +By default, no tests will run; tests are configured via command-line variable +definitions. To run any tests, you must set the number of threads to use to a +non-zero number via `-Dbinary_threads` or `-Dcontainer_threads`. If both are +set to nonzero, first the 'Create new containers' test will run, followed by an +attempt to run the `Create binary resource` test. + +#### Test 1 - Size of files - large + +The maximum filesize of 10GB as specified in the test plans does not currently seem to work for a couple reasons: + - the uploaded file is currently a single array, and Java has an array limit of between 1 and 2 billion elements + - JMeter's HTTP sampler holds the entire request in memory at once +The practical upper limit seems to be around 500MB, which still requires 6-8GB of heap for JMeter.o + +Also, generating large random files is CPU-bound, so it's especially preferable +for this test to run jmeter on a separate machine from Fedora. Network +bandwidth is then likely to be the limiting factor - the underlying +RandomStringUtils implementation can generate about 100MB/second of random +data on a i7 3770. + +(Ideally instead of generating the entire file at once, we could generate small +chunks at a time and just have the sampler read them from an InputStream, but +that doesn't seem to be possible with the default JMeter HTTP sampler.) + +To run with one thread uploading files between 10KB and 500MB to Fedora: + +* Run: +```bash +JVM_ARGS=-Xmx8G jmeter -Dfedora_4_server= -Dfedora_4_context= -Dfilesize_min=10000 -Dfilesize_max=500000000 -Dbinary_threads=1 -n -t /fedora.jmx +``` + +#### Test 2 - Size of files - small + +* Run: +```bash +jmeter -Dfedora_4_server= -Dfedora_4_context= -Dfilesize_min=0 -Dfilesize_max=4096 -Dbinary_threads=1 -n -t /fedora.jmx +``` + +#### Test 4 - Number of containers - default + +* Run: +```bash +jmeter -Dfedora_4_server= -Dfedora_4_context= -Dcontainer_threads=1 -n -t /fedora.jmx +``` diff --git a/fedora.jmx b/fedora.jmx index 0f8e913..2ad830e 100644 --- a/fedora.jmx +++ b/fedora.jmx @@ -12,19 +12,14 @@ ${__property(loop_count,,20)} = - - NUM_THREADS - ${__property(num_threads,,1)} + + CONTAINER_THREADS + ${__property(container_threads,,0)} = - - NUM_DATASTREAMS - ${__property(num_datastreams,,1)} - = - - - NUM_DATASTREAM_MODIFICATIONS - ${__property(num_datastreams_modifications,, 5)} + + BINARY_THREADS + ${__property(binary_threads,,0)} = @@ -54,7 +49,7 @@ FILE_SIZE_MAX - ${__property(filesize_mean,,100000)} + ${__property(filesize_max,,100000)} = @@ -77,93 +72,13 @@ - - stoptest - - false - ${LOOP_COUNT} - - ${NUM_THREADS} - ${RAMP_UP_PERIOD} - 1365510582000 - 1365510582000 - false - - - - - - - - - ${FEDORA_4_SERVER_NAME} - ${FEDORA_4_SERVER_PORT} - - - http - - - HttpClient4 - 4 - - - - javascript - - - vars.put('FEDORA_SERVER_CONTEXT', vars.get('FEDORA_4_SERVER_CONTEXT')); - - - - - - WorkBench - Fedora Profiling - Fedora Basic Test - - - - - false - - saveConfig - - - true - true - true - - true - true - true - true - false - false - false - false - false - false - true - false - false - false - false - 0 - true - true - - - ${LOG_DIRECTORY}/jmeter-fedora4-${FILE_SIZE_MEAN}-mean-${FILE_SIZE_STD_DEV}-stddev-${NUM_THREADS}-threads.csv - - - stoptest false -1 - ${NUM_THREADS} + ${CONTAINER_THREADS} ${RAMP_UP_PERIOD} 1370357053000 1370357053000 @@ -279,7 +194,7 @@ if (elapsed > threshold) { false -1 - ${NUM_THREADS} + ${BINARY_THREADS} ${RAMP_UP_PERIOD} 1370357053000 1370357053000 @@ -496,7 +411,7 @@ vars.put("post_body", RandomStringUtils.randomAscii(size)); /tmp/jmeter.out - + 2147483640