We've specified different directories for dbdir and dbdir-state. As a result, changes in the vacuum interval are not being respected. vacuuming only takes place at the default interval, not at the newly calculated intervals. This is because two different paths are specified to the tuning database. In get_vacuum_interval(): vac_dbname = talloc_asprintf(tmp_ctx, "%s/%s.%u", ctdb->db_directory, TUNINGDBNAME\ , ctdb->pnn); In update_tuning_db(): vac_dbname = talloc_asprintf(tmp_ctx, "%s/%s.%u", ctdb_db->ctdb->db_directory_state, TUNINGDBNAME, ctdb_db->ctdb->pnn); To fix this I think we just need to change get_vacuum_interval() to use the state directory rather than the db directory (or at least make the two consistent and use the dbdir for both). If you are running with dbdir == state dir, then you won't see this problem. I've made the change and I'm not seeing the interval vary based on the number of entries that the vacuum picks up.
Created attachment 5857 [details] Suggested fix for issue. Change get_vacuum_interval to use the state directory rather than the db directory.
The code mentioned was removed back in 2011: commit d93750ea3f5cb854e5893e53795fd08656e7c12c Author: Michael Adam <obnox@samba.org> Date: Tue Dec 13 14:06:09 2011 +0100 vacuum: remove update_tuning_db() commit 621c3ce957cb946ca05a2d527c037746ae2f01d3 Author: Michael Adam <obnox@samba.org> Date: Tue Dec 13 14:16:23 2011 +0100 vacuum: change get_vacuum_interval() to simply return the VacuumDefaultInterval tunable It was a valid bug, so just marking this fixed... although differently to what the submitter recommended... ;-)