More gerrit tuning.

Increase the heap size and dramatically increase the ssh threads.
Add some more recommended parameters (see site manifest for details).

Parameterize tunables in gerrit config file.

Change-Id: Ia6446b29426f56a77425eed93a7f0e448c3cd7b1
This commit is contained in:
James E. Blair 2012-05-29 18:12:35 +00:00
parent 5b637b8b6e
commit 0082fa9c49
3 changed files with 74 additions and 5 deletions

View File

@ -43,7 +43,26 @@ node default {
#
# Long lived servers:
#
node "gerrit.openstack.org", "review.openstack.org" {
# Current thinking on Gerrit tuning parameters:
# database.poolLimit:
# This limit must be several units higher than the total number of
# httpd and sshd threads as some request processing code paths may need
# multiple connections.
# database.poolLimit = 1 + max(sshd.threads,sshd.batchThreads) + sshd.streamThreads + sshd.commandStartThreads + httpd.acceptorThreads + httpd.maxThreads
# http://groups.google.com/group/repo-discuss/msg/4c2809310cd27255
# or "2x sshd.threads"
# http://groups.google.com/group/repo-discuss/msg/269024c966e05d6a
# container.heaplimit:
# core.packedgit*
# http://groups.google.com/group/repo-discuss/msg/269024c966e05d6a
# sshd.threads:
# http://groups.google.com/group/repo-discuss/browse_thread/thread/b91491c185295a71
node "review.openstack.org" {
include openstack_cron
class { 'openstack_server':
iptables_public_tcp_ports => [80, 443, 29418]
@ -54,7 +73,13 @@ node "gerrit.openstack.org", "review.openstack.org" {
ssl_cert_file => '/etc/ssl/certs/review.openstack.org.pem',
ssl_key_file => '/etc/ssl/private/review.openstack.org.key',
ssl_chain_file => '/etc/ssl/certs/intermediate.pem',
email => "review@openstack.org",
email => 'review@openstack.org',
database_poollimit => '150', # 1 + 100 + 9 + 2 + 2 + 25 = 139(rounded up)
container_heaplimit => '8g',
core_packedgitopenfiles => '4096',
core_packedgitlimit => '400m',
core_packedgitwindowsize => '16k',
sshd_threads => '100',
github_projects => [ {
name => 'openstack/keystone',
close_pull => 'true'

View File

@ -13,6 +13,16 @@
# The URL to use for OpenID in SSO mode.
# email:
# The email address Gerrit should use when sending mail.
# database_poollimit:
# container_heaplimit:
# core_packedgitopenfiles:
# core_packedgitlimit:
# core_packedgitwindowsize:
# sshd_threads:
# httpd_acceptorthreads:
# httpd_minthreads:
# httpd_maxthreads:
# Gerrit configuration options; see Gerrit docs.
# commentlinks:
# A list of regexes Gerrit should hyperlink.
# logo:
@ -48,6 +58,15 @@ class gerrit($virtual_hostname='',
$ssl_chain_file='',
$openidssourl="https://login.launchpad.net/+openid",
$email='',
$database_poollimit='',
$container_heaplimit='',
$core_packedgitopenfiles='',
$core_packedgitlimit='',
$core_packedgitwindowsize='',
$sshd_threads='',
$httpd_acceptorthreads='',
$httpd_minthreads='',
$httpd_maxthreads='',
$github_projects = [],
$upstream_projects = [],
$commentlinks = [ { name => 'changeid',

View File

@ -9,7 +9,9 @@
hostname = localhost
database = reviewdb
username = gerrit2
poolLimit = 32
<% if database_poollimit != "" -%>
poolLimit = <%= database_poollimit %>
<% end -%>
connectionpool = true
[auth]
type = OPENID_SSO
@ -21,12 +23,35 @@
[container]
user = gerrit2
javaHome = /usr/lib/jvm/java-6-openjdk/jre
<% if container_heaplimit != "" -%>
heapLimit = <%= container_heaplimit %>
<% end -%>
[core]
<% if core_packedgitopenfiles != "" -%>
packedGitOpenFiles = <%= core_packedgitopenfiles %>
<% end -%>
<% if core_packedgitlimit != "" -%>
packedGitLimit = <%= core_packedgitlimit %>
<% end -%>
<% if core_packedgitwindowsize != "" -%>
packedGitWindowSize = <%= core_packedgitwindowsize %>
<% end -%>
[sshd]
listenAddress = *:29418
threads = 24
<% if sshd_threads != "" -%>
threads = <%= sshd_threads %>
<% end -%>
[httpd]
listenUrl = proxy-https://*:8081/
acceptorThreads = 8
<% if httpd_acceptorthreads != "" -%>
acceptorThreads = <%= httpd_acceptorthreads %>
<% end -%>
<% if httpd_minthreads != "" -%>
minThreads = <%= httpd_minthreads %>
<% end -%>
<% if httpd_maxthreads != "" -%>
maxThreads = <%= httpd_maxthreads %>
<% end -%>
[cache]
directory = cache
[cache "web_sessions"]