# Iteration Concept

**URL:** <https://discuss.elastic.co/t/iteration-concept/121307>\
**Category:** Elasticsearch\
**Tags:** rally\
**Created:** [February 24, 2018, 1:26am UTC](https://discuss.elastic.co/t/iteration-concept/121307 "2018-02-24T01:26:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Phuong\_Hoang](https://avatars.discourse-cdn.com/v4/letter/p/848f3c/32.png) [@Phuong\_Hoang](https://discuss.elastic.co/u/Phuong_Hoang)\
**Post date:** [February 24, 2018, 1:26am UTC](https://discuss.elastic.co/t/iteration-concept/121307/1 "2018-02-24T01:26:01Z")

</div>

```auto
{
  "challenge": {
    "name": "just-search",
    "schedule": [
      {
        "operation": {
          "operation-type": "search",
          "index": "_all",
          "body": {
            "query": {
              "match_all": {}
            }
          }
        },
        "iterations": 100,
        "target-throughput": 10
      }
    ]
  }
}

```

This track assumes that you have an existing cluster with pre-populated data. It will run the provided match\_all query at 10 operations per second with one client and use 100 iterations as warmup and the next 100 iterations to measure.

The `iteration` concept confuses me  
What does `iteration` mean? Does one `iteration` mean one `operation`, if not what's the relationship between `iteration` and `operation`?

From `target-throughput` and `iterations`, could we know how many operations and how long does one client execute?

If one iteration means one operation, in the example, does it mean we need to take 10 seconds to run all the operations?

---

<div class="post-metadata">

**Author:** ![danielmitterdorfer](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/danielmitterdorfer/32/110510_2.png) [@danielmitterdorfer](https://discuss.elastic.co/u/danielmitterdorfer)\
**Post date:** [February 26, 2018, 8:43am UTC](https://discuss.elastic.co/t/iteration-concept/121307/2 "2018-02-26T08:43:59Z")

</div>

We call something that you want to execute an "operation" (e.g. bulk-indexing, a term query for a username, an aggregation).

The unit "operations per second" means that this specific operation was run N times within one second.

The term "iteration" means that each client send that many requests to Elasticsearch, e.g. if you specify 100 iterations of the operation "query user", Rally will send this query 100 times to Elasticsearch and measures service time and latency.

> [@Phuong\_Hoang](#):
>
> From target-throughput and iterations, could we know how many operations and how long does one client execute?

Yes but only if the target system (Elasticsearch) is able to keep up with the load.

> [@Phuong\_Hoang](#):
>
> If one iteration means one operation, in the example, does it mean we need to take 10 seconds to run all the operations?

Assuming that Elasticsearch can handle the load that you generate, then your assumption is correct.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [March 26, 2018, 8:46am UTC](https://discuss.elastic.co/t/iteration-concept/121307/3 "2018-03-26T08:46:05Z")

</div>

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