Applies to:
PcVue version 8.10 onwards. |
||
|
||
Summary:
This article helps you to understand why the Purge task is useful and how best to control it. |
||
|
||
Details:
What’s the difference between Emergency Purge and Purge?
How to control the Purge? This will essentially depend on the system that one puts in place. It is not easy to determine since there is no ready-made ‘recipe’ to apply. However, bear in mind that the role of the Purge task is to minimize the need for Emergency Purging in normal operation. NB: Even in a well controlled system the Emergency Purge is useful to safeguard against the Database space ever filling up too quickly during particular operations. Example of configuration:
First step – estimating the maximum number of records The first step consists in estimating the number of records that could be inserted in the database before reaching its maximum size. This size will depend on the stored attributes and of the fragmentation in the database. To work out this number, you can let the PcVue project run with the Emergency Purge deactivated. When the limit is reached, the HDS will get be paused and you need only check the record count in your Log and Trend tables. In the present example, there are 13,970,595 records in my 3GB Database with a flow of 120 records per second. This corresponds to a recorded time of 32 hours and 20 minutes approx.
One can deduce that the Emergency Purge would be launched 6 hours and 30 minutes before the database is full:
One can also deduce some that 80% of the full database corresponds to 11,176,476 log entries:
The Emergency Purge task will delete 10% of the database at 80% full. That means that the Emergency Purge is going to erase 1,117,647 log entries in 2 hours and 40 minutes:
Second step We now have all the information needed to tune the Purge to suit the Emergency Purge. The Emergency Purge will release 32h 20m – 6h 30m, that’s around 25h 50m of log entries. To be on the safe side in configuring the Purge, we arbitrarily choose to retain up to 24 hours of data and to run this task every hour
In the best case the HDS will therefore only purge one hour of data (432,000 log entries) while retaining a minimum extent of data of 24h and a maximum of 25h 50m. This way, we have a safety margin of 50 minutes of log entries between the Purge and the Emergency Purge, which amounts to 360,000 log entries. |
||
|
||
|
Created on: 13 Jul 2011 Last update: 13 May 2024