-
Notifications
You must be signed in to change notification settings - Fork 52
Limit Total Archive Days
The openHistorian configuration string parameter “MaximumArchiveDays” is used to limit total number archive days of data to save. The connection string parameter is stored in the configuration database along with the openHistorian adapter.
To set the parameter, open the openHistorian Manager application (UI not web), and navigate to “Outputs / Historian Instances” from the main menu.
Select “PPA” in the adapter list at the bottom, and add MaximumArchiveDays=30
to the connection string to limit archive to 30 days - note that multiple parameters are separated by semicolons. Click “Save” and then “Initialize” to apply the change.
Below is an example database query to retrieve openHistorian archive adapter parameters:
SELECT Acronym, Name, AssemblyName, TypeName, ConnectionString
FROM Historian WHERE TypeName = 'openHistorian.Adapters.LocalOutputAdapter'
Acronym | Name | AssemblyName | ConnectionString |
---|---|---|---|
PPA | Primary Phasor Archive | openHistorian.Adapters.dll | ArchiveDirectories={D:\Archive;E:\Archive;F:\Archive}; AttachedPaths=G:\SavedEvents; MaximumArchiveDays=365 |
-
ArchiveCurtailmentInterval
, units in seconds, defines how often the system attempts to delete old files. For smaller archive drives, you might want to run this timer 4 times per day, or a setting like21600
. -
DesiredRemainingSpace
, units in GigaBytes, defines how much remaining space to “leave” on a drive, i.e., when to consider the drive full. The default value here is500
, i.e., 500 GB. If this is already larger than your entire archive drive size, the openHistorian will consider your archive folder already full and it will not roll over into a final.D
file - this will eventually cause the disk to fill with stage 1 and stage 2 files that cannot be rolled over into final stage 3 files (i.e., the.D
files). When the disk is full, openHistorian will keep storing data in memory waiting for disk space to become available - if memory runs out, the system will become unstable. As a result, it is important for smaller archive drives (less than 500GB) that the value be set to something more reasonable for the drive size, e.g.,20
. -
MaximumArchiveDays
, units in days, defines the maximum data time span for archived data. You will need to adjust this parameter based on how much data you archiving per day. You want to make sure max archive days can still leave enough desired space on drive perDesiredRemainingSpace
setting.
Note that values in the connection string are formatted like key1=value1; key2=value2
, for example:
MaximumArchiveDays=31; DesiredRemainingSpace=20; ArchiveCurtailmentInterval=21600