Project

General

Profile

Actions

Feature #10742

open

Initial pg_num choice is static, different from other default setting

Added by John Spray about 9 years ago. Updated about 9 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
% Done:

0%

Source:
other
Tags:
Backport:
Reviewed:
Affected Versions:
Pull request ID:

Description

OSDMap::build_simple tries to do a num_osds << pg_bits calculation to scale the number of PGs with the number of OSDs. However, this gets called when the OSDMonitor is initialized the first time, i.e. when there are 0 OSDs.

The result is that the initial RBD pool is always created with 1 << pg_bits PGs. This makes the pg_bits setting redundant with respect to the osd_pool_default_pg_num setting. That default is also only used when creating pools via an MPoolOp rather than with the usual CLI (where pg_num is mandatory from the user).

This is all rather confusing...

The simplest thing would probably be to retire the pg_bits setting in favour of osd_pool_default_pg_num, to make the whole situation simpler and make the static-ness of the default RBD pg count more explicit.

It would also make sense to avoid creating the RBD pool initially (we can never know the right PG default until the OSDs are populated), but that would require some more work to make sure everything (like health) looked sane/sensible in a system with zero PGs.

Actions #1

Updated by Samuel Just about 9 years ago

  • Tracker changed from Bug to Feature
Actions #2

Updated by Sage Weil about 9 years ago

i like your proposal, let's do this for infernalis

Actions #3

Updated by Sage Weil about 9 years ago

  • Target version set to v0.94
Actions #4

Updated by Samuel Just about 9 years ago

  • Target version deleted (v0.94)
Actions

Also available in: Atom PDF