How to set ceph dout level?
Master System Design with Codemia
Enhance your system design skills with over 120 practice problems, detailed solutions, and hands-on exercises.
Introduction
Ceph debug output is controlled per subsystem, so changing the “dout level” really means changing one or more debug_* settings such as debug_osd, debug_mon, or debug_ms. The right setting depends on which daemon you are investigating and whether you want a temporary runtime change or a persistent configuration change.
Understand the debug_* Format
Many Ceph debug settings are written in a two-number form such as 1/5 or 20/20.
In practice, operators use that pair to control how much detail goes to normal logs versus the in-memory debug buffer. Higher numbers produce more detail, but they also increase log volume and can affect performance.
Examples of common subsystems include:
- '
debug_osdfor OSD behavior' - '
debug_monfor monitor behavior' - '
debug_mgrfor manager daemons' - '
debug_msfor messenger and network-related issues'
If you are debugging a specific OSD problem, increasing debug_osd is usually more useful than turning everything up globally.
Temporary Runtime Changes
For short-lived troubleshooting, it is better to change the level on the running daemon and then turn it back down after collecting evidence.
A common pattern is:
That adjusts the daemon without editing persistent config first.
If your release supports centralized config commands, you may also see or use:
The first style is often used for immediate runtime debugging, while the second is useful when you want Ceph’s config database to hold the value explicitly.
Persistent Configuration
If you need the setting to survive daemon restart, apply it persistently rather than only through a temporary runtime command.
On releases that use the config database heavily, a persistent change often looks like this:
That targets all OSDs or all monitors.
In older deployments, you may still see the values placed in ceph.conf:
The exact management path depends on the Ceph release and how the cluster is operated, but the subsystem idea stays the same.
Choose the Smallest Useful Scope
It is tempting to raise every debug level everywhere, especially during an outage. That usually creates too much noise.
A better workflow is:
- Identify the failing daemon type.
- Increase only the relevant
debug_*key. - Reproduce the issue or wait for it to recur.
- Capture the logs.
- Restore the lower level.
Example for a single OSD:
That approach gives you focused data without drowning the rest of the cluster in verbose logs.
Check the Result
After changing the setting, verify both the config value and the resulting logs. Depending on the host setup, logs may be visible through journalctl, container logs, or Ceph log files.
A quick validation pattern is:
The first command confirms the value. The second makes sure the cluster is still healthy enough while you investigate.
Common Pitfalls
The biggest mistake is turning on extremely verbose logging cluster-wide and forgetting to turn it back down. Ceph can generate a large amount of output, which makes both performance and incident analysis worse.
Another common issue is changing the wrong subsystem. Raising debug_mon will not help much with an OSD data-path problem, and raising debug_osd will not explain a monitor election issue.
Operators also sometimes assume a single integer is always enough. In Ceph, many debug keys use a paired N/M style, so copying a one-number example blindly can cause confusion.
Finally, persistent changes and temporary runtime changes are not the same. If the value disappears after restart, it was probably only injected into the live daemon.
Summary
- Ceph debug output is controlled per subsystem through keys such as
debug_osdanddebug_mon. - Higher values create more detail but also more overhead and more noise.
- Use runtime changes for short investigations and persistent config for repeatable settings.
- Scope the change to the smallest relevant daemon or daemon class.
- Always verify the value and reset verbose logging after the investigation ends.

