Is it possible to create a loop around a challenge

I would like to loop through my challenge using rally. I have a create, insert and delete operation inside the challenge. I would like to loop through it 10 times or say for 24 hrs. Is there a provision of doing it without copying the same challenge multiple times?

You might be able to use loops provided in Jina2: http://jinja.pocoo.org/docs/2.10/tricks/

@matt.veitas is correct with the loop idea. In my answer in the thread "Increase data size in Rally existing tracks" I have provided an example how loops can be used.

If you want to run multiple iterations of the same benchmarking trial (without restarting Elasticsearch) you can also use the command line parameter --laps, e.g. --laps=12 will run the same benchmark twelve times. Rally will not restart Elasticsearch in between and will (usually) recreate the index at the beginning of each iteration (lap).

Thanks Daniel.

Is there a provision to introduce a time-lag between 2 laps. Like I want every lap to start 5 mins after the end of the last lap.

Hi @dipanjan44

no this is not possible at the moment. Why do you want this?

To me this sounds that it would be better if you instead just invoke Rally several times instead. In your Benchmarking script you could do something like this:

#!/usr/bin/env bash

# Rally invocation here, e.g.:
esrally --target-hosts="10.17.1.33:9200,10.17.1.34:9200" --track="geonames"
# wait for 5 minutes
sleep(300)
# invoke Rally again, maybe with different parameters
esrally --target-hosts="10.17.1.33:9200,10.17.1.34:9200" --track="geonames"
# wait for 5 minutes
sleep(300)
#....

Hi Daniel, I wanted this because I want to test the reliability of the ES server by running one test after the other but at the same time would like to give a little room to the ES server to release the hardware before the next test kicks in. This way i can ensure that the hardware resources are getting released with a decrease in load.

This sounds more like a longer-term stress test to me. If you are really interested in the absolute numbers you need to be aware that you will experience ordering bias (the question is just to what degree and different workloads show different sensitivity to ordering bias).

If you want to solve this within Rally you can use a custom runner but you need to write your own track for this.

Create a file track.py:

import time

def sleep(es, params):
    time.sleep(params["duration"])


def register(registry):
    registry.register_runner("sleep", sleep)

In track.json you can use it as follows:

  "schedule": [
    {
      "operation": {
        "operation-type": "sleep",
        "duration": 300,
        "include-in-reporting": false
      }
    }
# ... Other tasks here ...
  ]

You can specify the number of seconds to sleep with duration. As you are not interested in any metrics for the sleep operation you can set include-in-reporting to false.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.