Well, this is using the default libsqlite 3.34.1 . One improvement is to use write-ahead logging: mailman@localhost:~$ sqlite3 /var/tmp/mailman/data/mailman.db SQLite version 3.34.1 2021-01-20 14:10:07 Enter ".help" for usage hints. sqlite> PRAGMA journal_mode = WAL; wal sqlite> This setting is persistent, and based on a small sample this seems to dramatically speed up the completion of root@localhost:~# systemctl stop mailman ## consumes <2 minutes with journal_mode = WAL; root@localhost:~# ## instead of up to 20 minutes with the default journal_mode = delete But this does not make a big change the completion time for: root@localhost:~# systemctl start mailman
Since there is no point in busy waiting when running on a processor with
only one core (as this virtual server), the next setting that I would
like to try is change the sqlite busy_timeout from the default of none
to 1 or 2 seconds, e.g.:
sqlite> PRAGMA busy_timeout = 2000;
2000
sqlite>
However, this setting is not persistent, and thus needs to be applied to
each connection (i.e. tens of database connections are made during
systemctl start mailman
). I have not yet found where to insert this
directive in mailman's database wrapper for SQLite. Might someone who
has read more of the source be able to offer me a clue?
On 6/8/23 15:47, Mark Sapiro wrote:
I would look to your database manager for the issue.