Skip to content

Calculation example for data consumption

You can calculate how many GB of memory are required for which data points.

Validity

This information applies only to retaining the data and reading historical data. It does not apply to reading the live data.

Calculation formula

The calculation formula is made up as follows:

DBSize = Number of variables ValuePerVariable Data type size

The data type size results from the addition of:

  • Time stamp 8 bytes
  • Quality code 2 bytes
  • Value
    • Bool 1 byte
    • (U)Int8 1 byte
    • (U)Int16 2 bytes
    • (U)Int32 4 bytes
    • (U)Int64 8 bytes
    • Float 4 bytes
    • Double 8 bytes
    • String, depending on length and contained characters: 1 byte (single character) to 4 bytes (UTF-8) per character

Example

5 millisecond cycle: 200 values per second

8 hours of storage time: 200 * (60 * 60 * 8) = 5,760,000 values per variable (5.76 million)

90 Int32 variables: (8 bytes (time stamp) + 2 bytes (quality code) + 4 bytes (Int32)) * 5,760,000 values per variable * 90 variables = 7,257,600,000 bytes = 6921 MB = 6.76 GB


Except where otherwise noted, content on this site is licensed under the Siemens Inner Source License .