IMD SolutionComputing LibraryShop main store

Explainer

How tag count and write rate drive historian database sizing

Edge computing and IIoT Published 8 min read

Short answer

A historian database size is rows per day times measured bytes per row times retention days. Rows per day come from tags with history enabled and their write interval; a max-age heartbeat sets a floor and pruning sets a cap. In the worked example, 2,000 tags at a 10-second rate with 365-day retention need about 492 GB, while the same tags held only by a 20-minute heartbeat need about 4.1 GB.

On this page
  1. The five inputs and where each one lives
  2. On-change logging writes fewer rows than the scan rate
  3. Max age sets a floor and rescues empty trends
  4. Sizing a 2,000-tag historian at a 10-second interval for 365 days
  5. Measure your own bytes per row before you buy disk
  6. What the row math does not decide
  7. Sizing mistakes that recur
  8. Questions asked

A historian database is sized from arithmetic, not from a vendor table: rows per day, times bytes per row, times the days you keep each row. Rows per day come from two per-tag decisions — whether history is enabled at all, and what forces a write: a fixed interval, a value change, or a max-age heartbeat. Count only the tags with history enabled, read the interval from the tag configuration, measure bytes per row from your own tables, and cap the total with retention pruning. At the 10-second baseline the sizing literature uses, 2,000 tagged points pass 6 billion rows a year; held to a heartbeat floor, the same points write 120 times fewer. This page gives the inputs, the on-change tradeoff behind empty trends, one worked example with the arithmetic shown, and the measurement that replaces every borrowed constant.

The five inputs and where each one lives #

Input Where to read it Effect on size
Tags with history enabled The historian's logging configuration, not the PLC's full tag list Linear in rows per day
Logging mode and interval Per-tag history settings: on change, fixed rate, deadband Sets rows per tag per day
Max age The per-tag heartbeat that forces a write when nothing changes Sets a floor under rows per day
Retention The historian's pruning or partition settings Caps the steady-state size
Bytes per row Your own tables: table size divided by row count Linear in bytes per day

Work the inputs in order, because each one multiplies the rest: a mistake in tag count or write interval outweighs a mistake in bytes per row by orders of magnitude. Fixed-rate and max-age tags are deterministic, so you can compute their rows exactly; on-change tags are not, so you sample them. Decide retention before anything else, because pruning caps the steady-state size — without it the estimate is not a disk size but the date the volume fills.

On-change logging writes fewer rows than the scan rate #

On-change mode writes a row only when the value changes. Ignition documents its tag history exactly this way — the system evaluates each tag and stores the changed values — and most historians offer the mode because in most real environments most tags sit still most of the time. Setpoints, operating modes and valve states barely write at all, which is the point of the mode.

The exceptions decide your disk. A noisy analog without a deadband writes at effectively the scan rate, and an upset lifts every tag above its average, so on-change rows are sampled from the process, never computed from configuration. The deterministic end of the scale is the published baseline: at a 10-second scan, one tag logs 8,640 values in a day, and you apply that multiplier to tags with history enabled — not to the tag count on the PLC.

With on-change logging, a setpoint that has not moved for three hours has written nothing in that time. The chart query over the last hour returns zero rows, so there is no point to draw and no earlier point to extend from: no line appears, and the trace cursor has no value to show. The tag is healthy — this is sparse data, not a fault. Widen the window and the line reappears. A line that never appears at any window width points to history never enabled on the tag or a bad-quality signal, which is a configuration fault, not a sizing one. A flat line has one more impersonator: a query truncated by a row limit, covered in Historian trend flat line: check Query Row Limit.

The fix that operators and your disk budget both need is a max age: a per-tag setting that forces a write when nothing has changed. Set it to at most one third of the shortest window operators will use, so at least three points always land on any chart — a 1-hour minimum window gives a 20-minute max age. The cost is real: quiet tags now write on every heartbeat, which erases the on-change saving for exactly the tags that saved the most. Carry the floor into the size estimate from the start, not after operators complain about empty charts.

Sizing a 2,000-tag historian at a 10-second interval for 365 days #

Inputs. 2,000 tags with history enabled — the small-system case the historian sizing literature uses. A 10-second fixed write interval per tag, the same published baseline. 78 B per row — a reported average from 2.5 years of stored data at one installation, illustrative and not a specification. Retention of 365 days with pruning enabled. For the comparison path, a 20-minute max age, one third of a 1-hour minimum chart window.

Rule, in words. Rows per day equals tags times 86,400 seconds in a day divided by the write interval in seconds; bytes per day equals rows per day times bytes per row; steady-state size equals bytes per day times retention days.

Path A, every tag at the fixed interval:

  • 86,400 ÷ 10 = 8,640 rows per tag per day
  • 8,640 × 2,000 = 17,280,000 rows per day
  • 17,280,000 × 78 = 1,347,840,000 B per day, about 1.35 GB (decimal)
  • 1,347,840,000 × 365 = 491,961,600,000 B, about 492 GB

Path B, the same tags held only by the 20-minute heartbeat:

  • 86,400 ÷ 1,200 = 72 rows per tag per day
  • 72 × 2,000 = 144,000 rows per day
  • 144,000 × 78 = 11,232,000 B per day, about 11.2 MB
  • 11,232,000 × 365 = 4,099,680,000 B, about 4.1 GB

Result. The logging mode alone moves this tag set across a 120:1 range, from about 4.1 GB to about 492 GB over the retention year.

Decision. Audit the logging mix before you run the numbers: keep the fixed interval only where the process needs it, deadband the noisy analogs, and set the max-age floor on trended quiet tags — the mode decisions move the total far more than any hardware choice. Fix retention first: with pruning at 365 days the fixed-rate system steadies at the Path A figure, while without pruning it grows 1.35 GB every day for as long as it runs. Treat the result as a raw-row floor: the 78 B input excludes indexes, so once you have a representative week, recompute the volume from your measured per-row value taken as data plus indexes, and let the engine's write-ahead logs and backups sit on top of it.

Measure your own bytes per row before you buy disk #

Replace the borrowed average with a measurement once the historian has run its intended tag set through a representative period — a week that includes steady production and, if the line has them, a changeover or batch. Then:

  1. Read the table size and the row count from the database catalog or the historian's own size report; the exact method depends on the engine behind your historian.
  2. Divide table size by row count, taking data plus index size, because indexes occupy the same disk you are sizing.
  3. Divide row count by elapsed days and by tags with history enabled for rows per tag per day, and compare the result with your computed fixed-rate figure — a mismatch flags a misconfigured interval or a forgotten deadband.
  4. Multiply forward to the retention period, then add the engine's own files: write-ahead logs, backups, index growth.

Two pages on this site run the same measurement on concrete stacks: Estimate historian disk space from measured daily growth turns a measured growth figure into a capacity number, and What one Telegraf point really costs on InfluxDB disk weighs one point on an InfluxDB deployment.

What the row math does not decide #

Disk bytes follow the arithmetic above. Insert load follows rows per second: tags with history enabled divided by the write interval, summed over tag groups. The worked example's tag set imposes 200 rows per second on average, with bursts during upsets; at the large end, one published sizing requirement keeps 52,000 tags less than 10 seconds stale — more than 5,200 writes per second — for a decade of retention. That sustained rate, not the total byte count, decides whether the engine and its disk keep up on insert. Query load is a third axis: operators, times pens per chart, times window length, which is why the trend-pen limit in one client window belongs in a sizing conversation at all.

CPU and RAM per tag tier, and any hard tag ceiling, are product- and version-specific: read them from your historian vendor's sizing documentation for the exact version you run. At least one historian documents that it supports the same number of I/O tags as the licensed SCADA server it runs with, so the license can cap tag count before disk does. Which host meets Proficy Historian Edge 2.3 requirements shows one vendor's host table, and Sizing a self-hosted Node-RED InfluxDB Grafana historian applies this row arithmetic end to end for one open stack.

With the steady-state figure and the vendor floor in hand, the machine itself is a plain choice: a line-level historian of this class is a typical host for an industrial mini PC, specified with drive capacity above the steady-state figure and storage that sustains the insert rate.

Sizing mistakes that recur #

  • Counting every PLC tag instead of the tags with history enabled. The estimate overshoots, and the overshoot hides the opposite error on the next line.
  • Averaging on-change tags and forgetting bursts. An upset writes multiples of the calm-day average, and a noisy analog without a deadband behaves like a fixed-rate tag at the scan rate.
  • Bolting the max-age floor on after sizing. It lifts the daily minimum for the quiet tags that previously wrote almost nothing.
  • Treating a borrowed per-row average as your own measurement. One installation's mix of value types, quality columns and engine storage does not transfer.
  • Budgeting raw rows only. Indexes, write-ahead logs and backups share the disk with the row data.
  • Choosing disk before retention. Pruning caps the steady state; without it the sizing question has no answer, only the date the volume fills.

Questions asked

What write rate must the historian server actually sustain?

Average insert load is tags with history enabled divided by the write interval in seconds, summed across tag groups. Size the storage subsystem for that sustained rate plus a burst margin for upsets, then validate it against the insert benchmark your historian vendor publishes for the exact engine version and disk type you run, because a rate one version absorbs comfortably can saturate another.

How do I estimate rows per day for on-change tags?

You cannot compute them from configuration, so sample. Pull the previous 24 hours of stored rows for a representative group of on-change tags, divide by the tag count, and repeat the sample after an upset, because bursts can exceed the calm-day average several times over. Fixed-rate and max-age tags need no sampling: 86,400 seconds divided by the write interval gives their exact rows per day.

Is 78 bytes per row a number I can trust?

No. It is one installation's average over 2.5 years of stored data, reflecting that site's tag mix, value types and storage engine. Your row size depends on the value types stored, the timestamp format, quality columns and how the engine stores keys and indexes. Replace it with your own figure, table size including indexes divided by row count, after a representative week of data.

Why does the database keep growing after I sized the disk?

Because nothing is pruning it. Retention caps the steady state at roughly one retention window of rows; without a prune setting, the database grows by its daily bytes for as long as the system runs. Set retention first, then size the volume to the steady-state figure plus the engine's own files: write-ahead logs, backups and indexes all sit on the same disk.

Keep reading

  • Comparison

    Historian-like data logging on a restricted edge network

    On a restricted plant network the approved destination decides the architecture: write directly from Node-RED to the database when that connection is approved, publish MQTT and land it in InfluxDB with Telegraf when only a broker is approved, and capture to local files when nothing outbound is allowed. Whatever the path, prove store-and-forward with an outage test sized from your tag count and write period.

    Edge computing and IIoT

  • How-to

    Identifying the source gateway in a shared historian database

    The history does not land in one table. Each gateway connected to the shared database registers at least two rows in sqlth_drv, and the number in the sqlt_data_ table prefix is one of those row IDs, so the source is already recorded. Join sqlth_te to sqlth_drv for the tag-to-gateway map and filter the visualization on a site-code tag-path prefix, not on scan class names.

    Edge computing and IIoT

  • Explainer

    Where the Ignition Edge tag historian writes its data

    Ignition Edge has no configurable path for its local tag historian: the store and its store-and-forward buffer both write to the volume Ignition is installed on. For a 7-day history on fewer than 100 tags, add 3 to 5 GB of headroom to the main partition; an external SQL database connection is the only supported way to choose the volume.

    Edge computing and IIoT