system-config/playbooks/roles/gerrit
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
..
defaults Update Gerrit image tag to 3.9 (from 3.8) 2024-05-24 12:23:00 -07:00
files Reapply "Switch Gerrit replication to a larger RSA key" 2023-12-06 09:02:17 -08:00
handlers Add Apache to Ansible for Gerrit 2020-02-03 07:57:36 -06:00
tasks Reapply "Switch Gerrit replication to a larger RSA key" 2023-12-06 09:02:17 -08:00
templates Increase size limits for some Gerrit caches 2024-10-18 13:52:28 -07:00
README.rst Fix infra-prod-service-review file matchers 2023-03-03 11:47:02 -08:00

Run Gerrit.

This role deploys MariaDB alongside the Gerrit service using docker-compose to run both services in docker containers. Variables below configure MariaDB connection details.

Role Variables