Table bloat in the Lighthouse database can cause performance issues and delays in the Malware Analysis server. The autovacuum helps to constrain table bloat. The autovacuum_vacuum_scale_factor is a value that is used to calculate when to perform an autovacuum on the tables in the Lighthouse database. You can change the autovacuum_vacuum_scale_factor from the default value of 0.20 to a higher value that will perform the autovacuum less frequently, or a lower value that will perform it more frequently. The optimal frequency depends on the table size, and the duration of the autovacuum on the table. Use the CLI commands in this topic to change the autovacuum_vacuum_scale_factor value.
You can set the autovacuum_vacuum_scale_factor setting to a value between 0.01 and 0.5. The default value is 0.20. Higher values set a less aggressive autovacuum function. Lower values set a more aggressive autovacuum function that can degrade system performance. The recommended value of 0.05 can constrain table bloat while maintaining overall system performance. To set the autovacuum_vacuum_scale_factor to the default value of 0.20, enter DEFAULT in the value parameter. After you reset the autovacuum_vacuum_scale_factor setting, perform a full vacuum on the Lighthouse database.
Administrator access
Go to CLI configuration mode:
hostname > enable hostname # configure terminal
Shows the current value of the
autovacuum_vacuum_scale_factor:hostname (config) # show hx server db config autovacuum_vacuum_scale_factorChange the
autovacuum_vacuum_scale_factorto the recommended value of 0.05:hostname (config) # hx server db config autovacuum_vacuum_scale_factor 0.05Perform a full vacuum on the Lighthouse database:
hostname (config) # hx server db full-vacuum
Example
The following example changes the value of the autovacuum_vacuum_scale_factor setting to 0.05.
hostname (config) # hx server db config autovacuum_vacuum_scale_factor 0.05Current value: autovacuum_vacuum_scale_factor = 0.2
alter system set autovacuum_vacuum_scale_factor = 0.05
ALTER SYSTEM
select pg_reload_conf()
t
New value: autovacuum_vacuum_scale_factor = 0.05