Sizing the StrataBI task
StrataBI runs on AWS Fargate, in tasks of one size you choose: ecs_task_cpu and ecs_task_memory, two OpenTofu variables in StrataBI's settings (how to set them). Memory decides whether a chart can load a result at all; vCPU decides how fast it draws.
The default: 2 vCPU, 6 GB
ecs_task_cpu = 2048 and ecs_task_memory = 6144. That holds a 50-million-point chart for two viewers at once. The default used to be 0.5 vCPU and 1 GB.
Existing installs. An install that never set the task size takes the new default at its next update. One that set 512 and 1024 keeps them until you change them. To keep a size, or to choose one, record it in StrataBI's settings file, or in your own tfvars if you run the OpenTofu yourself, before you update.
What it costs
At AWS's on-demand Fargate prices for us-east-1 (Linux, x86): $0.04048 per vCPU-hour and $0.004445 per GB-hour. Per task, running all month (730 hours):
| Task | Per hour | Per month |
|---|---|---|
| 2 vCPU, 6 GB (the default) | $0.108 | About $78.57 |
| 2 vCPU, 4 GB | $0.099 | About $72.08 |
| 1 vCPU, 3 GB | $0.054 | About $39.28 |
| 0.5 vCPU, 1 GB (the old default) | $0.025 | About $18.02 |
Multiply by desired_count, the number of tasks. Prices differ by region and can change: see AWS Fargate pricing.
Choosing a size
Tables and downloads never load the whole result: a table with more rows than it shows at once pages from S3, and a download goes straight from S3 to the viewer. The default task serves them at any size: the first page of a 50-million-row table takes about 0.2 GB and 0.1–0.5 s.
Charts load the result. One chart load needs about rows × bound number columns × 16 bytes, plus 16 MB. Add about 0.3 GB for the idle app, a reserve of 256 MB, and every load that runs at once. Measured peaks are about 0.7 of that estimate.
For a chart that binds a timestamp and two numbers:
| Points | One viewer | Two at once | First draw |
|---|---|---|---|
| Up to 5 million | 0.5 vCPU, 1 GB | 0.5 vCPU, 1 GB | 1–2 s |
| 10 million | 0.5 vCPU, 1 GB | 1 vCPU, 2 GB | About 4 s on 0.5–1 vCPU; about 1 s on 2 |
| 25 million | 1 vCPU, 2 GB | 2 vCPU, 4 GB | 2–5 s on 2 vCPU |
| 50 million | 1 vCPU, 3 GB (the smallest that loads), or 2 vCPU, 4 GB | 2 vCPU, 6 GB (the default) | 4–10 s on 2 vCPU |
| 100 million (extrapolated) | 2 vCPU, 6 GB | 2 vCPU, 12 GB | About 10–20 s |
| 200 million (extrapolated) | 2 vCPU, 12 GB | 4 vCPU, 24 GB | About 20–40 s |
These were measured reading from local disk, not S3, so they leave out S3 transfer time. Times varied between runs; memory did not.
When a load doesn't fit
Before a chart loads a large result, StrataBI estimates the memory the load needs and compares it with what the task has free. If it doesn't fit, the tile says Too large to load, with how much the result needs and how much the task has free, and nothing is read. The task keeps running for everyone else. Bind fewer columns, filter or aggregate in the query, or give the task more memory.
Fargate's CPU and memory pairs
From AWS's table:
ecs_task_cpu | vCPU | ecs_task_memory (MiB) |
|---|---|---|
| 256 | 0.25 | 512, 1024 or 2048 |
| 512 | 0.5 | 1024 to 4096, in steps of 1024 |
| 1024 | 1 | 2048 to 8192, in steps of 1024 |
| 2048 | 2 | 4096 to 16384, in steps of 1024 |
| 4096 | 4 | 8192 to 30720, in steps of 1024 |
| 8192 | 8 | 16384 to 61440, in steps of 4096 |
| 16384 | 16 | 32768 to 122880, in steps of 8192 |
| 32768 | 32 | 61440, 122880 or 249856 |
Admin console: Big results
An administrator can tune large results in the admin console, under Settings → Big results (Save & restart):
| Setting | Default | |
|---|---|---|
| Table rows before paging | 100,000 | A table with more rows pages from S3. Sorting and filtering are off for it: sort and filter in the query instead. A dashboard can set its own per table (config.max_rows). |
| Memory check | On | Off loads without checking first. |
| Most memory for one result | none | The most memory one result may need, whatever the task has free. |
| Reserve | 256 MB | Memory kept for the rest of the app, at most a tenth of the task. |
| Estimate factor | 1.0 | Multiplies the estimate. |
| Big single-object size | 64 MB | A single Parquet result this large or larger is read in parallel, with the memory check. Smaller ones are read as before. |
Results in S3
Results live in StrataBI's system bucket under runtime/results/ and expire 2 days after they are written. The bucket also aborts an unfinished multipart upload one day after it started, such as one from a module cut off while it wrote a large result; its parts are not objects, so the expiry rule would never remove them.
Related
StrataBI core configuration · Configuration · Install order and your manifest · Admin console · Execution types
Shaleio