> For the complete documentation index, see [llms.txt](https://v2.dataos.info/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://v2.dataos.info/references/engine-guide/athena/limits-and-performance.md).

# Limits and performance

Size Athena workloads, control concurrency, manage costs, and plan for performance.

Set practical resource and concurrency limits before production demand grows. These guardrails protect workgroup stability and cost as workloads, API traffic, and BI usage increase.

## Operational boundaries

### Compute sizing

| Workload                       | Guidance                                                      |
| ------------------------------ | ------------------------------------------------------------- |
| Dev / reference retail dataset | Default workgroup; enforce scan limits in dev                 |
| Full backfill                  | Run during off-peak; watch data scanned in the Athena console |
| Daily incrementals             | Partition or time-filter aggressively in SQL                  |
| Semantic API / BI              | Separate workgroup optional (query vs. build)                 |

### Concurrency and API replicas

Athena workgroups have concurrent query limits. Align Vulcan `concurrent_tasks` and API replicas with your workgroup's quotas.

```yaml
api:
  replicas: 2
  resources:
    limits:
      cpu: "4000m"
      memory: "3Gi"
```

### Scheduling and latency floor

| Recommendation                       | Why                                            |
| ------------------------------------ | ---------------------------------------------- |
| Schedule after upstream lands in S3  | Avoid partial external table reads             |
| Prefer `timezone: UTC` in production | Avoid DST surprises                            |
| `endOn` ≥ 1 to 2 years out           | An expired `endOn` halts the workflow silently |
| `concurrencyPolicy: Forbid`          | Prevents overlapping incrementals              |

{% hint style="warning" %}
A reference deploy may default to `timezone: US/Pacific`; change it for production.
{% endhint %}

Athena's engine startup is usually lower than a cold Databricks warehouse start, but varies by query. The semantic API adds roughly 1.5 to 3 seconds of overhead (validate in your stack). Large scans are dominated by S3 read volume.

## Performance reference

Validate on a known dataset and catalog scale before publishing SLOs. Measure data scanned per model run (the primary cost driver), `plan`/`run` duration (concurrency and partition design), semantic query wall time (API + scan volume), and incremental window width (bytes touched per run).

{% hint style="info" %}
**Flagged for review:** the source manual committed to formal SLO targets, the same way the Redshift manual did, and the percentage values themselves were left blank in the source ("≥ %"). No other converted engine page states numeric SLOs. The table is kept below exactly as given, gaps included, rather than filled in with an invented number; decide whether these belong on this page, on a tenant-level SLA page, or should wait until they're validated and filled in.

| SLO                                                                   | Target                                                            |
| --------------------------------------------------------------------- | ----------------------------------------------------------------- |
| Scheduled incremental run success rate (IAM + Glue + S3 healthy)      | ≥ *(value not specified in source)*                               |
| `vulcan plan` / `apply` success (after Glue DB + S3 layout validated) | ≥ *(value not specified in source)*                               |
| Semantic API availability                                             | Same as the deployed Vulcan API track                             |
| Cold query after idle workgroup                                       | Not yet measured; benchmark on your own workgroup (`tpch_athena`) |

Athena cost and latency are shaped by scanned data and concurrency. Validate targets on a known dataset (`tpch`/`tpch_athena`: `vulcan plan`, an API smoke test) before committing to external SLOs.
{% endhint %}

## Cost guardrails

Athena charges primarily for data scanned. Reduce scanned bytes before raising limits or adding capacity.

### Workgroup limits

Set a bytes-scanned limit for every workgroup. Use a lower limit in development to catch unpartitioned queries early.

Set concurrency limits to match the workgroup quota and expected load. Reserve separate workgroups for scheduled builds and interactive workloads when they can compete.

### Query timeouts

Set the workgroup query timeout to bound runaway queries. Set a shorter timeout for interactive workloads than for scheduled transformations.

Treat timeout failures as signals to improve filters, partitions, or query design. Do not resolve them by increasing the limit without checking scanned bytes.

### Cost attribution

Use separate workgroups for each environment. Assign separate S3 result prefixes to retain an environment-level audit trail.

Tag DataOS resources with the engine and owning product. Use the same product identifier in AWS cost allocation tags and billing reports.

### Storage

For external Parquet, apply S3 lifecycle rules to staging data and obsolete query results. Keep source retention separate from query-result retention.

For managed tables, design partitions around common filters. Compact small files and remove obsolete files through your organization's retention policy.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://v2.dataos.info/references/engine-guide/athena/limits-and-performance.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
