MAC36NL - Storage - Maximum history records capacity on MAC36NL controllers
Introduction
This guide addresses managing the storage capacity and trend data on MAC36NL controllers to prevent system overload.
Good Practice
To ensure efficient use of the MAC36NL controller's storage capacity and maintain system stability, follow these guidelines:
Assess the Impact of Serial Ports: Using serial ports (RS485, MBus) impacts the number of histories the controller can handle. Without serial ports, the limit is 4000. With any serial port in use, the limit decreases to 800 histories due to the FD_SETSIZE mechanism.
Storage Space Calculation: The controller stores data on an SD card shared with other files and system data. It's essential to monitor this space closely. Historically, you should use no more than 50% of the available space (768 MB) on the SD card for data records to ensure optimal performance. So, it results in 384 MB of available space for the historical records.
Data Record Management: Different data types use different amounts of space. For instance, a Double Precision Numeric record uses 20 bytes. Boolean on the other hand 13 bytes per record. Calculate the number of records per page file by dividing the page file size (4096 bytes) by the record size (e.g., 20 bytes for Double Precision Numeric), which typically results in 204 records per page file.
Maximize Record Capacity: The total number of records can be calculated using the formula:
CODETotal Records = (Available Space in MB) x (Number of kB in one MB ) x (Number of Records per Page File) / (Size of One Page File in kB)
For example, with 378 MB available, this results in approximately 378 * 1024 * 204 / 4 = 19,740,672 records for Double Precision Numeric types. For the Boolean on the other hand it would be 378 * 1024 * 315 / 4 = 30,481,920 records.Example with 100 histories and 15 minutes Interval: To fill a memory capacity of 19,740,672 historical records by recording 100 numeric histories every 15 minutes, it will take approximately 2,057 days. Each day, 9,600 history logs can be recorded, leading to the eventual filling of the memory capacity over the calculated time frame which is almost 6 years.