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):

TaskPer hourPer month
2 vCPU, 6 GB (the default)$0.108About $78.57
2 vCPU, 4 GB$0.099About $72.08
1 vCPU, 3 GB$0.054About $39.28
0.5 vCPU, 1 GB (the old default)$0.025About $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:

PointsOne viewerTwo at onceFirst draw
Up to 5 million0.5 vCPU, 1 GB0.5 vCPU, 1 GB1–2 s
10 million0.5 vCPU, 1 GB1 vCPU, 2 GBAbout 4 s on 0.5–1 vCPU; about 1 s on 2
25 million1 vCPU, 2 GB2 vCPU, 4 GB2–5 s on 2 vCPU
50 million1 vCPU, 3 GB (the smallest that loads), or 2 vCPU, 4 GB2 vCPU, 6 GB (the default)4–10 s on 2 vCPU
100 million (extrapolated)2 vCPU, 6 GB2 vCPU, 12 GBAbout 10–20 s
200 million (extrapolated)2 vCPU, 12 GB4 vCPU, 24 GBAbout 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_cpuvCPUecs_task_memory (MiB)
2560.25512, 1024 or 2048
5120.51024 to 4096, in steps of 1024
102412048 to 8192, in steps of 1024
204824096 to 16384, in steps of 1024
409648192 to 30720, in steps of 1024
8192816384 to 61440, in steps of 4096
163841632768 to 122880, in steps of 8192
327683261440, 122880 or 249856

Admin console: Big results

An administrator can tune large results in the admin console, under Settings → Big results (Save & restart):

SettingDefault
Table rows before paging100,000A 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 checkOnOff loads without checking first.
Most memory for one resultnoneThe most memory one result may need, whatever the task has free.
Reserve256 MBMemory kept for the rest of the app, at most a tenth of the task.
Estimate factor1.0Multiplies the estimate.
Big single-object size64 MBA 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.

StrataBI core configuration · Configuration · Install order and your manifest · Admin console · Execution types