It's not possible to change the statArchiveFile.FileSize


I’m trying to change the size of the statistics historian files (“stat_archive_…d”). I stop the openPDC service, change and save de configuration file “C:\Program Files\openPDC\openPDC.exe.Config”, session “”, parameter “FileSize”, but when I restart the openPDC service the parameter returns to its old value. I have tried to change this parameter with “XML Configuration Editor” too, but the result is the same.

I’m using the version 2.6 (release 2.6.13), but I could see the same behavior in the version 2.4.

Is there some trick for that? My main goal is to adjust the size and number of the statistics files to have an equivalent number of files in the statistics and archive (measurements) historians.


There is a data operation that, by default, executes whenever the system does a ReloadConfig called OptimizeLocalHistorianSettings. This data operation is responsible for a number of different tasks to tweak those configuration file settings automatically. As you can see from the following link, the system is automatically updating those settings to force a DataBlockSize of 1 KB and a FileSize based on the number of statistics being archived.

If you’re not careful when adjusting these settings, you can create situations where the archive is constantly rolling over, which leads to extreme disk and CPU usage, and it makes the archive unusable. This code helps to ensure that the size of the stat archive files grows appropriately as the system scales up.

If you still feel the need to modify the file size manually, you can disable the data operation by removing it from the DataOperation table in the configuration database. Alternatively, you can change the OptimizeLocalHistorianSettings parameter in the configuration file to False. Note that this will also disable the other optimization tasks handled by this DataOperation as well, which includes additional configuration file adjustments for non-stat archives and the automatic creation of an archive’s corresponding input adapter to support temporal subscriptions.

Nice, Stephen. Understood.