---
title: "Executors | Grafana k6 documentation"
description: "Executors control how k6 schedules VUs and iterations. Choose the executor to model traffic you want to model to test your services"
---

# Executors

**Executors** control how k6 schedules VUs and iterations. The executor that you choose depends on the goals of your test and the type of traffic you want to model.

Define the executor in `executor` key of the scenario object. The value is the executor name separated by hyphens.

JavaScript ![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy

```javascript
export const options = {
  scenarios: {
    arbitrary_scenario_name: {
      //Name of executor
      executor: 'ramping-vus',
      // more configuration here
    },
  },
};
```

## All executors

The following table lists all k6 executors and links to their documentation.

Expand table

| Name                                                                                         | Value                   | Description                                                                                            |
|----------------------------------------------------------------------------------------------|-------------------------|--------------------------------------------------------------------------------------------------------|
| [Shared iterations](/docs/k6/latest/using-k6/scenarios/executors/shared-iterations/)         | `shared-iterations`     | A fixed amount of iterations are  <br />shared between a number of VUs.                                |
| [Per VU iterations](/docs/k6/latest/using-k6/scenarios/executors/per-vu-iterations/)         | `per-vu-iterations`     | Each VU executes an exact number of iterations.                                                        |
| [Constant VUs](/docs/k6/latest/using-k6/scenarios/executors/constant-vus/)                   | `constant-vus`          | A fixed number of VUs execute as many  <br />iterations as possible for a specified amount of time.    |
| [Ramping VUs](/docs/k6/latest/using-k6/scenarios/executors/ramping-vus/)                     | `ramping-vus`           | A variable number of VUs execute as many  <br />iterations as possible for a specified amount of time. |
| [Constant Arrival Rate](/docs/k6/latest/using-k6/scenarios/executors/constant-arrival-rate/) | `constant-arrival-rate` | A fixed number of iterations are executed  <br />in a specified period of time.                        |
| [Ramping Arrival Rate](/docs/k6/latest/using-k6/scenarios/executors/ramping-arrival-rate/)   | `ramping-arrival-rate`  | A variable number of iterations are  <br />executed in a specified period of time.                     |

> Note
> 
> For any given scenario, you can’t guarantee that a specific VU can run a specific iteration.
> 
> With [`SharedArray`](/docs/k6/latest/javascript-api/k6-data/sharedarray/) and [execution context variables](/docs/k6/latest/using-k6/execution-context-variables/), you can map a specific VU to a specific value in your test data. So the tenth VU could use the tenth item in your array (or the sixth iteration to the sixth item).
> 
> But, you *cannot* reliably map, for example, the tenth VU to the tenth iteration.
