From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: Mathieu Othacehe <othacehe@gnu.org>
Cc: 43850@debbugs.gnu.org
Subject: bug#43850: cuirass: inconsistent SQL queries execution time.
Date: Sat, 31 Oct 2020 00:33:08 -0400 [thread overview]
Message-ID: <87wnz7xbej.fsf@gmail.com> (raw)
In-Reply-To: <871rhjyd38.fsf@gnu.org> (Mathieu Othacehe's message of "Tue, 27 Oct 2020 15:10:03 +0100")
Hello,
Mathieu Othacehe <othacehe@gnu.org> writes:
> Hello Chris,
>
>> I think Ricardo mentioned that the machine running Cuirass uses an SSD
>> for the root filesystem, so moving the database there may help?
>
> Looks like the database was already on the SSD before my tmpfs
> experiment.
>
> mathieu@berlin ~$ df -h
> Filesystem Size Used Avail Use% Mounted on
> none 95G 0 95G 0% /dev
> /dev/sda1 916G 321G 549G 37% /
> /dev/sdb1 37T 34T 2.6T 94% /gnu
> tmpfs 95G 8.0K 95G 1% /dev/shm
> tmpfs 10G 2.4G 7.7G 24% /var/lib/cuirass_tmpfs
>
> I don't really get why I/O pressure on /dev/sdb could impact /dev/sda.
>
> Thanks,
>
> Mathieu
As an aside, running
--8<---------------cut here---------------start------------->8---
sudo sqlite3 /var/guix/db/db.sqlite vacuum
--8<---------------cut here---------------end--------------->8---
shaved off some 40 Mb from my large database file:
-rw-r--r-- 1 root root 468889600 Oct 31 00:16 db.sqlite
-rw-r--r-- 1 root root 510648320 Oct 28 23:36 db.sqlite.bak
Perhaps we should run 'vacuum' when invoking 'guix gc' or at some other
key places (where lots of data gets removed from the DB). There's also
the auto_vacuum PRAGMA, which is not enabled currently:
--8<---------------cut here---------------start------------->8---
sqlite3 /var/guix/db/db.sqlite 'pragma auto_vacuum'
0
--8<---------------cut here---------------end--------------->8---
But the later doesn't necessarily sound like a good idea:
Note, however, that auto-vacuum only truncates the freelist pages from
the file. Auto-vacuum does not defragment the database nor repack
individual database pages the way that the VACUUM command does. In fact,
because it moves pages around within the file, auto-vacuum can actually
make fragmentation worse. [0]
[0]: https://www.sqlite.org/pragma.html#pragma_auto_vacuum
Maxim
next prev parent reply other threads:[~2020-10-31 4:34 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-07 16:04 bug#43850: cuirass: inconsistent SQL queries execution time Mathieu Othacehe
2020-10-14 16:53 ` Mathieu Othacehe
2020-10-20 11:45 ` Mathieu Othacehe
2020-10-22 11:49 ` Mathieu Othacehe
2020-10-26 22:59 ` Ludovic Courtès
2020-10-27 9:28 ` Christopher Baines
2020-10-27 14:10 ` Mathieu Othacehe
2020-10-27 18:11 ` Mathieu Othacehe
2021-03-25 12:46 ` Mathieu Othacehe
2020-10-31 4:33 ` Maxim Cournoyer [this message]
2020-11-01 18:23 ` Mathieu Othacehe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87wnz7xbej.fsf@gmail.com \
--to=maxim.cournoyer@gmail.com \
--cc=43850@debbugs.gnu.org \
--cc=othacehe@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).