From 3c0ffd671f1396150a0f411dc51d653999156108 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Han?= Date: Fri, 11 Apr 2014 14:07:37 +0200 Subject: [PATCH] Improve ceph.conf MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add tunables for: * recovery * performance Signed-off-by: Sébastien Han --- group_vars/all | 26 +++++++++++++++++++++----- roles/common/templates/ceph.conf.j2 | 12 +++++++++++- 2 files changed, 32 insertions(+), 6 deletions(-) diff --git a/group_vars/all b/group_vars/all index 170915cea..26af4790f 100644 --- a/group_vars/all +++ b/group_vars/all @@ -1,20 +1,26 @@ --- # Variables here are applicable to all host groups NOT roles -# Setup options +## Setup options +# distro_release: "{{ facter_lsbdistcodename }}" apt_key: http://ceph.com/git/?p=ceph.git;a=blob_plain;f=keys/release.asc ceph_release: emperor redhat_distro: el6 # supported distros are el6, rhel6, f18, f19, opensuse12.2, sles11 -# Ceph options +## Ceph options +# cephx: true fsid: # /!\ GENERATE ONE WITH 'uuidgen -r' /!\ -# Monitors options +## Monitor options +# monitor_interface: eth1 +mon_osd_down_out_interval: 600 +mon_osd_mon_down_reporters: 7 # number of OSDs per host + 1 -# MDS options +## MDS options +# mds: true # disable mds configuration in ceph.conf # Rados Gateway options @@ -23,7 +29,8 @@ redhat_distro_ceph_extra: centos6.4 # supported distros are centos6.3, centos6.4 radosgw_interface: eth1 # the public interface which the radosgw talks to the world with, this variable is used in the haproxy role, this does not need to be set if haproxy is not used. #radosgw_dns_name: your.subdomain.tld # subdomains used by radosgw. See http://ceph.com/docs/master/radosgw/config/#enabling-subdomain-s3-calls -# OSD options +## OSD options +# journal_size: 100 pool_default_pg_num: 128 pool_default_pgp_num: 128 @@ -31,3 +38,12 @@ pool_default_size: 2 cluster_network: 192.168.0.0/24 public_network: 192.168.0.0/24 osd_mkfs_type: xfs +osd_mon_heartbeat_interval: 30 +# Performance tuning +filestore_merge_threshold: 40 +filestore_split_multiple: 8 +osd_op_threads: 8 +# Recovery tuning +osd_recovery_max_active: 5 +osd_max_backfills: 2 +osd_recovery_op_priority: 2 diff --git a/roles/common/templates/ceph.conf.j2 b/roles/common/templates/ceph.conf.j2 index d7087c897..85c0a3f7e 100644 --- a/roles/common/templates/ceph.conf.j2 +++ b/roles/common/templates/ceph.conf.j2 @@ -29,6 +29,8 @@ {% endif %} [mon] + mon osd down out interval = {{ mon_osd_down_out_interval }} + mon osd mon down reporters = {{ mon_osd_mon_down_reporters }} {% for host in groups['mons'] %} {% if hostvars[host]['ansible_hostname'] is defined %} [mon.{{ hostvars[host]['ansible_hostname'] }}] @@ -51,7 +53,15 @@ {% if public_network is defined %} public_network = {{ public_network }} {% endif %} - + osd mon heartbeat interval = {{ osd_mon_heartbeat_interval }} + # Performance tuning + filestore merge threshold = {{ filestore_merge_threshold }} + filestore split multiple = {{ filestore_split_multiple }} + osd op threads = {{ osd_op_threads }} + # Recovery tuning + osd recovery max active = {{ osd_recovery_max_active }} + osd max backfills = {{ osd_max_backfills }} + osd recovery op priority = {{ osd_recovery_op_priority }} {% if mds %} [mds] {% for host in groups['mdss'] %}