ModulesData Archive & Storage
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
| Attribute | Description | Typical Value |
|---|---|---|
| PointType | Data type | Float32, Int32, String |
| ExcDev | Exception deviation | 0.5% of span |
| CompDev | Compression deviation | 0.1% of span |
| ExcMax | Max exception interval | 600 seconds |
| CompMax | Max compression interval | 28800 seconds |
| Span | Engineering range | 0-100 |
| Zero | Zero value | 0 |
| EngUnits | Engineering units | degC, bar, m3/h |
| Shutdown | Value on shutdown | 0 |
| SquareRoot | Apply sqrt | 0 (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