PI System Learning
ModulesData Archive & Storage
💾
Module 5Advanced

Data Archive & Storage

Deep dive into PI Data Archive internals — compression algorithms, archive management, point configuration, data quality, and storage optimization for enterprise deployments.

90 min8 topics2 code examples

PI Data Archive Internals

The PI Data Archive uses a proprietary time-series storage engine optimized for industrial sensor data. Understanding its internals is essential for performance tuning and troubleshooting.

Data Storage Pipeline

Sensor Data Arrives
      │
      ▼
Exception Filter ──► Rejected (no change within deadband)
      │
      ▼ (Passed exception)
Snapshot (current value in memory)
      │
      ▼
Compression Filter ──► Rejected (fits within compression deviation)
      │
      ▼ (Passed compression)
Archive File (persistent storage)

Exception and Compression

These two filters are the key to PI's storage efficiency:

Exception Reporting

Prevents sending data to the archive when values haven't changed significantly:

  • ExcDev: Minimum change required to pass (e.g., 0.5 engineering units)
  • ExcDevPercent: Percentage-based deadband
  • ExcMax: Maximum time between values (forces a write even if no change)
  • ExcMin: Minimum time between values (rate limiting)

Compression

Removes redundant points that can be reconstructed by linear interpolation:

  • CompDev: Maximum deviation from the interpolated line
  • CompDevPercent: Percentage-based compression deviation
  • CompMax: Maximum time between archived values
  • CompMin: Minimum time between archived values

Compression Visualization

Raw Data:  ●─●─●─●─●─●─●─●─●─●─●─●─●─●
                    ↓ Compression
Archived:  ●─────────────────────────────●
           (Only endpoints stored; intermediate points reconstructed)

PI Point Attributes Reference

AttributeDescriptionTypical Value
PointTypeData typeFloat32, Int32, String
ExcDevException deviation0.5% of span
CompDevCompression deviation0.1% of span
ExcMaxMax exception interval600 seconds
CompMaxMax compression interval28800 seconds
SpanEngineering range0-100
ZeroZero value0
EngUnitsEngineering unitsdegC, bar, m3/h
ShutdownValue on shutdown0
SquareRootApply sqrt0 (false)

Archive File Management

PI archives are fixed-size binary files stored on disk:

C:\PI\arc\
├── piarch.001    (Primary archive - current)
├── piarch.002    (Older archive)
├── piarch.003    (Oldest archive)
└── piarch.004    (Oldest - may be offline)

Archive Sizing Formula

Archive Size = (Tags × Events/day × Days × Bytes/event)
             = 50,000 tags × 1,440 events × 30 days × 16 bytes
             = ~34 GB per archive

Ready to test your knowledge?

Take the quiz for this module to earn completion credit and unlock achievements.