From 925083544a688f630630bcfa88c6ab451c2c2c00 Mon Sep 17 00:00:00 2001 From: Khai Do Date: Mon, 28 Dec 2015 12:42:59 -0800 Subject: [PATCH] Schedule Gerrit's git garbage collection We are seeing that Gerrit is spending a lot of time garbage collecting, possibily because the JVM is starting the garbage collection too late and thus trying to garbage collect too much. This change schedules the garbage collection daily which will allow Gerrit to garbage collect in smaller chunks. Hopefully this will help maintain Gerrit performance. Garbage collection recommendations from Collabnet[1]: "Running JGIT gc frequently is crucial for good fetch/push performance as well as smooth source code browsing". [1] http://tinyurl.com/q2aw6ba Change-Id: If9f5d5879cffc5c6349166a70b4e00429b59576b depends-on: I73166de7008ceb42db3db4a8b22fb6e9c94e790d --- modules/openstack_project/manifests/gerrit.pp | 4 ++++ modules/openstack_project/manifests/review.pp | 2 ++ 2 files changed, 6 insertions(+) diff --git a/modules/openstack_project/manifests/gerrit.pp b/modules/openstack_project/manifests/gerrit.pp index c31ed36d20..69d1aa188a 100644 --- a/modules/openstack_project/manifests/gerrit.pp +++ b/modules/openstack_project/manifests/gerrit.pp @@ -30,6 +30,8 @@ class openstack_project::gerrit ( $email = '', $database_poollimit = '', $container_heaplimit = '', + $gc_start_time = '', + $gc_interval = '', $core_packedgitopenfiles = '', $core_packedgitlimit = '', $core_packedgitwindowsize = '', @@ -128,6 +130,8 @@ class openstack_project::gerrit ( openidssourl => 'https://login.launchpad.net/+openid', database_poollimit => $database_poollimit, container_heaplimit => $container_heaplimit, + gc_start_time => $gc_start_time, + gc_interval => $gc_interval, core_packedgitopenfiles => $core_packedgitopenfiles, core_packedgitlimit => $core_packedgitlimit, core_packedgitwindowsize => $core_packedgitwindowsize, diff --git a/modules/openstack_project/manifests/review.pp b/modules/openstack_project/manifests/review.pp index 4028945e8f..32153fe21a 100644 --- a/modules/openstack_project/manifests/review.pp +++ b/modules/openstack_project/manifests/review.pp @@ -108,6 +108,8 @@ class openstack_project::review ( # 1 + 100 + 9 + 2 + 2 + 25 => 139(rounded up) database_poollimit => '150', container_heaplimit => '12g', + gc_start_time => '4:30', + gc_interval => '1 day', core_packedgitopenfiles => '4096', core_packedgitlimit => '400m', core_packedgitwindowsize => '16k',