Automatic SMAT cycling and purging
Automatic SMAT cycling happens when the cycle threshold is reached.
Inbound SMAT is cycled if the inbound protocol encoding configuration is changed and takes effect.
The SMAT Database cycle threshold is based on the size of messages, not the size of .smatdb.
As SMAT is locked when performing a search, this could cause cycling to fail when SMAT cycling is triggered. In this case, messages are written to the current SMAT so that they are not lost. After the IDE releases the lock, the cycle is successful when it is triggered again.
How and when purging happens
In this example, a script has been created that explains how the auto SMAT cycling and purging works. The script estimates maximum sizes for a site based on their settings and number of threads that SMAT has enabled.
Purging points:
- Delete the oldest SMAT
history file when history file's total size for a process exceeds
number KB applies to the entire SmatHistory directory. This is the overall size
of the directory, not per SMAT or thread.
This value is the threshold of the total size of SMAT files within the SmatHistory folder. When the cycled file is backed up to the SmatHistory folder, the engine calculates the sum size of all the files. The engine then compares to this threshold. After the sum exceeds the threshold, the oldest file is deleted. The timestamp is also the judgment.
This option is process-level effective. The total size contains all differently-threaded SMAT files; it does not indicate the total size of special thread SMAT files.
- Delete the oldest SMAT
inbound/outbound history file when history file's number for a thread
exceeds number files is for each direction
(in/out) per thread.
This value controls the maximum number of SMAT files within the SmatHistory folder. When the cycled file number exceeds this threshold, the newest cycled file is saved and the oldest file is deleted. The time stamp is the judgment to decide which file is the oldest and which is the newest.
This option is thread-level effective. Each thread’s SMAT file number limitation is the threshold.
- Delete SMAT history file for
a process when it is older than number days
purges after the file is number of days old.
If multiple options are provided, then the options are "OR". This indicates whichever condition is true is used.
Age means the time stamp of the cycled SMAT file.
This option keeps saving the cycled files as long as the value is set. When a new cycled file moves into the SmatHistory folder, the engine individually checks all files by time stamp. When a file's saving time exceeds this threshold,the file is deleted.
If all files are set a value, then the engine deals with them using the priority
. - Maximum Logs Total Size is for the entire LogHistory directory. This is the overall size of the directory and does not take into account the number of files.
- Maximum Number of Log
Files counts each file, so .err and .log files are
counted. In this case, you double the number of log files you require.
If multiple options are provided, then the options are "OR". this means whichever condition is true is used.
MonitorD cycling uses the LogHistory.
settings forExample:
SMAT History Max Files for Site helloworld - 5
SMAT History Max Size for Site helloworld - 500.000 MB
Log History Max Files for Site helloworld - 50
Log History Max Size for Site helloworld - 100.000 MB
Process crnl_ibparse_append has 4 SMATs cycling at 100.000 MB
Process crnl_ibparse_append Estimated SMAT Max Size use 500.000 MB - Max number of SmatHistory files: 5
Process crnl_ibparse_append Estimated SMAT Max Number of Files use 2.000 GB
Process crnl_ibparse_append Estimated Log History Max Size use 100.000 MB
Process crnl_ibparse_append Estimated Log History Max Files use 250.000 MB
Process crnl_ibparse_rewrite has 4 SMATs cycling at 100.000 MB
Process crnl_ibparse_rewrite Estimated SMAT Max Size use 500.000 MB - Max number of SmatHistory files: 5
Process crnl_ibparse_rewrite Estimated SMAT Max Number of Files use 2.000 GB
Process crnl_ibparse_rewrite Estimated Log History Max Size use 100.000 MB
Process crnl_ibparse_rewrite Estimated Log History Max Files use 250.000 MB
Process crnl_ibtps has 4 SMATs cycling at 100.000 MB
Process crnl_ibtps Estimated SMAT Max Size use 500.000 MB - Max number of SmatHistory files: 5
Process crnl_ibtps Estimated SMAT Max Number of Files use 2.000 GB
Process crnl_ibtps Estimated Log History Max Size use 100.000 MB
Process crnl_ibtps Estimated Log History Max Files use 250.000 MB
Process crnl_oob has 4 SMATs cycling at 100.000 MB
Process crnl_oob Estimated SMAT Max Size use 500.000 MB - Max number of SmatHistory files: 5
Process crnl_oob Estimated SMAT Max Number of Files use 2.000 GB
Process crnl_oob Estimated Log History Max Size use 100.000 MB
Process crnl_oob Estimated Log History Max Files use 250.000 MB
Process eater_in_pdl has SMAT Cycling turned off or no threads using SMAT
Process eater_in_pdl has Log Cycling turned off
Process eater_in_tcp has SMAT Cycling turned off or no threads using SMAT
Process eater_in_tcp Estimated Log History Max Size use 100.000 MB
Process eater_in_tcp Estimated Log History Max Files use 250.000 MB
Process feeder_in_pdl has SMAT Cycling turned off or no threads using SMAT
Process feeder_in_pdl has Log Cycling turned off
Process feeder_in_tcp has SMAT Cycling turned off or no threads using SMAT
Process feeder_in_tcp Estimated Log History Max Size use 100.000 MB
Process feeder_in_tcp Estimated Log History Max Files use 250.000 MB
Process feeder_out_pdl has SMAT Cycling turned off or no threads using SMAT
Process feeder_out_pdl has Log Cycling turned off
Process feeder_out_tcp has SMAT Cycling turned off or no threads using SMAT
Process feeder_out_tcp Estimated Log History Max Size use 100.000 MB
Process feeder_out_tcp Estimated Log History Max Files use 250.000 MB
Total unique SMATs (in/out) for site helloworld - 16
Total Max Estimated SMAT Size use for site helloworld - 2.000 GB
Total Max Estimated SMAT Files use for site helloworld - 8.000 GB
Total Max Estimated Log Size use for site helloworld - 700.000 MB
Total Max Estimated Log Files use for site helloworld - 1.750 GB