Project

General

Profile

Bug #39390

filestore pre-split may not split enough directories

Added by Jeegn Chen 10 months ago. Updated 6 months ago.

Status:
Pending Backport
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
% Done:

0%

Source:
Tags:
Backport:
luminous, mimic, nautilus
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(RADOS):
FileStore
Pull request ID:
Crash signature:

Description

Current HashIndex::pre_split_folder() use the following snippet to figure the number of levels for split.

leavies /= subs;
while (leavies > 1) {
  ++level;
  leavies = leavies >> 4;
}

The problem is that the number of levels may be far from enough.
For example, we expect 512 PGs, about 1 million files in each PG and about 4096 file in each leave directory. So 9 bits are for PG number, which means top 2 level of directories won't be splitted. And "leavies" here is 244 and "subs" here will be 8. Thus we will only get additional 1 level of splitted directories. The number of files in a PG will be 8*16*4096 (0.5 million) only.

The following snippet will be able to assure enough number of leaves:

  int level  = 0;
  int level_limit = MAX_HASH_LEVEL - dump_num - 1;
  uint64_t actual_leaves = subs;
  while (actual_leaves < leavies && level < level_limit) {
    ++level;
    actual_leaves <<= 4;
  }


Related issues

Copied to RADOS - Backport #39681: luminous: filestore pre-split may not split enough directories New
Copied to RADOS - Backport #39682: nautilus: filestore pre-split may not split enough directories Resolved
Copied to RADOS - Backport #41291: mimic: filestore pre-split may not split enough directories Resolved

History

#2 Updated by Kefu Chai 10 months ago

  • Status changed from New to Pending Backport
  • Backport set to luminous, nautilus
  • Pull request ID set to 27689

#3 Updated by Nathan Cutler 10 months ago

  • Copied to Backport #39681: luminous: filestore pre-split may not split enough directories added

#4 Updated by Nathan Cutler 10 months ago

  • Copied to Backport #39682: nautilus: filestore pre-split may not split enough directories added

#5 Updated by Kefu Chai 6 months ago

  • Backport changed from luminous, nautilus to luminous, mimic, nautilus

#6 Updated by Nathan Cutler 6 months ago

  • Copied to Backport #41291: mimic: filestore pre-split may not split enough directories added

Also available in: Atom PDF