Page MenuHomePhabricator

Fine-tune gerrit cache settings
Closed, ResolvedPublic

Description

I haven't poked our cache settings in some time. Some of them (accounts_byname) are obsolete. Others aren't caching where they could be. After upgrading it'd be worthwhile to fine-tune these.

Event Timeline

Change 301898 had a related patch set uploaded (by Chad):
Gerrit: Set cache.projects.loadOnStartup = true

https://gerrit.wikimedia.org/r/301898

Change 301898 merged by Dzahn:
Gerrit: Set cache.projects.loadOnStartup = true

https://gerrit.wikimedia.org/r/301898

This is better now. Can always revisit later. For posterity, here's our current cache stats:

  Name                          |Entries              |  AvgGet |Hit Ratio|
                                |   Mem   Disk   Space|         |Mem  Disk|
--------------------------------+---------------------+---------+---------+
  accounts                      |  1024               |  10.9ms | 99%     |
  accounts_byemail              |  1024               |   7.1ms | 99%     |
  accounts_byname               |  2048               |   6.7ms | 81%     |
  adv_bases                     |                     |         |         |
  changes                       |                     |         |         |
  groups                        |  1082               |   5.6ms | 73%     |
  groups_byinclude              |   546               |   5.8ms | 99%     |
  groups_byname                 |     1               |   6.7ms |  0%     |
  groups_byuuid                 |  1887               |   7.5ms | 92%     |
  groups_external               |     1               |   8.2ms | 99%     |
  groups_members                |   870               |   8.8ms | 99%     |
  ldap_group_existence          |     2               |  56.6ms | 86%     |
  ldap_groups                   |   387               |  62.7ms | 98%     |
  ldap_groups_byinclude         |                     |         |         |
  ldap_usernames                |    78               |   6.2ms | 69%     |
  permission_sort               |  1024               |         | 99%     |
  plugin_resources              |                     |         |         |
  project_list                  |     1               |  73.2ms | 99%     |
  projects                      |  1673               |  23.2ms | 98%     |
  sshkeys                       |   131               |   8.7ms | 98%     |
  static_content                |     6               | 376.5us |  4%     |
D change_kind                   | 17029  70912  31.60m|   5.6ms | 58%  99%|
D conflicts                     |  1683   1683   1.51m|         | 83% 100%|
D diff                          |  2838  79655 197.44m|  10.2ms | 60%  70%|
D diff_intraline                |  5395   5395   3.59m|  11.7ms | 13%  99%|
D git_tags                      |                0.00k|         |  0%     |
D mergeability                  |  8736  31105  20.53m| 607.8ms | 12%  88%|
D web_sessions                  |   186    933 382.85k|         | 97%   1%|

Almost everything that's not in memory is getting caught on disk cache. The one exception is static_content, but that's probably not a huge deal cuz it's just some CSS and a few images.