diff options
author | Christopher Baines <mail@cbaines.net> | 2023-04-22 18:38:28 +0100 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2023-04-22 18:38:28 +0100 |
commit | 09c63449c7384035d45eb08a7cb633aa0f06523f (patch) | |
tree | 19ff1e9c35e79d96f03d7379dddbfe3a88f6e416 | |
parent | d407355418085371b8c2a4194ebfb5baf647631f (diff) | |
download | build-coordinator-09c63449c7384035d45eb08a7cb633aa0f06523f.tar build-coordinator-09c63449c7384035d45eb08a7cb633aa0f06523f.tar.gz |
Further tune the wal checkpointing
Try to be less disruptive, so allow the wal to grow a bit more, and wait less
when the checkpointing is blocked.
-rw-r--r-- | guix-build-coordinator/datastore/sqlite.scm | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/guix-build-coordinator/datastore/sqlite.scm b/guix-build-coordinator/datastore/sqlite.scm index a93b377..f19b87c 100644 --- a/guix-build-coordinator/datastore/sqlite.scm +++ b/guix-build-coordinator/datastore/sqlite.scm @@ -247,7 +247,7 @@ (* 5 MiB)) (define extreme-wal-size-threshold - (* 30 MiB)) + (* 100 MiB)) (and (let ((checkpoint-duration-metric-name @@ -262,7 +262,7 @@ (if (> (wal-size) extreme-wal-size-threshold) ;; Since the WAL is really getting too big, wait for much longer (sqlite-exec db "PRAGMA busy_timeout = 300000;") - (sqlite-exec db "PRAGMA busy_timeout = 100;")) + (sqlite-exec db "PRAGMA busy_timeout = 20;")) (let* ((statement (sqlite-prepare @@ -327,9 +327,9 @@ PRAGMA optimize;") (retry-count 0)) (if result #t - (if (< retry-count 300) + (if (< retry-count 30) (begin - (sleep 0.1) + (sleep 1) (loop (datastore-optimize datastore) (+ 1 retry-count))) (error "unable to perform WAL checkpoint")))))) |