# Simulation frequency

If we don't do any special configuration, entity data is captured at the highest possible frequency and sent to the replication server. This often generates more data than is needed to efficiently replicate the entity's state across the network.

### Global simulator frequency

On a simulator, we can limit the framerate globally using Unity's built-in static variable *targetFrameRate*.

```csharp
Application.targetFrameRate = 10;
```

{% hint style="info" %}
**coherence** will automatically limit the target framerate of uploaded simulators to **30 frames per second**. We plan to enable lifting this restriction in the future. Check back for updates in the next couple of releases.
{% endhint %}

### Per-component frequency limitation

Sample rate can also be configured individually for all fields with code.&#x20;

```csharp
// Set position sample rate to 10hz
GetComponent<CoherenceSync>().SetSamplingFrequency<WorldPosition>(10);

// Set rotation sample rate to 20hz
GetComponent<CoherenceSync>().SetSamplingFrequency<WorldOrientation>(20);
```

{% hint style="info" %}
In the future, you will be able to define per-field sample frequencies in the Optimization window.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.coherence.io/0.7.4/optimization/simulation-frequency.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
