Chapter 7. Configuring Monitor and OSD Interaction
After you have completed your initial Ceph configuration, you can deploy and run Ceph. When you execute a command such as ceph health
or ceph -s
, the Ceph Monitor reports on the current state of the Ceph Storage Cluster. The Ceph Monitor knows about the Ceph Storage Cluster by requiring reports from each Ceph OSD Daemon, and by receiving reports from Ceph OSD Daemons about the status of their neighboring Ceph OSD Daemons. If the Ceph Monitor does not receive reports, or if it receives reports of changes in the Ceph Storage Cluster, the Ceph Monitor updates the status of the Ceph Cluster Map.
Ceph provides reasonable default settings for Ceph Monitor and Ceph OSD Daemon interaction. However, you can override the defaults. The following sections describe how Ceph Monitors and Ceph OSD Daemons interact for the purposes of monitoring the Ceph Storage Cluster.
7.1. OSDs Check Heartbeats
Each Ceph OSD Daemon checks the heartbeat of other Ceph OSD Daemons every 6 seconds. You can change the heartbeat interval by adding an osd heartbeat interval
setting under the [osd]
section of your Ceph configuration file, or by setting the value at runtime. If a neighboring Ceph OSD Daemon doesn’t show a heartbeat within a 20 second grace period, the Ceph OSD Daemon may consider the neighboring Ceph OSD Daemon down
and report it back to a Ceph Monitor, which will update the Ceph Cluster Map. You may change this grace period by adding an osd heartbeat grace
setting under the [osd]
section of your Ceph configuration file, or by setting the value at runtime.
7.2. OSDs Report Down OSDs
By default, a Ceph OSD Daemon must report to the Ceph Monitors that another Ceph OSD Daemon is down
three times before the Ceph Monitors acknowledge that the reported Ceph OSD Daemon is down
. You can change the minimum number of osd down
reports by adding the mon osd min down reports
setting under the [mon]
section of the Ceph configuration file, or by setting the value at runtime.
By default, only one Ceph OSD Daemon is required to report another Ceph OSD Daemon down
. You can change the number of Ceph OSD Daemons required to report a Ceph OSD Daemon down
to a Ceph Monitor by adding the mon osd min down reporters
setting under the [mon]
section of the Ceph configuration file, or by setting the value at runtime.
7.3. OSDs Report Peering Failure
If a Ceph OSD Daemon cannot peer with any of the Ceph OSD Daemons defined in its Ceph configuration file or the cluster map, it will ping a Ceph Monitor for the most recent copy of the cluster map every 30 seconds. You can change the Ceph Monitor heartbeat interval by adding the osd mon heartbeat interval
setting under the [osd]
section of the Ceph configuration file, or by setting the value at runtime.
7.4. OSDs Report Their Status
If an Ceph OSD Daemon does not report to a Ceph Monitor, the Ceph Monitor will consider the Ceph OSD Daemon down
after the mon osd report timeout
elapses. A Ceph OSD Daemon sends a report to a Ceph Monitor when a reportable event such as a failure, a change in placement group stats, a change in up_thru
or when it boots within 5 seconds. You can change the Ceph OSD Daemon minimum report interval by adding the osd mon report interval min
setting under the [osd]
section of the Ceph configuration file, or by setting the value at runtime.
A Ceph OSD Daemon sends a report to a Ceph Monitor every 120 seconds irrespective of whether any notable changes occur. You can change the Ceph Monitor report interval by adding the osd mon report interval max
setting under the [osd]
section of the Ceph configuration file, or by setting the value at runtime.
7.5. Configuration Settings
When modifying heartbeat settings, include them in the [global]
section of the Ceph configuration file.
7.5.1. Monitor Settings
- mon_osd_min_up_ratio
- Description
-
The minimum ratio of
up
Ceph OSD Daemons before Ceph will mark Ceph OSD Daemonsdown
. - Type
- Double
- Default
-
.3
- mon_osd_min_in_ratio
- Description
-
The minimum ratio of
in
Ceph OSD Daemons before Ceph will mark Ceph OSD Daemonsout
. - Type
- Double
- Default
-
.3
- mon_osd_laggy_halflife
- Description
-
The number of seconds
laggy
estimates will decay. - Type
- Integer
- Default
-
60*60
- mon_osd_laggy_weight
- Description
-
The weight for new samples in
laggy
estimation decay. - Type
- Double
- Default
-
0.3
- mon_osd_adjust_heartbeat_grace
- Description
-
If set to
true
, Ceph will scale based onlaggy
estimations. - Type
- Boolean
- Default
-
true
- mon_osd_adjust_down_out_interval
- Description
-
If set to
true
, Ceph will scaled based onlaggy
estimations. - Type
- Boolean
- Default
-
true
- mon_osd_auto_mark_in
- Description
-
Ceph will mark any booting Ceph OSD Daemons as
in
the Ceph Storage Cluster. - Type
- Boolean
- Default
-
false
- mon_osd_auto_mark_auto_out_in
- Description
-
Ceph will mark booting Ceph OSD Daemons auto marked
out
of the Ceph Storage Cluster asin
the cluster. - Type
- Boolean
- Default
-
true
- mon_osd_auto_mark_new_in
- Description
-
Ceph will mark booting new Ceph OSD Daemons as
in
the Ceph Storage Cluster. - Type
- Boolean
- Default
-
true
- mon_osd_down_out_interval
- Description
-
The number of seconds Ceph waits before marking a Ceph OSD Daemon
down
andout
if it does not respond. - Type
- 32-bit Integer
- Default
-
300
- mon_osd_downout_subtree_limit
- Description
-
The largest CRUSH unit type that Ceph will automatically mark
out
. - Type
- String
- Default
-
rack
- mon_osd_report_timeout
- Description
-
The grace period in seconds before declaring unresponsive Ceph OSD Daemons
down
. - Type
- 32-bit Integer
- Default
-
900
- mon_osd_min_down_reporters
- Description
-
The minimum number of Ceph OSD Daemons required to report a
down
Ceph OSD Daemon. - Type
- 32-bit Integer
- Default
-
1
- mon_osd_min_down_reports
- Description
-
The minimum number of times a Ceph OSD Daemon must report that another Ceph OSD Daemon is
down
. - Type
- 32-bit Integer
- Default
-
3
7.5.2. OSD Settings
- osd_heartbeat_address
- Description
- An Ceph OSD Daemon’s network address for heartbeats.
- Type
- Address
- Default
- The host address.
- osd_heartbeat_interval
- Description
- How often an Ceph OSD Daemon pings its peers (in seconds).
- Type
- 32-bit Integer
- Default
-
6
- osd_heartbeat_grace
- Description
-
The elapsed time when a Ceph OSD Daemon has not shown a heartbeat that the Ceph Storage Cluster considers it
down
. - Type
- 32-bit Integer
- Default
-
20
- osd_mon_heartbeat_interval
- Description
- How often the Ceph OSD Daemon pings a Ceph Monitor if it has no Ceph OSD Daemon peers.
- Type
- 32-bit Integer
- Default
-
30
- osd_mon_report_interval_max
- Description
- The maximum time in seconds that a Ceph OSD Daemon can wait before it must report to a Ceph Monitor.
- Type
- 32-bit Integer
- Default
-
120
- osd_mon_report_interval_min
- Description
- The minimum number of seconds a Ceph OSD Daemon may wait from startup or another reportable event before reporting to a Ceph Monitor.
- Type
- 32-bit Integer
- Default
-
5
- Valid Range
-
Should be less than
osd mon report interval max
- osd_mon_ack_timeout
- Description
- The number of seconds to wait for a Ceph Monitor to acknowledge a request for statistics.
- Type
- 32-bit Integer
- Default
-
30