What happens if the storage is full when using openHistorian?

The archive will continue to be created. So I wonder if the old archive file is automatically deleted when the storage is full.

I read the question below.


However, this question seems to be about the setting of statArchiveFile.

in openHistorian.exe.Config.xml

<Archive file>
<add name = “FileSize” value = “1500” description = “File size in megabytes. Regular size = 100”
encrypted = “false” />
<add name = “DataBlockSize” Value = “8” description = “The size of the data block in the file in kilobytes.”
encrypted = “false” />
<add name = “RolloverPreparationThreshold” value = “75” description = “The file is full when you start preparing to rollover.”
encrypted = “false” />
</archiFile>

I’m wondering what RolloverPreparationThreshold “75” means.

The archive file size for openHistorian 1.0 files is preallocated, the 75 means that a new archive file will be prepared when the old one is 75% full.

thank you for your reply
I used openHistorian 2.0.

I found this source form openHistorian-master project.

private string GetPathWithEnoughSpace(long estimatedSize)
{
if (estimatedSize < 0)
return m_settings.WritePath.First();
long remainingSpace = m_settings.DesiredRemainingSpace;
foreach (string path in m_settings.WritePath)
{
long freeSpace;
long totalSpace;
FilePath.GetAvailableFreeSpace(path, out freeSpace, out totalSpace);
if (freeSpace - estimatedSize > remainingSpace)
return path;
}
throw new Exception(“Out of free space”);
}

Therefore, if there is no space, openHistorian does not run any more. Is it right?

There may be a little confusion (perhaps on my part) about which historian instance you are using. The “openHistorian 2.0” is a standalone application and works very differently from the 1.0 version that came pre-installed with the openPDC.

Are you using openPDC with the built-in 1.0 openHistorian or the standalone openHistorian 2.0?

Thanks,
Ritchie

Thank you for your concern and support.
I am using the standalone openHistorian 2.0.
Is there a different?

Yes. There are two historians, the “1.0” version and the “2.0” version. The settings you see in the configuration file concern the older 1.0 historian. The 1.0 historian is generally relegate to only archiving statistics that get calculated every 10 seconds.

The new 2.0 standalone historian is designed for high-speed, streaming time-series data storage.

Thanks!
Ritchie

To respond to your original question, both the 1.0 and 2.0 historian versions supports operations for data curtailment to prevent filling up the disk space.

The 1.0 version uses the configuration file for its settings. For example:

    <statArchiveFile>
      <add name="FileName" value="C:\Program Files\openPDC\Statistics\stat_archive.d"
        description="Name of the statistics working archive file including its path."
        encrypted="false" scope="Application" />
      <add name="FileType" value="Active" description="Type (Active; Standby; Historic) of the file."
        encrypted="false" scope="Application" />
      <add name="FileSize" value="1" description="Size (in MB) of the file."
        encrypted="false" scope="Application" />
      <add name="DataBlockSize" value="1" description="Size (in KB) of the data blocks in the file."
        encrypted="false" scope="Application" />
      <add name="RolloverPreparationThreshold" value="84" description="Percentage file full when the rollover preparation should begin."
        encrypted="false" scope="Application" />
      <add name="ArchiveOffloadLocation" value="" description="Path to the location where historic files are to be moved when disk start getting full."
        encrypted="false" scope="Application" />
      <add name="ArchiveOffloadCount" value="5" description="Number of files that are to be moved to the offload location when the disk starts getting full."
        encrypted="false" scope="Application" />
      <add name="ArchiveOffloadThreshold" value="90" description="Percentage disk full when the historic files should be moved to the offload location."
        encrypted="false" scope="Application" />
      <add name="MaxHistoricArchiveFiles" value="-1" description="Maximum number of historic files to be kept at both the primary and offload locations combined."
        encrypted="false" scope="Application" />
      <add name="LeadTimeTolerance" value="15" description="Number of minutes by which incoming data points can be ahead of local system clock and still be considered valid."
        encrypted="false" scope="Application" />
      <add name="CompressData" value="False" description="True if compression is to be performed on the incoming data points; otherwise False."
        encrypted="false" scope="Application" />
      <add name="DiscardOutOfSequenceData" value="True" description="True if out-of-sequence data points are to be discarded; otherwise False."
        encrypted="false" scope="Application" />
      <add name="CacheWrites" value="True" description="True if writes are to be cached for performance; otherwise False - this defaults to True for the statistics working archive file."
        encrypted="false" scope="Application" />
      <add name="ConserveMemory" value="False" description="True if attempts are to be made to conserve memory; otherwise False - this defaults to False for the statistics working archive file."
        encrypted="false" scope="Application" />
      <add name="MonitorNewArchiveFiles" value="False" description="True to monitor and load newly encountered archive files; otherwise False."
        encrypted="false" scope="Application" />
      <add name="ArchiveOffloadMaxAge" value="-1" description="Maximum number of days before an archive file will be offloaded."
        encrypted="false" scope="Application" />
    </statArchiveFile>

The 2.0 version is adapter based and uses instance specific configuration parameters, typically stored in the database. For example:

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

See the following code for more information on possible configuration parameters:

Thanks!
Ritchie

FYI - added a WiKi page for this:

I appreciate.
This helps me a lot.