system-config/playbooks/roles/gerrit/templates
Clark Boylan 046aad9276 Increase size limits for some Gerrit caches
When we restarted Gerrit recently there were a number of caches that
were over their default max sizes so were pruned. Gerrit prunes daily at
0100 or when restarted. This gives us a good indication for which caches
are currently configured to be too small for typically operation as we
restarted several hours before 0100.

All of the logged cache pruning can be found in this paste [0]. Many of
these caches were floating around their configured maximum and we leave
them alone. However four related caches are well above their default max
which is a good indication we need to increase their sizes. The four are
identified below with their documented purpose/function from the
upstream docs [1]:

 * cache "git_modified_files"
   Each item caches the list of git modified files between two git trees
   corresponding to two different commits. This cache does not read the
   actual file contents nor does it include the edits (modified regions)
   of the files.

 * cache "modified_files"
   Each item caches the list of modified files between two commits. This
   cache is similar to the git_modified_files cache but performs extra
   logic including filtering out files that are untouched by both
   commits because they were purely modified between the parent commits.

 * cache "git_file_diff"
   Each item caches the pure git diff between two git trees for a
   specific file path. The diff includes all the file attributes
   (old/new paths, change/patch types) as well as the list of edits
   corresponding to the modified regions in the file.

 * cache "gerrit_file_diff"
   Each item caches the diff between two git commits for a specific file
   path. This cache is similar to the git_file_diff cache but performs
   extra logic including identifying the edits that are due to rebase.
   The diff for the "commit message" and "merge list" can also be
   requested from this cache.

   Entries in this cache are relatively large, so memoryLimit is an
   estimate in bytes of memory used. Administrators should try to target
   cache.diff.memoryLimit to fit all changes users will view in a 1 or 2
   day span. The same applies for other diff caches:
   "git_modified_files", "modified_files" and "git_file_diff".

The note at the end of cache "gerrit_file_diff" is what we use to
determine these new sizes though we're more conservative with the memory
limits (default of which is 10m for each of these caches) as memory is
more scarce than disk.

[0] https://paste.opendev.org/show/bk4pTIuQLCsWaF3dVVF7/
[1] https://gerrit-review.googlesource.com/Documentation/config-gerrit.html#cache

Change-Id: I521b53c130892fc2152586da1c4858ea4099479f
2024-10-18 13:52:28 -07:00
..
docker-compose.yaml.j2 Upgrade Gerrit's backend database to MariaDB 10.11 2024-04-23 15:18:29 -07:00
gerrit.config.j2 Increase size limits for some Gerrit caches 2024-10-18 13:52:28 -07:00
gerrit.vhost.j2 Block access to Gitiles 2022-02-18 21:39:27 +00:00
infra_lp_creds.j2 gerrit: fix Launchpad credentials write 2021-07-20 10:54:22 +10:00
jgit.config.j2 Enable git protocol v2 on gerrit 2020-12-09 15:51:10 -08:00
manage-projects.j2 Stop managing gerrit's local git mirror dir 2020-10-16 09:41:07 -07:00
projects.ini.j2 Stop managing gerrit's local git mirror dir 2020-10-16 09:41:07 -07:00
redirect.vhost.j2 Use LE certs for Apache 2020-02-13 10:31:59 -06:00
replication.config.j2 Enable Gerrit replication autoreload 2023-02-17 15:04:15 -08:00
root.my.cnf.mariadb_container.j2 gerrit: add mariadb_container option 2021-06-16 13:57:13 +10:00
root.my.cnf.mysql.j2 gerrit: add mariadb_container option 2021-06-16 13:57:13 +10:00
secure.config.j2 Remove the mysql support from our gerrit role and image 2021-08-10 13:06:54 -07:00